From 1a99e748a310e31176736ed34aab012c7464efd0 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 2 Dec 2015 10:22:23 +0000 Subject: [PATCH] re PR middle-end/68570 (ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu) PR middle-end/68570 * gcc.dg/torture/pr68570.c: New test. From-SVN: r231163 --- gcc/testsuite/ChangeLog | 5 ++++ gcc/testsuite/gcc.dg/torture/pr68570.c | 35 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/torture/pr68570.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 81fcff16945..d3ca274515b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-02 Marek Polacek + + PR middle-end/68570 + * gcc.dg/torture/pr68570.c: New test. + 2015-12-02 Richard Biener PR tree-optimization/68625 diff --git a/gcc/testsuite/gcc.dg/torture/pr68570.c b/gcc/testsuite/gcc.dg/torture/pr68570.c new file mode 100644 index 00000000000..a8f2843ccb3 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr68570.c @@ -0,0 +1,35 @@ +/* PR middle-end/68570 */ +/* { dg-do compile } */ + +int a, d, e, f, h, i, k; + +void +fn1 () +{ + char m; + for (;;) + { + for (;;) + { + e = f = 1; + if (i) + d = h = 0; + else + a = 0; + break; + } + k = 0; + if (f) + a = 3; + if (d) + f = 0; + if (a > (i < 1)) + { + if (e) + break; + } + else + i = m; + k = i ? a : i; + } +} -- 2.30.2