https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86322

            Bug ID: 86322
           Summary: ICE in reference_record with data statement
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: juergen.reuter at desy dot de
  Target Milestone: ---

The following example from c.l.f. July 12, 2016 gives an ICE in the actual
gfortran trunk, 9.0.0. This is the ICE from gfortran:
$ gfortran f08_4.f90 
f951: internal compiler error: in record_reference, at cgraphbuild.c:64
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.


The code should be rejected apparently, as it violates F2008 C568.
Ifort rejects it with the following message:
error #8121: A data-stmt-object shall not be a subobject of a pointer.   [I]
  data c%i /b%i/

program p
type a
integer i
end type a
type(a), target, save :: b
type(a), pointer :: c
data b%i /42/
data c%i /b%i/
print *, c%i
end

Reply via email to