https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80388
--- Comment #2 from Glenn Hyland ---
Sorry - hit return too early. Example code below (example.f90) generates ICE at
varasm.c:4986 ...
program example
integer, parameter :: r8 = selected_real_kind(14,30)
type test
real (r8) :: computation_accuracy
real (r8), dimension(2) :: values
end type test
type(test) :: temp
data temp / test( 10, (/8, 1/) ) / ! this gives an ICE
print *, temp
return
end
$ gfortran -c example.f90
example.f90:17:0:
end
^
internal compiler error: in output_constructor_regular_field, at varasm.c:4986
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
Replacing the data declaration line with ...
data temp / test( 10_r8, (/8_r8, 1_r8/) ) / ! compiles - prints wrong
result
allows the program to be compiled, but gives the wrong result.
$ gfortran -c example.f90
$ gfortran example.o -o example
$ ./example
4.9406564584124654E-323 3.9525251667299724E-323 4.9406564584124654E-324
Replacing the data declaration line with ...
data temp / test( 10._r8, (/8._r8, 1._r8/) ) / ! this is ok
is ok - compiles without error and prints the right result.
$ ./example
10.0008.1.