aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c b/SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c
new file mode 100644
index 00000000..92b923b8
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/pr49073.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/49073 */
+
+extern void abort (void);
+int a[] = { 1, 2, 3, 4, 5, 6, 7 }, c;
+
+int
+main ()
+{
+ int d = 1, i = 1;
+ _Bool f = 0;
+ do
+ {
+ d = a[i];
+ if (f && d == 4)
+ {
+ ++c;
+ break;
+ }
+ i++;
+ f = (d == 3);
+ }
+ while (d < 7);
+ if (c != 1)
+ abort ();
+ return 0;
+}