This is the mail archive of the gcc-bugs@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]

[Bug fortran/45380] ICE in gfc_conv_intrinsic_any_all at -O{n>0}



------- Comment #2 from mikael at gcc dot gnu dot org  2010-08-22 19:41 -------
(In reply to comment #1)
> It seems that the a /= a is simplified to a constant scalar value which
> triggers the assert. 
> 
The culprit seems the recent frontend optimization pass. 
Here is a work-around, but it would be better to have these optimizations
working with arrays.

Index: frontend-passes.c
===================================================================
--- frontend-passes.c   (r��vision 163459)
+++ frontend-passes.c   (copie de travail)
@@ -399,6 +399,9 @@
       return true;
     }

+  if (e->rank > 0)
+    return false;
+
   /* Check for direct comparison between identical variables.  Don't compare
      REAL or COMPLEX because of NaN checks.  */
   if (op1->expr_type == EXPR_VARIABLE


By the way, this also fixes runtime failures with widechar_intrinsics_5.f90


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45380


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