This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35470] Valid pointer assigment code gives compilation errors
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Mar 2008 22:37:06 -0000
- Subject: [Bug fortran/35470] Valid pointer assigment code gives compilation errors
- References: <bug-35470-15860@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pault at gcc dot gnu dot org 2008-03-15 22:37 -------
(In reply to comment #1)
> Confirmed as rejecting valid code, reduced testcase is:
This fixes it and is regtesting as I write.
Paul(In reply to comment #4)
> (In reply to comment #1)
> > Confirmed as rejecting valid code, reduced testcase is:
>
> This fixes it and is regtesting as I write.
>
> Paul
>
If only 'this' would fix things:)
Index: /svn/trunk/gcc/fortran/resolve.c
===================================================================
*** /svn/trunk/gcc/fortran/resolve.c (revision 133062)
--- /svn/trunk/gcc/fortran/resolve.c (working copy)
*************** check_assumed_size_reference (gfc_symbol
*** 965,970 ****
--- 965,971 ----
if (ref->type == REF_ARRAY)
for (dim = 0; dim < ref->u.ar.as->rank; dim++)
last = (ref->u.ar.end[dim] == NULL)
+ && (ref->u.ar.as->type == AS_ASSUMED_SIZE)
&& (ref->u.ar.type == DIMEN_ELEMENT);
if (last)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470