This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35940] Array BACK ignored in INDEX intrinsic when other args scalar
- From: "bdavis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2008 19:23:08 -0000
- Subject: [Bug fortran/35940] Array BACK ignored in INDEX intrinsic when other args scalar
- References: <bug-35940-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from bdavis at gcc dot gnu dot org 2008-04-29 19:23 -------
this looks promising:
Index: gcc/gcc/fortran/simplify.c
===================================================================
--- gcc/gcc/fortran/simplify.c (revision 134801)
+++ gcc/gcc/fortran/simplify.c (working copy)
@@ -1570,7 +1570,8 @@
int back, len, lensub;
int i, j, k, count, index = 0, start;
- if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT)
+ if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT
+ || b->expr_type != EXPR_CONSTANT)
return NULL;
if (b != NULL && b->value.logical != 0)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35940