* [PATCH] Fix PR82402
@ 2017-11-24 13:29 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2017-11-24 13:29 UTC (permalink / raw)
To: gcc-patches
The following fixes a missing SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
Tested on x86_64-unknown-linux-gnu, applied.
Richard.
2017-11-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82402
* tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
* gcc.dg/torture/pr82402.c: New testcase.
Index: gcc/tree-vect-loop-manip.c
===================================================================
--- gcc/tree-vect-loop-manip.c (revision 255137)
+++ gcc/tree-vect-loop-manip.c (working copy)
@@ -639,6 +639,8 @@ create_lcssa_for_virtual_phi (struct loo
gimple *stmt;
use_operand_p use_p;
+ SSA_NAME_OCCURS_IN_ABNORMAL_PHI (new_vop)
+ = SSA_NAME_OCCURS_IN_ABNORMAL_PHI (vop);
add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION);
gimple_phi_set_result (new_phi, new_vop);
FOR_EACH_IMM_USE_STMT (stmt, imm_iter, vop)
Index: gcc/testsuite/gcc.dg/torture/pr82402.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr82402.c (nonexistent)
+++ gcc/testsuite/gcc.dg/torture/pr82402.c (working copy)
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+typedef int jmp_buf[1];
+
+extern void exit(int) __attribute__((__noreturn__));
+extern int setjmpx(jmp_buf) __attribute__((__returns_twice__));
+
+jmp_buf jbAnagram;
+int a[6];
+int d;
+int b () { exit (1); }
+int c () { b (); }
+int e ()
+{
+ int f = 0;
+ for (; f < 6; f++)
+ a[f] = d;
+ c ();
+ setjmpx (jbAnagram);
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-24 12:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24 13:29 [PATCH] Fix PR82402 Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).