This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR tree-optimization/60174


This is the failure of ACATS cc3305a on the ARM:

Unable to coalesce ssa_names 34 and 399 which are marked as MUST COALESCE.
i_34(ab) and  i_399(ab)
+===========================GNAT BUG DETECTED==============================+
| 4.9.0 20140209 (experimental) (armv7l-unknown-linux-gnueabihf) GCC error:|
| SSA corruption                                                           |
| Error detected around cc3305a.adb:35:1    

It's reassociation, namely optimize_range_tests, doing SSA_NAME propagation 
when building ranges in init_range_entry.  Immediate fix attached, tested on 
x86_64-suse-linux, pre-approved by Jakub and applied on the mainline.


2014-02-18  Eric Botcazou  <ebotcazou@adacore.com>

	PR tree-optimization/60174
	* tree-ssa-reassoc.c (init_range_entry): Do not look into the defining
	statement of an SSA_NAME that occurs in an abnormal PHI node.

	
-- 
Eric Botcazou
Index: tree-ssa-reassoc.c
===================================================================
--- tree-ssa-reassoc.c	(revision 207796)
+++ tree-ssa-reassoc.c	(working copy)
@@ -1840,7 +1840,8 @@ init_range_entry (struct range_entry *r,
 
       if (exp != NULL_TREE)
 	{
-	  if (TREE_CODE (exp) != SSA_NAME)
+	  if (TREE_CODE (exp) != SSA_NAME
+	      || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (exp))
 	    break;
 
 	  stmt = SSA_NAME_DEF_STMT (exp);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]