[Bug fortran/64787] New: Invalid code on sourced allocation of class(*) character string
antony at cosmologist dot info
gcc-bugzilla@gcc.gnu.org
Sun Jan 25 16:37:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64787
Bug ID: 64787
Summary: Invalid code on sourced allocation of class(*)
character string
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: antony at cosmologist dot info
On trunk
module X
contains
subroutine AddCopy(C)
class(*), intent(in) :: C
class(*), pointer :: P
allocate(P, source=C)
end subroutine
end module X
program test
use X
call AddCopy('test string')
end program test
compiles, but when compiled with -O3 this always gives me a Seg Fault when run
(and probably invalid code more generally).
It may be related to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64692
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44672
More information about the Gcc-bugs
mailing list