aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite
diff options
context:
space:
mode:
authorSebastian Pop <s.pop@samsung.com>2015-08-28 15:51:12 -0500
committerSebastian Pop <s.pop@samsung.com>2015-08-28 16:47:05 -0500
commit65f8bbbcc74a4777f0629190ea9121fc94a79257 (patch)
tree4fff0a4fcd02fcdc01c0fbc0b0435b4be334a002 /gcc-4.9/gcc/testsuite
parentaa65e2d1e40e4dd0d936a275683c4aadfe8aa20f (diff)
downloadtoolchain_gcc-65f8bbbcc74a4777f0629190ea9121fc94a79257.tar.gz
toolchain_gcc-65f8bbbcc74a4777f0629190ea9121fc94a79257.tar.bz2
toolchain_gcc-65f8bbbcc74a4777f0629190ea9121fc94a79257.zip
backport fix for PR65735
PR tree-optimization/65735 * tree-ssa-threadedge.c (fsm_find_control_statement_thread_paths): Remove visited_phis argument, add visited_bbs, avoid recursing into the same bb rather than just into the same phi node. (thread_through_normal_block): Adjust caller. * gcc.c-torture/compile/pr65735.c: New test.
Diffstat (limited to 'gcc-4.9/gcc/testsuite')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr65735.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr65735.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr65735.c
new file mode 100644
index 000000000..c30de8ea3
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr65735.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/65735 */
+
+int foo (void);
+
+void
+bar (int a, int b, int c)
+{
+ while (!a)
+ {
+ c = foo ();
+ if (c == 7)
+ c = b;
+ switch (c)
+ {
+ case 1:
+ a = b++;
+ if (b)
+ b = 1;
+ }
+ }
+}