diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/20030828-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20030828-1.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030828-1.c b/gcc/testsuite/gcc.c-torture/execute/20030828-1.c new file mode 100644 index 000000000..e8c1f0195 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20030828-1.c @@ -0,0 +1,18 @@ +const int *p; + +int bar (void) +{ + return *p + 1; +} + +main () +{ + /* Variable 'i' is never used but it's aliased to a global pointer. The + alias analyzer was not considering that 'i' may be used in the call to + bar(). */ + const int i = 5; + p = &i; + if (bar() != 6) + abort (); + exit (0); +} |