PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / propalign-2.c
blob5a52648832fddb61042fafc2ca4b9b3dd392df83
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-early-inlining -fdump-ipa-cp -fdump-tree-optimized" } */
4 #include <stdint.h>
6 extern int fail_the_test(void *);
7 extern int pass_the_test(void *);
8 extern int diversion (void *);
10 struct somestruct
12 void *whee;
13 void *oops;
16 struct container
18 struct somestruct first;
19 struct somestruct buf[32];
22 static int __attribute__((noinline))
23 foo (void *p)
25 uintptr_t a = (uintptr_t) p;
27 if (a % 4)
28 return fail_the_test (p);
29 else
30 return pass_the_test (p);
33 int
34 bar (void)
36 struct container c;
37 return foo (c.buf);
41 static int
42 through (struct somestruct *p)
44 diversion (p);
45 return foo (&p[16]);
48 int
49 bar2 (void)
51 struct container c;
52 through (c.buf);
55 /* { dg-final { scan-ipa-dump "Adjusting alignment of param" "cp" } } */
56 /* { dg-final { scan-tree-dump-not "fail_the_test" "optimized" } } */
57 /* { dg-final { cleanup-ipa-dump "cp" } } */
58 /* { dg-final { cleanup-tree-dump "optimized" } } */