Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/pr108007.c

raw
1 /* { dg-do run } */
2 /* { dg-options "-Os -fno-dce -fno-tree-dce -g" } */
3 /* { dg-require-effective-target int32plus } */
4
5 /* This tests that when IPA-SRA removes a LHS of a call statement which, in the
6 original source, is fed into a useless operation which however can trap when
7 given nonsensical input, that we remove it even when the user has turned off
8 normal DCE. */
9
10 int a, b, d, e, f = 10000000, h;
11 short c, g;
12 static int *i() {
13 g = f;
14 L:
15 h = e = ~g;
16 g = ~f % g & e;
17 if (!g)
18 goto L;
19 c++;
20 while (g < 1)
21 ;
22 return &a;
23 }
24 static void k() {
25 int *l, m = 2;
26 l = i();
27 for (; d < 1; d++)
28 m |= *l >= b;
29 }
30 int main() {
31 k();
32 return 0;
33 }