[Bug fortran/68225] ICE with -Wrealloc-lhs-all on structure constructor with allocatable components
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Nov 5 20:49:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68225
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Adding one type extension :
$ cat z0.f90
program p
type t
integer, allocatable :: a
end type
type, extends(t) :: t2
integer, allocatable :: b
end type
type(t2) :: x
x = t2()
print *, allocated(x%a), x%a
print *, allocated(x%b), x%b
end
$ gfortran -g -O0 -Wall -Wrealloc-lhs-all z0.f90
z0.f90:9:0:
x = t2()
1
in gfc_format_decoder, at fortran/error.c:1124
---
$ gfortran -g -O0 -Wall -fcheck=all z0.f90
$ a.out
F 0
T 0
Note that allocation status is different.
More information about the Gcc-bugs
mailing list