[Bug fortran/44945] [4.6 Regression] Wrong decl for module vars / FAIL: gfortran.dg/char_array_structure_constructor.f90

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 16 14:47:00 GMT 2010



------- Comment #18 from burnus at gcc dot gnu dot org  2010-07-16 14:47 -------
Answer: With the patch, one gets:
  gfortran -fwhole-file gfortran.dg/default_initialization_4.f90
without the patch (and still -fwhole-file) it works.

The reason is that one does not "copy" over the backend_decl for the components
- which one might need to do recursively as the components might again be
derived types. Thus, it fails at trans-expr.c's gfc_conv_component_ref for:
gcc_assert (c->backend_decl).

Actually, I do not quite understand why BT_CLASS works - the BT_DERIVED check
of comment 13 should be also false for BT_CLASS, which means its backend_decl
should already be imported with -fwhole-file.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945



More information about the Gcc-bugs mailing list