This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57306] [OOP] [F08] ICE on valid with class 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: Fri, 02 Aug 2013 06:46:55 +0000
- Subject: [Bug fortran/57306] [OOP] [F08] ICE on valid with class pointer initialization
- Auto-submitted: auto-generated
- References: <bug-57306-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57306
--- Comment #12 from janus at gcc dot gnu.org ---
(In reply to Tobias Burnus from comment #10)
> > Putting this inside a subroutine, one gets:
> >
> > class(c), pointer :: px => x
> > 1
> > Error: Pointer initialization target at (1) must have the SAVE attribute
>
> That sounds like a bug:
>
> "Explicit initialization of a variable that is not in a common block implies
> the SAVE attribute, which may be confirmed by explicit specification."
> (5.2.3 Initialization, F2008)
>
> And "px" is clearly initialized
Oh, wait: The error is about the *target*, not the pointer. Therefore I think
it's indeed correct and there is no bug!