Corrected date in changelog
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / propalign-1.c
blob1491de8d550e90613c7a18e0d9f035de9446ba04
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-early-inlining -fdump-ipa-cp -fdump-tree-optimized" } */
3 /* { dg-skip-if "No alignment restrictions" { { ! natural_alignment_32 } && { ! natural_alignment_64 } } } */
5 #include <stdint.h>
7 extern int fail_the_test(void *);
8 extern int pass_the_test(void *);
9 extern int diversion (void *);
11 static int __attribute__((noinline))
12 foo (void *p)
14 uintptr_t a = (uintptr_t) p;
16 if (a % 4)
17 return fail_the_test (p);
18 else
19 return pass_the_test (p);
22 int
23 bar (void)
25 double buf[8] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
26 return foo (&buf);
30 /* { dg-final { scan-ipa-dump "Adjusting align" "cp" } } */
31 /* { dg-final { scan-tree-dump-not "fail_the_test" "optimized" } } */