This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/64787] New: Invalid code on sourced allocation of class(*) character string
- From: "antony at cosmologist dot info" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 25 Jan 2015 16:36:41 +0000
- Subject: [Bug fortran/64787] New: Invalid code on sourced allocation of class(*) character string
- Auto-submitted: auto-generated
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