remove the "old" at&t style asmprinter. Unfortunately, most of the
[llvm/avr.git] / test / FrontendC / pr3518.c
blob4c193c7739b2e86e476181e3635b23df21c3fb23
1 // RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep {= internal global} | count 4
2 // PR 3518
3 // Some of the objects were coming out as unintialized (external) before 3518
4 // was fixed. Internal names are different between llvm-gcc and clang so they
5 // are not tested.
7 extern void abort (void);
9 struct A { int i; int j; };
10 struct B { struct A *a; struct A *b; };
11 struct C { struct B *c; struct A *d; };
12 struct C e = { &(struct B) { &(struct A) { 1, 2 }, &(struct A) { 3, 4 } }, &(struct A) { 5, 6 } };
14 int
15 main (void)
17 if (e.c->a->i != 1 || e.c->a->j != 2)
18 abort ();
19 if (e.c->b->i != 3 || e.c->b->j != 4)
20 abort ();
21 if (e.d->i != 5 || e.d->j != 6)
22 abort ();
23 return 0;