blob: 9d18f0a767d59bff07d58bde9125854206c0093d [file] [log] [blame]
Chris Lattnerd3c38562008-05-04 00:56:25 +00001// RUN: clang -emit-llvm %s -o -
Lauro Ramos Venancio305762c2008-02-18 22:44:02 +00002void f1() {
3 // Scalars in braces.
4 int a = { 1 };
5 int b = { 1, 2 };
6}
7
8void f2() {
9 int a[2][2] = { { 1, 2 }, { 3, 4 } };
10 int b[3][3] = { { 1, 2 }, { 3, 4 } };
11 int *c[2] = { &a[1][1], &b[2][2] };
12 int *d[2][2] = { {&a[1][1], &b[2][2]}, {&a[0][0], &b[1][1]} };
13 int *e[3][3] = { {&a[1][1], &b[2][2]}, {&a[0][0], &b[1][1]} };
Lauro Ramos Venancio145cd892008-02-19 19:27:31 +000014 char ext[3][3] = {".Y",".U",".V"};
Anders Carlssona3881fc2008-01-29 01:28:48 +000015}
Chris Lattnerd3c38562008-05-04 00:56:25 +000016
17typedef void (* F)(void);
18extern void foo(void);
19struct S { F f; };
20void f3() {
21 struct S a[1] = { { foo } };
22}
23