public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31483]  New: ICE on fortran Code
@ 2007-04-05  7:03 M dot Froehlich at science-computing dot de
  2007-04-05  8:31 ` [Bug fortran/31483] " pault at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: M dot Froehlich at science-computing dot de @ 2007-04-05  7:03 UTC (permalink / raw)
  To: gcc-bugs

I get an ICE with gfortran on the following code:

$ cat ice.F
      SUBROUTINE PHLOAD (READER,*)
      IMPLICIT NONE
      EXTERNAL         READER
      CALL READER (*1)
 1    RETURN 1
      END

$ gfortran -S ice.F
ice.F: In function 'phload':
ice.F:1: internal compiler error: in gfc_conv_function_call, at
fortran/trans-expr.c:2401
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

$ gfortran -v      
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/scr/kuma/froehl/gcc-prefix
--with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib64
--with-mpfr-include=/usr/local/include --with-mpfr-lib=/usr/local/lib64
Thread model: posix
gcc version 4.3.0 20070404 (experimental)

That happens with gfortran from the gcc-4.1.{1,2} as well as with 20070404 svn
trunk version.


-- 
           Summary: ICE on fortran Code
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: M dot Froehlich at science-computing dot de
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug fortran/31483] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
@ 2007-04-05  8:31 ` pault at gcc dot gnu dot org
  2007-04-05  9:56 ` M dot Froehlich at science-computing dot de
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-05  8:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2007-04-05 09:31 -------
Created an attachment (id=13330)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13330&action=view)
Fix for the PR

The ICE is due to a gcc_assert blocking dummy procedures from having alternate
returns.  The fix, gives the procedure result the appropriate type and, as a
result, the following runs fine:

      SUBROUTINE R (i, *, *)
      INTEGER i
      RETURN i
      END

      SUBROUTINE PHLOAD (READER, i)
      IMPLICIT NONE
      EXTERNAL         READER
      integer i
      CALL READER (i, *1, *2)
 1    print *, "one"
      return
 2    print *, "two"
      return
      END

Give me a day or two to submit this one.

Paul
      EXTERNAL R
      call PHLOAD (R, 1)
      CALL PHLOAD (R, 2)
      END


-- 

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|UNCONFIRMED                 |ASSIGNED


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


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

* [Bug fortran/31483] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
  2007-04-05  8:31 ` [Bug fortran/31483] " pault at gcc dot gnu dot org
@ 2007-04-05  9:56 ` M dot Froehlich at science-computing dot de
  2007-04-05 10:02 ` fxcoudert at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: M dot Froehlich at science-computing dot de @ 2007-04-05  9:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from M dot Froehlich at science-computing dot de  2007-04-05 10:56 -------
Great!
Thank you very much!
... open source projects have the fastest response times!

The patch does not apply with 'patch' to gcc-4.1.2, but I could well hand patch
that. Do you expect problems when I apply that small patch to a gcc-4.1.2
release?

Or even better is there any chance to get that backported to the release
branches?

    Greetings
       Mathias


-- 


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


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

* [Bug fortran/31483] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
  2007-04-05  8:31 ` [Bug fortran/31483] " pault at gcc dot gnu dot org
  2007-04-05  9:56 ` M dot Froehlich at science-computing dot de
@ 2007-04-05 10:02 ` fxcoudert at gcc dot gnu dot org
  2007-04-05 12:15 ` patchapp at dberlin dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-05 10:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from fxcoudert at gcc dot gnu dot org  2007-04-05 11:01 -------
