public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37039]  New: Cray pointer with pointee DIMENSION statement after POINTER statement
@ 2008-08-06 19:14 burnus at gcc dot gnu dot org
  2009-03-29  8:26 ` [Bug fortran/37039] " fxcoudert at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-08-06 19:14 UTC (permalink / raw)
  To: gcc-bugs

From
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/14ce82ff2838fb9a

I think it is a valid program - at least in the sense that other
Cray-pointer-supporting programs support it.

The following program is rejected with

         tab(n) = 0
                  1
Error: Unexpected STATEMENT FUNCTION statement at (1)

It works if one swaps the "INTEGER, dimension(1:nnode) :: tab" with the
"POINTER(ip_tab,tab)" line.

      subroutine test(nnode)
      implicit none
      integer n,nnode
      pointer(ip_tab, tab)
      integer , dimension(1:nnode) :: tab
      do n=1,nnode
         tab(n) = 0
      enddo
      end subroutine test


-- 
           Summary: Cray pointer with pointee DIMENSION statement after
                    POINTER statement
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
@ 2009-03-29  8:26 ` fxcoudert at gcc dot gnu dot org
  2010-02-10 19:39 ` langton at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-29  8:26 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-29 08:26:51
               date|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
  2009-03-29  8:26 ` [Bug fortran/37039] " fxcoudert at gcc dot gnu dot org
@ 2010-02-10 19:39 ` langton at gcc dot gnu dot org
  2010-05-09 20:40 ` dfranke at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: langton at gcc dot gnu dot org @ 2010-02-10 19:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

langton at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |langton at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-03-29 08:26:51         |2010-02-10 19:38:57
               date|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
  2009-03-29  8:26 ` [Bug fortran/37039] " fxcoudert at gcc dot gnu dot org
  2010-02-10 19:39 ` langton at gcc dot gnu dot org
@ 2010-05-09 20:40 ` dfranke at gcc dot gnu dot org
  2010-05-12 10:06 ` dfranke at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-09 20:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2010-05-09 20:39 -------
This is, I think, a technical dupe of PR31560?!


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-05-09 20:40 ` dfranke at gcc dot gnu dot org
@ 2010-05-12 10:06 ` dfranke at gcc dot gnu dot org
  2010-05-12 15:57 ` langton at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-12 10:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dfranke at gcc dot gnu dot org  2010-05-12 10:06 -------
Another possible dupe: PR29813.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-05-12 10:06 ` dfranke at gcc dot gnu dot org
@ 2010-05-12 15:57 ` langton at gcc dot gnu dot org
  2010-05-12 16:51 ` langton at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: langton at gcc dot gnu dot org @ 2010-05-12 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from langton at gcc dot gnu dot org  2010-05-12 15:57 -------
I don't think this is a dupe of either of those bugs.  In this case, the
dimension attribute isn't properly applied to 'tab' on line 5.  The problem
appears to be in variable_decl() (decl.c), where I kept an extra gfc_array_spec
(cp_as) that isn't merged with current_as.  I'm trying to recall why cp_as was
necessary, and whether it's still necessary.


-- 

langton at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |langton2 at llnl dot gov


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-05-12 15:57 ` langton at gcc dot gnu dot org
@ 2010-05-12 16:51 ` langton at gcc dot gnu dot org
  2010-05-12 19:37 ` langton at gcc dot gnu dot org
  2010-05-12 22:15 ` langton at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: langton at gcc dot gnu dot org @ 2010-05-12 16:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from langton at gcc dot gnu dot org  2010-05-12 16:51 -------
Created an attachment (id=20651)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20651&action=view)
Possible fix (minimal testing)

Removing cp_as entirely seems to work.  I'll have to test this some more.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2010-05-12 16:51 ` langton at gcc dot gnu dot org
@ 2010-05-12 19:37 ` langton at gcc dot gnu dot org
  2010-05-12 22:15 ` langton at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: langton at gcc dot gnu dot org @ 2010-05-12 19:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from langton at gcc dot gnu dot org  2010-05-12 19:37 -------
The patch I posted isn't correct.  It causes a regression in
gfortran.dg/cray_pointers_2.f90.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug fortran/37039] Cray pointer with pointee DIMENSION statement after POINTER statement
  2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2010-05-12 19:37 ` langton at gcc dot gnu dot org
@ 2010-05-12 22:15 ` langton at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: langton at gcc dot gnu dot org @ 2010-05-12 22:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from langton at gcc dot gnu dot org  2010-05-12 22:14 -------
Created an attachment (id=20653)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20653&action=view)
decl.c patch

Trying again: this patch fixes the bug in the testcase and passes regression
testing.


-- 

langton at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20651|0                           |1
        is obsolete|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-05-12 22:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-06 19:14 [Bug fortran/37039] New: Cray pointer with pointee DIMENSION statement after POINTER statement burnus at gcc dot gnu dot org
2009-03-29  8:26 ` [Bug fortran/37039] " fxcoudert at gcc dot gnu dot org
2010-02-10 19:39 ` langton at gcc dot gnu dot org
2010-05-09 20:40 ` dfranke at gcc dot gnu dot org
2010-05-12 10:06 ` dfranke at gcc dot gnu dot org
2010-05-12 15:57 ` langton at gcc dot gnu dot org
2010-05-12 16:51 ` langton at gcc dot gnu dot org
2010-05-12 19:37 ` langton at gcc dot gnu dot org
2010-05-12 22:15 ` langton at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).