xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/g++.old-deja/g++.other/addrof1.C (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1 
2 extern "C" void abort ();
3 
4 typedef struct st {
5         unsigned char   a;
6         unsigned char   b;
7         unsigned char   c;
8         unsigned char   d;
9 } __attribute__((aligned(4))) st;
10 
11 void testme(int, int, int);
12 
13 static inline void
stupid_func(st s)14 stupid_func(st s)
15 {
16         testme(s.a, s.b, s.c);
17 }
18 
main()19 int main()
20 {
21         st s;
22 
23         s.a = s.b = s.c = 216;
24         stupid_func(s);
25 
26         return 0;
27 }
28 
testme(int a,int b,int c)29 void testme(int a, int b, int c)
30 {
31   if (a != 216 || b != 216 || c != 216)
32     abort();
33 }
34