[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-16 Thread pault at gcc dot gnu dot org


--- Comment #9 from pault at gcc dot gnu dot org  2008-03-16 19:15 ---
Fixed on trunk

Thanks for the report

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-16 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2008-03-16 19:15 ---
Subject: Bug 35470

Author: pault
Date: Sun Mar 16 19:14:17 2008
New Revision: 133279

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133279
Log:
2008-03-16  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/35470
* resolve.c (check_assumed_size_reference):  Only visit the
first reference and look directly at the highest dimension.

2008-03-16  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/35470
* gfortran.dg/subref_array_pointer_3.f90 : New test.

Added:
trunk/gcc/testsuite/gfortran.dg/subref_array_pointer_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-16 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2008-03-16 07:15 ---
(In reply to comment #6)
> You r 'this' is better than my 'Think' Passed regression testing here on
> x86-64.
> 
Jerry,

I did not see that you were working on it - sorry that I trampled on your toes.
I took a copy of this the moment that it was posted to keep me amused during a
meeting.

Cheers

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-15 Thread jvdelisle at gcc dot gnu dot org


--- Comment #6 from jvdelisle at gcc dot gnu dot org  2008-03-16 05:00 
---
You r 'this' is better than my 'Think' Passed regression testing here on
x86-64.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-15 Thread pault 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



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-15 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2008-03-15 22:36 ---
(In reply to comment #1)
> Confirmed as rejecting valid code, reduced testcase is:

This fixes it and is regtesting as I write.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|jvdelisle at gcc dot gnu dot|pault at gcc dot gnu dot org
   |org |
   Last reconfirmed|2008-03-15 18:07:40 |2008-03-15 22:36:11
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-15 Thread jvdelisle at gcc dot gnu dot org


--- Comment #3 from jvdelisle at gcc dot gnu dot org  2008-03-15 18:10 
---
Jumped too soon. Several failures with that pacth


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-15 Thread jvdelisle at gcc dot gnu dot org


--- Comment #2 from jvdelisle at gcc dot gnu dot org  2008-03-15 18:07 
---
Think I have a fix.  Regression testing.

Index: resolve.c
===
--- resolve.c   (revision 133251)
+++ resolve.c   (working copy)
@@ -967,7 +967,7 @@ check_assumed_size_reference (gfc_symbol
last = (ref->u.ar.end[dim] == NULL)
   && (ref->u.ar.type == DIMEN_ELEMENT);

-  if (last)
+  if (need_full_assumed_size && last)
 {
   gfc_error ("The upper bound in the last dimension must "
 "appear in the reference to the assumed size "


-- 

jvdelisle at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jvdelisle at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-03-05 22:00:12 |2008-03-15 18:07:40
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470



[Bug fortran/35470] Valid pointer assigment code gives compilation errors

2008-03-05 Thread fxcoudert at gcc dot gnu dot org


--- Comment #1 from fxcoudert at gcc dot gnu dot org  2008-03-05 22:00 
---
Confirmed as rejecting valid code, reduced testcase is:

subroutine sub(arr)
  type real_pointer
real, pointer :: p(:)
  end type real_pointer
  type(real_pointer), dimension(*) :: arr
  real, pointer :: p(:)

  p => arr(1)%p
end subroutine

$ gfortran -c a.f90
a.f90:9.7:

  p => arr(1)%p
  1
Error: The upper bound in the last dimension must appear in the reference to
the assumed size array 'arr' at (1)


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||rejects-valid
   Last reconfirmed|-00-00 00:00:00 |2008-03-05 22:00:12
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35470