aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-10-03 13:28:24 -0600
committerJeff Law <law@gcc.gnu.org>2016-10-03 13:28:24 -0600
commit0a4e5cf3122f8237d840b34d0515151b61ffeb5e (patch)
tree8f5ba8447a97730e48ec8aeadb75ec9d3eb338d0 /gcc/testsuite/gcc.c-torture
parent95ccd17c610e928f1b8089192d89456dd0dc891f (diff)
downloadgcc-0a4e5cf3122f8237d840b34d0515151b61ffeb5e.zip
gcc-0a4e5cf3122f8237d840b34d0515151b61ffeb5e.tar.gz
gcc-0a4e5cf3122f8237d840b34d0515151b61ffeb5e.tar.bz2
re PR tree-optimization/71550 (wrong code at -O3 on x86_64-linux-gnu)
PR tree-optimization/71550 PR tree-optimization/71403 * tree-ssa-threadbackward.c: Include tree-vectorizer.h (profitable_jump_thread_path): Also return boolean indicating if the realized path will create an irreducible loop. Remove loop depth tests from 71403. (fsm_find_control_statement_thread_paths): Remove loop depth tests from 71403. If threading will create an irreducible loop, then throw away loop iteration and related information. PR tree-optimization/71550 PR tree-optimization/71403 * gcc.c-torture/execute/pr71550.c: New test. From-SVN: r240727
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr71550.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr71550.c b/gcc/testsuite/gcc.c-torture/execute/pr71550.c
new file mode 100644
index 0000000..8d1ecda
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr71550.c
@@ -0,0 +1,26 @@
+
+extern void exit (int);
+
+int a = 3, b, c, f, g, h;
+unsigned d;
+char *e;
+
+int
+main ()
+{
+ for (; a; a--)
+ {
+ int i;
+ if (h && i)
+ __builtin_printf ("%d%d", c, f);
+ i = 0;
+ for (; i < 2; i++)
+ if (g)
+ for (; d < 10; d++)
+ b = *e;
+ i = 0;
+ for (; i < 1; i++)
+ ;
+ }
+ exit (0);
+}