[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
--- Comment #7 from tkoenig at gcc dot gnu dot org 2009-01-05 10:43 --- Subject: Bug 38672 Author: tkoenig Date: Mon Jan 5 10:43:39 2009 New Revision: 143074 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143074 Log: 2009-01-05 Thomas Koenig PR fortran/38672 * trans-types.c (gfc_get_derived_type): Check for the presence of derived->ns->proc_name before accessing derived->ns->proc_name->attr.flavor . * resolve.c (resolve_symbol): Likewise. 2009-01-05 Thomas Koenig PR fortran/38672 * gfortran.dg/host_assoc_blockdata_1.f90: New test. * gfortran.dg/host_assoc_blockdata_2.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/host_assoc_blockdata_1.f90 trunk/gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-types.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672
[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
-- tkoenig at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |tkoenig at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2009-01-01 05:20:59 |2009-01-01 20:06:07 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672
[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
--- Comment #6 from jakub at gcc dot gnu dot org 2009-01-01 19:44 --- Looks very similar to PR37829. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672
[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
--- Comment #5 from tkoenig at gcc dot gnu dot org 2009-01-01 18:38 --- This is looking promising (and passes regression-test), and I think that this does the right thing (the symbol in question doesn't need to be a procedure, correct?) Paul, could you maybe comment? $ svn diff Index: resolve.c === --- resolve.c (revision 142857) +++ resolve.c (working copy) @@ -9263,6 +9263,7 @@ resolve_symbol (gfc_symbol *sym) module function and is not PRIVATE. */ if (sym->ts.type == BT_DERIVED && sym->ts.derived->attr.use_assoc + && sym->ns->proc_name && sym->ns->proc_name->attr.flavor == FL_MODULE) { gfc_symbol *ds; -- tkoenig at gcc dot gnu dot org changed: What|Removed |Added CC||pault at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672
[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
--- Comment #4 from pinskia at gcc dot gnu dot org 2009-01-01 05:20 --- Here is a reduced testcase: MODULE globals TYPE :: type1 END TYPE type1 TYPE (type1) :: pdm_bps END module globals BLOCK DATA use globals END -- pinskia at gcc dot gnu dot org changed: What|Removed |Added Last reconfirmed|2008-12-30 16:50:22 |2009-01-01 05:20:59 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672
[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
-- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Target Milestone|--- |4.3.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672
[Bug fortran/38672] [4.3/4.4 Regression] ICE during build with versions 4.3.2 and 4.4-20081226
--- Comment #3 from burnus at gcc dot gnu dot org 2008-12-30 16:50 --- Works with 4.2.1 (x86_64-suse-linux). Valgrind shows: ==27337== Invalid read of size 1 ==27337==at 0x4752E2: resolve_symbol (resolve.c:9311) ==27337==by 0x482726: traverse_ns (symbol.c:3127) ==27337==by 0x482715: traverse_ns (symbol.c:3124) ==27337==by 0x482715: traverse_ns (symbol.c:3124) ==27337==by 0x470A3F: resolve_types (resolve.c:10428) That seems to be: if (sym->ts.type == BT_DERIVED && sym->ts.derived->attr.use_assoc && sym->ns->proc_name->attr.flavor == FL_MODULE) The problem is that for sym->name == "pdm_bps": (gdb) p sym->ts.type $3 = BT_DERIVED (gdb) p sym->ts.derived->attr.use_assoc $4 = 1 (gdb) p sym->ns->proc_name $5 = (struct gfc_symbol *) 0x0 Thus there is no surprise that sym->ns->proc_name->attr.flavor gives an ICE. Note: (gdb) p sym->attr.flavor $7 = FL_VARIABLE The line was added as part of the following commit: r133488 | pault | 2008-03-24 20:11:24 +0100 (Mon, 24. Mar 2008) | 21 lines 2008-03-24 Paul Thomas PR fortran/34813 * resolve.c (resolve_structure_cons): It is an error to assign NULL to anything other than a pointer or allocatable component. PR fortran/33295 * resolve.c (resolve_symbol): If the symbol is a derived type, resolve the derived type. If the symbol is a derived type function, ensure that the derived type is visible in the same namespace as the function. -- burnus at gcc dot gnu dot org changed: What|Removed |Added CC||burnus at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|i686-pc-linux-gnu | GCC host triplet|i686-pc-linux-gnu | GCC target triplet|i686-pc-linux-gnu | Keywords||ice-on-valid-code Priority|P3 |P4 Last reconfirmed|-00-00 00:00:00 |2008-12-30 16:50:22 date|| Summary|ICE during build with |[4.3/4.4 Regression] ICE |versions 4.3.2 and 4.4- |during build with versions |20081226|4.3.2 and 4.4-20081226 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38672