This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41807] [4.5/4.4 Regression] data statement with nested type constructors
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Nov 2009 04:17:52 -0000
- Subject: [Bug fortran/41807] [4.5/4.4 Regression] data statement with nested type constructors
- References: <bug-41807-10374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #14 from jvdelisle at gcc dot gnu dot org 2009-11-17 04:17 -------
The offending patch is in 4.4 r148732, r148731 passes the test case.
--- branches/gcc-4_4-branch/gcc/fortran/resolve.c 2009/04/03 20:56:54
145519
+++ branches/gcc-4_4-branch/gcc/fortran/resolve.c 2009/06/19 22:10:45
148732
@@ -9430,9 +9430,12 @@
static gfc_try
next_data_value (void)
{
-
while (mpz_cmp_ui (values.left, 0) == 0)
{
+ if (!gfc_is_constant_expr (values.vnode->expr))
+ gfc_error ("non-constant DATA value at %L",
+ &values.vnode->expr->where);
+
if (values.vnode->next == NULL)
return FAILURE;
I suspect that gfc_is_constant_expr is clobbering something.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41807