gcc/testsuite/ChangeLog:
PR rtl-optimization/115933
* gcc.dg/pr115933.c: New test.
---
The PR is fixed but the bisect wasn't conclusive (only to a range) and
the testcase is sufficiently different from the commits in that range
to be worth adding IMO. OK?
gcc/testsuite/gcc.dg/pr115933.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/pr115933.c
diff --git a/gcc/testsuite/gcc.dg/pr115933.c b/gcc/testsuite/gcc.dg/pr115933.c
new file mode 100644
index 00000000000..041597ae330
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr115933.c
@@ -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;
+}
--
2.47.0