This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38135] RESHAPE gives wrong result
- 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: 16 Nov 2008 13:45:59 -0000
- Subject: [Bug fortran/38135] RESHAPE gives wrong result
- References: <bug-38135-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from mikael at gcc dot gnu dot org 2008-11-16 13:45 -------
Index: simplify.c
===================================================================
--- simplify.c (révision 141833)
+++ simplify.c (copie de travail)
@@ -3410,9 +3410,6 @@ is_constant_array_expr (gfc_expr *e)
if (e->expr_type != EXPR_ARRAY || !gfc_is_constant_expr (e))
return false;
- if (e->value.constructor == NULL)
- return false;
-
for (c = e->value.constructor; c; c = c->next)
if (c->expr->expr_type != EXPR_CONSTANT)
return false;
This solves (1) (the original testcase), but not (2).
I will regtest it.
for (2), I'm puzzled. :(
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38135