2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr30375.c
blob435c38f13b866629045f851fdddca8cdcc6ac36c
1 /* { dg-do run } */
3 typedef struct _s {
4 int a;
5 int b;
6 int c;
7 int d;
8 } s;
10 extern void abort(void);
12 void __attribute__((noinline)) g(s *p)
14 if (p->d != 0)
15 abort ();
18 char *c = (void*)0;
19 void __attribute__((noinline)) f(void) { if (c) *c = 1; }
21 void test_signed_msg_encoding(void)
23 s signInfo = { sizeof(signInfo), 0 };
25 signInfo.b = 1;
26 signInfo.c = 0;
27 g(&signInfo);
28 signInfo.d = 1;
29 f();
32 int main()
34 test_signed_msg_encoding ();
35 test_signed_msg_encoding ();
36 return 0;