This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/71723] [5/6/7 Regression] [F08] ICE on invalid pointer initialization
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 Nov 2016 12:35:18 +0000
- Subject: [Bug fortran/71723] [5/6/7 Regression] [F08] ICE on invalid pointer initialization
- Auto-submitted: auto-generated
- References: <bug-71723-4@http.gcc.gnu.org/bugzilla/>
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