https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91939
Bug ID: 91939
Summary: ICE as segmentation violation for invalid code
Product: gcc
Version: 10.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 code gives an ICE as segmentation violation, it was discussed on
c.l.f. on Sep. 30. I believe that the code is not valid though it is compiled
in ifort, nagfor vetoes it, saying that the object t of type mytype is default
initialized, and hence its subobject t%b is not permitted in a data statement:
module ek
type:: mytype
real:: a=1.0
real:: b
end type mytype
end module ek
program test
use ek
type(mytype):: t
data t%b/2.0/
write(6,*) t
stop
end program test