This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45380] ICE in gfc_conv_intrinsic_any_all at -O{n>0}
- From: "mikael at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Aug 2010 19:41:14 -0000
- Subject: [Bug fortran/45380] ICE in gfc_conv_intrinsic_any_all at -O{n>0}
- References: <bug-45380-16888@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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