From: Roger Sayle Date: Tue, 24 Aug 2004 04:23:31 +0000 (+0000) Subject: re PR rtl-optimization/17078 (Jump into if(0)-substatement fails) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=663790f8b8f07e56cd63d6863b5718a3cad2e25d;p=gcc.git re PR rtl-optimization/17078 (Jump into if(0)-substatement fails) PR rtl-optimization/17078 * gcc.c-torture/execute/pr17078-1.c: New test case. From-SVN: r86463 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5c688632e9e..38b1d24b7eb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-08-23 Roger Sayle + + PR rtl-optimization/17078 + * gcc.c-torture/execute/pr17078-1.c: New test case. + 2004-08-23 Mark Mitchell PR c/14492 diff --git a/gcc/testsuite/gcc.c-torture/execute/pr17078-1.c b/gcc/testsuite/gcc.c-torture/execute/pr17078-1.c new file mode 100644 index 00000000000..9380bf48593 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr17078-1.c @@ -0,0 +1,25 @@ +extern void abort(void); + +void test(int *ptr) +{ + int i = 1; + goto useless; + if (0) + { + useless: + i = 0; + } + else + i = 1; + *ptr = i; +} + +int main() +{ + int i = 1; + test(&i); + if (i) + abort (); + return 0; +} +