This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54788] ICE on pointer-array element assignment
- 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: Wed, 03 Oct 2012 00:01:59 +0000
- Subject: [Bug fortran/54788] ICE on pointer-array element assignment
- Auto-submitted: auto-generated
- References: <bug-54788-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54788
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janus at gcc dot gnu.org
--- Comment #1 from janus at gcc dot gnu.org 2012-10-03 00:01:59 UTC ---
I think both programs are invalid and should be rejected.
The error message for the first one is misleading, to say the least. I don't
quite understand it either.
Note: "integer, pointer :: a(:)" defines a pointer to an array, and not an
array of pointers. Therefore "a(0:0)" is an element (or rather an array
section) of the array which is pointed to by "a". It is not a pointer itself
and can not be used in a pointer assignment context.