testsuite: add testcase for fixed PR115933
gcc/testsuite/ChangeLog: PR rtl-optimization/115933 * gcc.dg/pr115933.c: New test.
This commit is contained in:
parent
17d7a4b01a
commit
68e7ced1c7
1 changed files with 19 additions and 0 deletions
19
gcc/testsuite/gcc.dg/pr115933.c
Normal file
19
gcc/testsuite/gcc.dg/pr115933.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* PR rtl-optimization/115933 */
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O1 -fno-tree-loop-optimize -ftree-vrp -fno-tree-ch -fgcse" } */
|
||||
|
||||
int a, b;
|
||||
unsigned c() {
|
||||
int d, e = d = 2;
|
||||
if (a < 0)
|
||||
for (e = 0; e < 1; e++)
|
||||
d = 0;
|
||||
b = e;
|
||||
return d;
|
||||
}
|
||||
int main() {
|
||||
c();
|
||||
if (b != 2)
|
||||
__builtin_abort();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue