This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34907] valgrind error indication from testsuite trans-types.c: gfc_typenode_for_spec
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2008 23:11:09 -0000
- Subject: [Bug fortran/34907] valgrind error indication from testsuite trans-types.c: gfc_typenode_for_spec
- References: <bug-34907-10490@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from burnus at gcc dot gnu dot org 2008-01-21 23:11 -------
Move to Fortran. The problem seems to be:
if (spec->f90_type == BT_VOID)
which is for some reason not initialized. With openSUSE's 4.3.0 20080102 I
don't see it.
I actually do not see how this comes as gfc_clear_ts sets it.
In any case the following is a useful patch:
Index: parse.c
===================================================================
--- parse.c (Revision 131702)
+++ parse.c
@@ -2189,7 +2189,7 @@ loop:
gfc_current_block ()->ts.kind = 0;
/* Keep the derived type; if it's bad, it will be discovered later. */
- if (!(ts->type = BT_DERIVED && ts->derived))
+ if (!(ts->type == BT_DERIVED && ts->derived))
ts->type = BT_UNKNOWN;
}
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |fortran
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34907