[Bug fortran/95138] ICE on transfer to unlimited polymorphic
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 14 21:00:11 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95138
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-5-14
CC| |anlauf at gcc dot gnu.org
Keywords| |ice-on-valid-code,
| |wrong-code
Priority|P3 |P4
--- Comment #1 from anlauf at gcc dot gnu.org ---
A small subset of the reproducer shows that invalid code is generated:
program transfer_p
implicit none
integer, parameter :: n = 3
class(*), allocatable :: o(:)
integer :: v(n)
integer :: i
v = [(i, i=1,n)]
allocate(o, source=v)
print *, "size (o) =", size (o)
print *, transfer(o, v)
end
This compiles and gives:
size (o) = 3
1 2 3 0 0 0
while compiling with -fdefault-integer-8 gives the correct answer:
size (o) = 3
1 2 3
A look at the dump appears to give some hint where to look further.
More information about the Gcc-bugs
mailing list