public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29755] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
@ 2006-11-07 22:14 ` burnus at gcc dot gnu dot org
  2006-11-08 10:01 ` patchapp at dberlin dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-07 22:14 UTC (permalink / raw)
  To: gcc-bugs



-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |burnus at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-07 22:14:15
               date|                            |


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


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

* [Bug fortran/29755]  New: ICE on same name in subroutine and program
@ 2006-11-07 22:14 burnus at gcc dot gnu dot org
  2006-11-07 22:14 ` [Bug fortran/29755] " burnus 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 @ 2006-11-07 22:14 UTC (permalink / raw)
  To: gcc-bugs

import.f90:9:

    subroutine foo(x)
                 1
Error: PROGRAM attribute conflicts with PROCEDURE attribute at (1)
import.f90:0: internal compiler error: Segmentation fault

---------
program foo
  type myType
    integer :: i
  end type myType
  interface
    subroutine foo(x)
      type(myType) :: i
    end subroutine foo
  end interface
  call foo()
end program foo
---------

The crash occurs in decl.c in the line:
if (current_ts.type == BT_DERIVED
    && gfc_current_ns->proc_name->attr.if_source == IFSRC_IFBODY
since gfc_current_ns->proc_name == NULL

I have a patch for this.


-- 
           Summary: ICE on same name in subroutine and program
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          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=29755


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

* [Bug fortran/29755] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
  2006-11-07 22:14 ` [Bug fortran/29755] " burnus at gcc dot gnu dot org
@ 2006-11-08 10:01 ` patchapp at dberlin dot org
  2006-11-08 22:23 ` [Bug fortran/29755] [4.2 only] " burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: patchapp at dberlin dot org @ 2006-11-08 10:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from patchapp at dberlin dot org  2006-11-08 10:01 -------
Subject: Bug number PR29755

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-11/msg00465.html


-- 


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


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

* [Bug fortran/29755] [4.2 only] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
  2006-11-07 22:14 ` [Bug fortran/29755] " burnus at gcc dot gnu dot org
  2006-11-08 10:01 ` patchapp at dberlin dot org
@ 2006-11-08 22:23 ` burnus at gcc dot gnu dot org
  2006-11-08 22:24 ` burnus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-08 22:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2006-11-08 22:23 -------
On the trunk, the ICE is fixed by some other check in.
It still occurs on the 4.2 branch (r118599, current version)

Using my patch on the current trunk (118597) causes lots of regression, i.e.
either the trunk has changed or my patch is nonsense or both.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2006-11-07 22:14:15         |2006-11-08 22:23:12
               date|                            |
            Summary|ICE on same name in         |[4.2 only] ICE on same name
                   |subroutine and program      |in subroutine and program


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


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

* [Bug fortran/29755] [4.2 only] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-11-08 22:24 ` burnus at gcc dot gnu dot org
@ 2006-11-08 22:24 ` burnus at gcc dot gnu dot org
  2006-11-08 22:36 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-08 22:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUSPENDED                   |NEW
   Last reconfirmed|2006-11-08 22:23:12         |2006-11-08 22:24:16
               date|                            |


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


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

* [Bug fortran/29755] [4.2 only] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-11-08 22:23 ` [Bug fortran/29755] [4.2 only] " burnus at gcc dot gnu dot org
@ 2006-11-08 22:24 ` burnus at gcc dot gnu dot org
  2006-11-08 22:24 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-08 22:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |SUSPENDED


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


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

* [Bug fortran/29755] [4.2 only] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-11-08 22:24 ` burnus at gcc dot gnu dot org
@ 2006-11-08 22:36 ` burnus at gcc dot gnu dot org
  2006-11-10  7:43 ` pault at gcc dot gnu dot org
  2006-11-10 17:14 ` pault at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-11-08 22:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2006-11-08 22:35 -------
Just for completeness, the ICE also occurs with 4.1

! { dg-do compile }
! { dg-shouldfail "same name of program and subroutine" }
! Tests whether ICE occurs when using the same name
! for a subroutine as for the program
! PR fortran/29755
program foo
  type myType
    integer :: i
  end type myType
  interface
    subroutine foo(x)! { dg-error "PROGRAM attribute conflicts with PROCEDURE"
}
      type(myType) :: i! { dg-error "Unexpected data declaration statement" }
    end subroutine foo ! { dg-error "Expecting END INTERFACE statement" }
  end interface
  call foo() ! { dg-error "PROGRAM attribute conflicts with PROCEDURE" }
end program foo


-- 


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


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

* [Bug fortran/29755] [4.2 only] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-11-08 22:36 ` burnus at gcc dot gnu dot org
@ 2006-11-10  7:43 ` pault at gcc dot gnu dot org
  2006-11-10 17:14 ` pault at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-10  7:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pault at gcc dot gnu dot org  2006-11-10 07:43 -------
Tobias,

This is fixed by the patch for PR fortran/29539 and PR fortran/29634.  It will
be committed to 4.2 this weekend and to 4.1 as soon as I can.

I will close this PR when I do 4.2; I do not think that it necessary or useful
to add a test to the testsuite, since the error is detected correctly and is
tested elsewhere.

With 4.1, I am running ~10 bug fixes behind.  About 50% of the backports are
not applying cleanly, which is slowing me up some.

Paul



-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-11-08 22:24:16         |2006-11-10 07:43:18
               date|                            |


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


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

* [Bug fortran/29755] [4.2 only] ICE on same name in subroutine and program
  2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-11-10  7:43 ` pault at gcc dot gnu dot org
@ 2006-11-10 17:14 ` pault at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-10 17:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2006-11-10 17:13 -------
Fixed on trunk and 4.2.

It will be fixed on 4.1 just as soon as I catch up with myself.

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=29755


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

end of thread, other threads:[~2006-11-10 17:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-07 22:14 [Bug fortran/29755] New: ICE on same name in subroutine and program burnus at gcc dot gnu dot org
2006-11-07 22:14 ` [Bug fortran/29755] " burnus at gcc dot gnu dot org
2006-11-08 10:01 ` patchapp at dberlin dot org
2006-11-08 22:23 ` [Bug fortran/29755] [4.2 only] " burnus at gcc dot gnu dot org
2006-11-08 22:24 ` burnus at gcc dot gnu dot org
2006-11-08 22:24 ` burnus at gcc dot gnu dot org
2006-11-08 22:36 ` burnus at gcc dot gnu dot org
2006-11-10  7:43 ` pault at gcc dot gnu dot org
2006-11-10 17:14 ` pault 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).