public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24549]  New: gfortran: IMPORT of f2003 not yet implemented, ICE
@ 2005-10-26 21:31 anlauf at gmx dot de
  2005-10-27 23:13 ` [Bug fortran/24549] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: anlauf at gmx dot de @ 2005-10-26 21:31 UTC (permalink / raw)
  To: gcc-bugs

Hi,

the IMPORT statement of Fortran2003 is not yet implemented.
Trying to use it provokes an ICE:

module gfcbug29_import
  integer, parameter :: dp = kind (1d0)

  interface
     subroutine foo (x)
       import :: dp
       real (kind=dp) :: x
     end subroutine foo
  end interface

end module gfcbug29_import


% gfortran -c -std=f2003 gfcbug29.f90
 In file gfcbug29.f90:6

       import :: dp
      1
Error: Unclassifiable statement at (1)
gfcbug29.f90:0: internal compiler error: Segmentation fault

See the Fortran2003 draft, tables 2.1, 2.2, and section 12.3.2.1
about interface blocks.

Cheers,
-ha


-- 
           Summary: gfortran: IMPORT of f2003 not yet implemented, ICE
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de
  GCC host triplet: i686-pc-linux-gnu


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


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

* [Bug fortran/24549] gfortran: IMPORT of f2003 not yet implemented, ICE
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
@ 2005-10-27 23:13 ` pinskia at gcc dot gnu dot org
  2005-11-07 12:58 ` [Bug fortran/24549] ICE with invalid pseudo-declaration statement tobi at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-27 23:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-27 23:13 -------
Confirmed.


-- 

pinskia 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         |2005-10-27 23:13:51
               date|                            |


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


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

* [Bug fortran/24549] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
  2005-10-27 23:13 ` [Bug fortran/24549] " pinskia at gcc dot gnu dot org
@ 2005-11-07 12:58 ` tobi at gcc dot gnu dot org
  2006-01-09 22:35 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-11-07 12:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from tobi at gcc dot gnu dot org  2005-11-07 12:58 -------
I'm marking this ice-on-invalid-code, as it is not valid Fortran 95 and the bug
is unrelated to the use of IMPORT, the following ICEs the same way:
  module gfcbug29_import
  interface
     subroutine foo (x)
       something :: dp
       real (kind=dp) :: x
     end subroutine foo
  end interface
end module gfcbug29_import


-- 

tobi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tobi at gcc dot gnu dot org
           Keywords|                            |ice-on-invalid-code
            Summary|gfortran: IMPORT of f2003   |ICE with invalid pseudo-
                   |not yet implemented, ICE    |declaration statement


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


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

* [Bug fortran/24549] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
  2005-10-27 23:13 ` [Bug fortran/24549] " pinskia at gcc dot gnu dot org
  2005-11-07 12:58 ` [Bug fortran/24549] ICE with invalid pseudo-declaration statement tobi at gcc dot gnu dot org
@ 2006-01-09 22:35 ` pinskia at gcc dot gnu dot org
  2006-05-10  9:07 ` fxcoudert at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-09 22:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-01-09 22:35 -------
This is weird as I cannot reproduce it on powerpc-darwin but can on
x86_64-linux-gnu.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
   GCC host triplet|i686-pc-linux-gnu           |


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



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

* [Bug fortran/24549] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (2 preceding siblings ...)
  2006-01-09 22:35 ` pinskia at gcc dot gnu dot org
@ 2006-05-10  9:07 ` fxcoudert at gcc dot gnu dot org
  2006-05-10 14:37 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-10  9:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2006-05-10 09:07 -------
I can reproduce this ICE with mainline on i686-linux. I propose the following
patch:

Index: parse.c
===================================================================
--- parse.c     (revision 113603)
+++ parse.c     (working copy)
@@ -1292,7 +1292,7 @@
 static void
 reject_statement (void)
 {
-
+  gfc_new_block = NULL;
   gfc_undo_symbols ();
   gfc_clear_warning ();
   undo_new_statement ();

(see http://gcc.gnu.org/ml/fortran/2006-05/msg00122.html for details).


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/fortra
                   |                            |n/2006-05/msg00122.html
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2006-01-27 20:52:12         |2006-05-10 09:07:27
               date|                            |


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


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

* [Bug fortran/24549] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (3 preceding siblings ...)
  2006-05-10  9:07 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-10 14:37 ` fxcoudert at gcc dot gnu dot org
  2006-05-10 14:51 ` fxcoudert at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-10 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2006-05-10 14:37 -------
*** Bug 27487 has been marked as a duplicate of this bug. ***


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/24549] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (4 preceding siblings ...)
  2006-05-10 14:37 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-10 14:51 ` fxcoudert at gcc dot gnu dot org
  2006-05-10 21:53 ` [Bug fortran/24549] [4.1 only] " anlauf at gmx dot de
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-10 14:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2006-05-10 14:51 -------
Subject: Bug 24549

Author: fxcoudert
Date: Wed May 10 14:51:26 2006
New Revision: 113671

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113671
Log:
        PR fortran/24549
        * parse.c (reject_statement): Clear gfc_new_block.
        * gfortran.dg/error_recovery_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/error_recovery_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/parse.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/24549] [4.1 only] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (5 preceding siblings ...)
  2006-05-10 14:51 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-10 21:53 ` anlauf at gmx dot de
  2006-05-11  6:09 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: anlauf at gmx dot de @ 2006-05-10 21:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from anlauf at gmx dot de  2006-05-10 21:53 -------