(In reply to comment #2)
> Or even better is there any chance to get that backported to the release
> branches?

It seems to be a regression wrt g77, which means it's possible that it will be
backported.


-- 


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


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

* [Bug fortran/31483] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
                   ` (2 preceding siblings ...)
  2007-04-05 10:02 ` fxcoudert at gcc dot gnu dot org
@ 2007-04-05 12:15 ` patchapp at dberlin dot org
  2007-04-05 14:06 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: patchapp at dberlin dot org @ 2007-04-05 12:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from patchapp at dberlin dot org  2007-04-05 13:15 -------
Subject: Bug number PR31483

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/2007-04/msg00171.html


-- 


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


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

* [Bug fortran/31483] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
                   ` (3 preceding siblings ...)
  2007-04-05 12:15 ` patchapp at dberlin dot org
@ 2007-04-05 14:06 ` pault at gcc dot gnu dot org
  2007-05-16 14:15 ` [Bug fortran/31483] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-04-05 14:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pault at gcc dot gnu dot org  2007-04-05 15:06 -------
Subject: Bug 31483

Author: pault
Date: Thu Apr  5 15:06:15 2007
New Revision: 123518

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123518
Log:
2007-04-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/31483
        * trans-expr.c (gfc_conv_function_call): Give a dummy
        procedure the correct type if it has alternate returns.

2007-04-05  Paul Thomas  <pault@gcc.gnu.org>

        PR fortran/31483
        * gfortran.dg/altreturn_5.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/altreturn_5.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/31483] [4.1/4.2 only] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
                   ` (4 preceding siblings ...)
  2007-04-05 14:06 ` pault at gcc dot gnu dot org
@ 2007-05-16 14:15 ` fxcoudert at gcc dot gnu dot org
  2007-05-22 14:32 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-16 14:15 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
  GCC build triplet|x86_64-unknown-linux-gnu    |
   GCC host triplet|x86_64-unknown-linux-gnu    |
 GCC target triplet|x86_64-unknown-linux-gnu    |
           Keywords|                            |ice-on-valid-code, patch
      Known to fail|                            |4.2.1 4.1.3
      Known to work|                            |4.3.0
            Summary|ICE on fortran Code         |[4.1/4.2 only] ICE on
                   |                            |fortran Code
   Target Milestone|---                         |4.2.1


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


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

* [Bug fortran/31483] [4.1/4.2 only] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
                   ` (5 preceding siblings ...)
  2007-05-16 14:15 ` [Bug fortran/31483] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
@ 2007-05-22 14:32 ` burnus at gcc dot gnu dot org
  2007-05-31 18:51 ` pault at gcc dot gnu dot org
  2007-05-31 18:52 ` pault at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-22 14:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from burnus at gcc dot gnu dot org  2007-05-22 15:32 -------
Paul, the 4.2 branch is open again, if you want you could backport this; it
seems to be a regession wrt g77.

Mark Mitchell: "GCC 4.2 branch open for regression fixes"
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg01018.html


-- 

burnus at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/31483] [4.1/4.2 only] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
                   ` (6 preceding siblings ...)
  2007-05-22 14:32 ` burnus at gcc dot gnu dot org
@ 2007-05-31 18:51 ` pault at gcc dot gnu dot org
  2007-05-31 18:52 ` pault at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-05-31 18:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pault at gcc dot gnu dot org  2007-05-31 18:51 -------
Subject: Bug 31483

Author: pault
Date: Thu May 31 18:50:56 2007
New Revision: 125235

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125235
Log:
2007-05-31  Paul Thomas  <pault@gcc.gnu.org>

        backport from trunk

        PR fortran/31483
        * trans-expr.c (gfc_conv_function_call): Give a dummy
        procedure the correct type if it has alternate returns.


        PR fortran/31540
        * resolve.c (resolve_fl_procedure): Resolve constant character
        lengths.

        PR fortran/31867
        PR fortran/31994
        * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
        offset for non-descriptor, source arrays and correct for stride
        not equal to one before writing to field of output descriptor.

2007-05-31  Paul Thomas  <pault@gcc.gnu.org>

        backport from trunk

        PR fortran/31483
        * gfortran.dg/altreturn_5.f90: New test.

        PR fortran/31540
        * gfortran.dg/char_result_5.f90: New test.

        PR fortran/31867
        * gfortran.dg/char_length_5.f90: New test.

        PR fortran/31994
        * gfortran.dg/array_reference_1.f90: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/altreturn_5.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/array_reference_1.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/char_length_5.f90
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/char_result_13.f90
Modified:
    branches/gcc-4_2-branch/gcc/fortran/ChangeLog
    branches/gcc-4_2-branch/gcc/fortran/resolve.c
    branches/gcc-4_2-branch/gcc/fortran/trans-array.c
    branches/gcc-4_2-branch/gcc/fortran/trans-expr.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/31483] [4.1/4.2 only] ICE on fortran Code
  2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
                   ` (7 preceding siblings ...)
  2007-05-31 18:51 ` pault at gcc dot gnu dot org
@ 2007-05-31 18:52 ` pault at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-05-31 18:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pault at gcc dot gnu dot org  2007-05-31 18:51 -------
Fixed

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


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

end of thread, other threads:[~2007-05-31 18:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-05  7:03 [Bug fortran/31483] New: ICE on fortran Code M dot Froehlich at science-computing dot de
2007-04-05  8:31 ` [Bug fortran/31483] " pault at gcc dot gnu dot org
2007-04-05  9:56 ` M dot Froehlich at science-computing dot de
2007-04-05 10:02 ` fxcoudert at gcc dot gnu dot org
2007-04-05 12:15 ` patchapp at dberlin dot org
2007-04-05 14:06 ` pault at gcc dot gnu dot org
2007-05-16 14:15 ` [Bug fortran/31483] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
2007-05-22 14:32 ` burnus at gcc dot gnu dot org
2007-05-31 18:51 ` pault at gcc dot gnu dot org
2007-05-31 18:52 ` 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).