Merge from mainline
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb106.C
blobb341cff5502301a61730b81504ede0a04e7b914a
1 // { dg-do assemble { target native } }
2 // { dg-options "-O2 -fPIC " }
3 struct T
5         const char*     f1;
6         int     f2;
7 };
9 void f(T*);
10 int g();
12 extern char a1[];
14 inline int m(int a, int b) {return b < a ? 2 : 1;}
16 void
17 h()
19         T       a[10];
20         int     i(0);
22         bool    c;
23         if (c)
24         {                
25                 a[i++].f1 = "asf";
26                 f(a);
27                 i = 0;
28         }
30         a[i].f1 = &a1[1];
31         a[i].f2 = m(1, g());
32         i++;
34         a[i].f1 = "zxv";
35         a[i].f2 = 0;