From 663790f8b8f07e56cd63d6863b5718a3cad2e25d Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Tue, 24 Aug 2004 04:23:31 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 5 ++++ .../gcc.c-torture/execute/pr17078-1.c | 25 +++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr17078-1.c 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; +} + -- 2.30.2