This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/71723] [5/6/7 Regression] [F08] ICE on invalid pointer initialization


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]