[Bug fortran/71723] [5/6/7 Regression] [F08] ICE on invalid pointer initialization
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Nov 19 13:28:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71723
--- Comment #10 from janus at gcc dot gnu.org ---
(In reply to janus from comment #9)
> [Btw, we possibly also fail to check for the SAVE attribute.]
That guess was wrong. We do have such checks, as this example shows:
subroutine sub
integer, target :: j
integer, allocatable, target :: a
integer, pointer :: jp => j
integer, pointer :: ap => a
end subroutine
test.f90:19:31:
integer, pointer :: jp => j
1
Error: Pointer initialization target at (1) must have the SAVE attribute
test.f90:20:31:
integer, pointer :: ap => a
1
Error: Pointer initialization target at (1) must not be ALLOCATABLE
More information about the Gcc-bugs
mailing list