(In reply to comment #5)
> *** Bug 27487 has been marked as a duplicate of this bug. ***

Well, first of all I have to admit that I am only a Fortran user.
But PR 27487 is only a duplicate because Tobias changed the
subject of my original entry, which was a request for the
implementation of F2003 IMPORT.

FX: Fixing gfortran's error recovery is not the answer to this PR,
but to the other one.  For this reason it seems more reasonable
to change the status of PR 27487 back and move your patch there.
Next, the subject of this PR should be reset to my original one,
as IMPORT is required for F2003 support, see PR 20585.


-- 


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


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

* [Bug fortran/24549] [4.1 only] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (6 preceding siblings ...)
  2006-05-10 21:53 ` [Bug fortran/24549] [4.1 only] " anlauf at gmx dot de
@ 2006-05-11  6:09 ` fxcoudert at gcc dot gnu dot org
  2006-05-11 21:39 ` fxcoudert at gcc dot gnu dot org
  2006-05-11 21:40 ` fxcoudert at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-11  6:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from fxcoudert at gcc dot gnu dot org  2006-05-11 06:08 -------
(In reply to comment #7)
> FX: Fixing gfortran's error recovery is not the answer to this PR,
> but to the other one.

Yes, I know. Since this PR was already used for tracking the ICE, I planned on
opening a new PR for the F2003 IMPORT feature when this one was resolved. It is
now filed as PR 27546 (and you're in the CC list).


-- 


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


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

* [Bug fortran/24549] [4.1 only] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (7 preceding siblings ...)
  2006-05-11  6:09 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-11 21:39 ` fxcoudert at gcc dot gnu dot org
  2006-05-11 21:40 ` fxcoudert at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-11 21:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from fxcoudert at gcc dot gnu dot org  2006-05-11 21:39 -------
Subject: Bug 24549

Author: fxcoudert
Date: Thu May 11 21:39:06 2006
New Revision: 113713

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113713
Log:
        PR fortran/20460
        PR fortran/24549
        * parse.c (reject_statement): Clear gfc_new_block.
        * resolve.c (gfc_resolve_index): Make REAL array indices a
        GFC_STD_LEGACY feature.
        * gfortran.dg/error_recovery_1.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/error_recovery_1.f90
      - copied unchanged from r113671,
trunk/gcc/testsuite/gfortran.dg/error_recovery_1.f90
Modified:
    branches/gcc-4_1-branch/gcc/fortran/ChangeLog
    branches/gcc-4_1-branch/gcc/fortran/parse.c
    branches/gcc-4_1-branch/gcc/fortran/resolve.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/24549] [4.1 only] ICE with invalid pseudo-declaration statement
  2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
                   ` (8 preceding siblings ...)
  2006-05-11 21:39 ` fxcoudert at gcc dot gnu dot org
@ 2006-05-11 21:40 ` fxcoudert at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-05-11 21:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from fxcoudert at gcc dot gnu dot org  2006-05-11 21:39 -------
Fixed on mainline and 4.1.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|4.1.1                       |
      Known to work|4.2.0                       |4.2.0 4.1.1
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.1


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


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

end of thread, other threads:[~2006-05-11 21:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-26 21:31 [Bug fortran/24549] New: gfortran: IMPORT of f2003 not yet implemented, ICE anlauf at gmx dot de
2005-10-27 23:13 ` [Bug fortran/24549] " pinskia at gcc dot gnu dot org
2005-11-07 12:58 ` [Bug fortran/24549] ICE with invalid pseudo-declaration statement tobi at gcc dot gnu dot org
2006-01-09 22:35 ` pinskia at gcc dot gnu dot org
2006-05-10  9:07 ` fxcoudert at gcc dot gnu dot org
2006-05-10 14:37 ` fxcoudert at gcc dot gnu dot org
2006-05-10 14:51 ` fxcoudert at gcc dot gnu dot org
2006-05-10 21:53 ` [Bug fortran/24549] [4.1 only] " anlauf at gmx dot de
2006-05-11  6:09 ` fxcoudert at gcc dot gnu dot org
2006-05-11 21:39 ` fxcoudert at gcc dot gnu dot org
2006-05-11 21:40 ` fxcoudert 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).