tree-optimization/108523 - testcase for the bug
Commit Message
This adds a reduced testcase for the PR.
Tested on x86_64-unknown-linux-gnu, pushed.
PR tree-optimization/108523
* gcc.dg/torture/pr108523.c: New testcase.
---
gcc/testsuite/gcc.dg/torture/pr108523.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr108523.c
new file mode 100644
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+int g_149, g_167, g_481;
+int main() {
+ int *l_1478 = &g_149;
+ *l_1478 ^= g_167;
+lbl_1481:
+ for (;;) {
+ g_481 = 1;
+ for (; g_481 < 100000; g_481 += 1) {
+ g_167 ^= *l_1478;
+ if (g_149)
+ goto lbl_1481;
+ }
+ }
+}