* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20030405-1.c
blob0bdafb9239f8500cc26306bd686edb040fcbea53
1 /* When compiled with -pedantic, this program will cause an ICE when the
2 constant propagator tries to set the value of *str to UNDEFINED.
4 This happens because *str is erroneously considered as a store alias.
5 The aliasing code is then making *str an alias leader for its alias set
6 and when the PHI node at the end of the while() is visited the first
7 time, CCP will try to assign it a value of UNDEFINED, but the default
8 value for *str is a constant. */
9 typedef __SIZE_TYPE__ size_t;
10 size_t strlength (const char * const);
11 char foo();
13 static const char * const str = "mingo";
15 bar()
17 size_t c;
18 char *x;
20 c = strlength (str);
21 while (c < 10)
23 if (c > 5)
24 *x = foo ();
25 if (*x < 'a')
26 break;
29 return *x == '3';