[Bug fortran/54880] [OOP] ICE in gfc_create_module_variable, at fortran/trans-decl.c:4013

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 12 09:34:00 GMT 2012


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org
            Summary|ICE in                      |[OOP] ICE in
                   |gfc_create_module_variable, |gfc_create_module_variable,
                   |at                          |at
                   |fortran/trans-decl.c:4013   |fortran/trans-decl.c:4013

--- Comment #1 from janus at gcc dot gnu.org 2012-10-12 09:33:27 UTC ---
Huh, the procedure to reproduce the bug is rather strange. However, I can
confirm the error (with 4.7 and trunk). I could even reduce it a bit more:

> cat m1.f95
module solver_2D_m
  use adv_m
  class(adv_t), pointer :: adv
end module

> cat m2.f95
module adv_m
  type :: adv_t
  end type
end module

> cat m12.f95
#include "m1.f95"
#include "m2.f95"

> cat trigger.sh
#!/bin/bash
gfortran-4.8 -c m2.f95
gfortran-4.8 -cpp -c m12.f95


The error on the second line only happens if the module file of 'adv_m' is
present (created by the first line).

The example seems very 'constructed' to me. Does it have any practical
relevance to you?



More information about the Gcc-bugs mailing list