PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-ccp-7.c
blob0fa66969bed935c29beee01e24ec6b34a7e901ee
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -fdump-tree-optimized" } */
4 extern void link_error (void);
6 /* tests to check if cprop works when using non-return functions */
8 extern int not_returning (int) __attribute__ ((noreturn));
10 int b;
11 int test7 (int a)
13 b = 7;
14 if (a)
16 not_returning (a);
18 if (b != 7)
19 link_error ();
20 return b;
24 /* There should be not link_error calls, if there is any the
25 optimization has failed */
26 /* { dg-final { scan-tree-dump-times "link_error" 0 "optimized"} } */