public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29284] New: ICE for optional subroutine argument
@ 2006-09-29 8:13 rakuen_himawari at yahoo dot co dot jp
2006-09-29 8:20 ` [Bug fortran/29284] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: rakuen_himawari at yahoo dot co dot jp @ 2006-09-29 8:13 UTC (permalink / raw)
To: gcc-bugs
$ gfortran --version
GNU Fortran 95 (GCC) 4.2.0 20060923 (experimental)
$ cat foo.f90
MODULE foo
CONTAINS
SUBROUTINE sub1(a)
CHARACTER (LEN=*), OPTIONAL :: a
WRITE(*,*) 'foo bar'
END SUBROUTINE sub1
SUBROUTINE sub2
CALL sub1()
END SUBROUTINE sub2
END MODULE foo
$ gfortran -c foo.f90
foo.f90: In function ^[$B!F^[(Bsub2^[$B!G^[(B:
foo.f90:3: internal compiler error: Segmentation fault
gcc-4.2-20060812 can compile the same code.
--
Summary: ICE for optional subroutine argument
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rakuen_himawari at yahoo dot co dot jp
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=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
@ 2006-09-29 8:20 ` pinskia at gcc dot gnu dot org
2006-10-01 9:23 ` pault at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-29 8:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-09-29 08:20 -------
4.1.2 20060917 also fails.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Known to fail| |4.1.2 4.2.0
Known to work| |4.1.1
Last reconfirmed|0000-00-00 00:00:00 |2006-09-29 08:20:03
date| |
Summary|ICE for optional subroutine |[4.1/4.2 Regression] ICE for
|argument |optional subroutine argument
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
2006-09-29 8:20 ` [Bug fortran/29284] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-10-01 9:23 ` pault at gcc dot gnu dot org
2006-10-01 13:45 ` patchapp at dberlin dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-01 9:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-10-01 09:23 -------
Created an attachment (id=12364)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12364&action=view)
Fix for this problem
This seems to be my doing - I forgot all about missing optionals when I
introduced this test. I will submit to the list, when it has finished
regression testing.
Thanks for the PR.
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
2006-09-29 8:20 ` [Bug fortran/29284] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-10-01 9:23 ` pault at gcc dot gnu dot org
@ 2006-10-01 13:45 ` patchapp at dberlin dot org
2006-10-01 15:28 ` rep dot nop at aon dot at
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: patchapp at dberlin dot org @ 2006-10-01 13:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from patchapp at dberlin dot org 2006-10-01 13:45 -------
Subject: Bug number PR29284
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-10/msg00011.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
` (2 preceding siblings ...)
2006-10-01 13:45 ` patchapp at dberlin dot org
@ 2006-10-01 15:28 ` rep dot nop at aon dot at
2006-10-01 19:59 ` paulthomas2 at wanadoo dot fr
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rep dot nop at aon dot at @ 2006-10-01 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rep dot nop at aon dot at 2006-10-01 15:28 -------
Note that i don't think i can approve anything.
This patch fixes the following ICE for me:
http://gcc.gnu.org/ml/fortran/2006-09/msg00460.html
$ cat no.f90
MODULE MOD1
CONTAINS
SUBROUTINE SUB1(arg)
IMPLICIT NONE
CHARACTER (LEN=*), OPTIONAL :: arg
IF (PRESENT(arg)) WRITE(0,*) 'arg was ', arg
STOP
END SUBROUTINE SUB1
SUBROUTINE SUB2
CALL SUB1
END SUBROUTINE SUB2
END MODULE
Used to give before this fix
$ gfortran-4.2-HEAD -c no.f90
no.f90: In function 'sub2':
no.f90:3: internal compiler error: Segmentation fault
And with the fix compiles now as expected.
PS: Just curious..
Why isn't this part of gfc_conv_function_call() coded to check for fsym once
and only then have the additional checks?
if (fsym)
{
CHECKS_NOT_INVOLVING_e;
if (e)
{
CHECK_e_STUFF;
}
}
It doesn't look like the order of most of these is significant since very
different things are checked, so there should be no risk in writing this in a
sleek manner.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
` (3 preceding siblings ...)
2006-10-01 15:28 ` rep dot nop at aon dot at
@ 2006-10-01 19:59 ` paulthomas2 at wanadoo dot fr
2006-10-01 23:05 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2006-10-01 19:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paulthomas2 at wanadoo dot fr 2006-10-01 19:59 -------
Subject: Re: [4.1/4.2 Regression] ICE for optional subroutine
argument
Dear All,
>PS: Just curious..
>Why isn't this part of gfc_conv_function_call() coded to check for fsym once
>and only then have the additional checks?
>
>if (fsym)
> {
> CHECKS_NOT_INVOLVING_e;
> if (e)
> {
> CHECK_e_STUFF;
> }
> }
>
>It doesn't look like the order of most of these is significant since very
>different things are checked, so there should be no risk in writing this in a
>sleek manner.
>
>
>
>
...because it grew like Topsy. An occasion was always going to occur,
like now, when it would get rationlised.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
` (4 preceding siblings ...)
2006-10-01 19:59 ` paulthomas2 at wanadoo dot fr
@ 2006-10-01 23:05 ` mmitchel at gcc dot gnu dot org
2006-10-03 20:13 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-01 23:05 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
` (5 preceding siblings ...)
2006-10-01 23:05 ` mmitchel at gcc dot gnu dot org
@ 2006-10-03 20:13 ` pault at gcc dot gnu dot org
2006-10-03 20:16 ` pault at gcc dot gnu dot org
2006-10-24 8:06 ` fxcoudert at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-03 20:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2006-10-03 20:13 -------
Subject: Bug 29284
Author: pault
Date: Tue Oct 3 20:13:03 2006
New Revision: 117413
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117413
Log:
2006-10-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29284
PR fortran/29321
PR fortran/29322
* trans-expr.c (gfc_conv_function_call): Check the expression
and the formal symbol are present when testing the actual
argument.
PR fortran/25091
PR fortran/25092
* resolve.c (resolve_entries): It is an error if the entries
of an array-valued function do not have the same shape.
2006-10-03 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29284
* gfortran.dg/optional_assumed_charlen_1.f90: New test.
PR fortran/29321
PR fortran/29322
* gfortran.dg/missing_optional_dummy_2.f90: New test.
PR fortran/25091
PR fortran/25092
* gfortran.dg/entry_array_specs_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/entry_array_specs_1.f90
trunk/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
trunk/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
` (6 preceding siblings ...)
2006-10-03 20:13 ` pault at gcc dot gnu dot org
@ 2006-10-03 20:16 ` pault at gcc dot gnu dot org
2006-10-24 8:06 ` fxcoudert at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-03 20:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2006-10-03 20:16 -------
Fixed on trunk
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=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/29284] [4.1/4.2 Regression] ICE for optional subroutine argument
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
` (7 preceding siblings ...)
2006-10-03 20:16 ` pault at gcc dot gnu dot org
@ 2006-10-24 8:06 ` fxcoudert at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2006-10-24 8:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from fxcoudert at gcc dot gnu dot org 2006-10-24 08:06 -------
Subject: Bug 29284
Author: fxcoudert
Date: Tue Oct 24 08:05:55 2006
New Revision: 117996
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117996
Log:
A bunch of backports:
PR fortran/29284
PR fortran/29321
PR fortran/29322
* trans-expr.c (gfc_conv_function_call): Check the expression
and the formal symbol are present when testing the actual
argument.
PR fortran/25091
PR fortran/25092
* resolve.c (resolve_entries): It is an error if the entries
of an array-valued function do not have the same shape.
PR fortran/29284
* gfortran.dg/optional_assumed_charlen_1.f90: New test.
PR fortran/29321
PR fortran/29322
* gfortran.dg/missing_optional_dummy_2.f90: New test.
PR fortran/25091
PR fortran/25092
* gfortran.dg/entry_array_specs_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/entry_array_specs_1.f90
- copied unchanged from r117413,
trunk/gcc/testsuite/gfortran.dg/entry_array_specs_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
- copied unchanged from r117413,
trunk/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
- copied unchanged from r117413,
trunk/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29284
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-10-24 8:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-29 8:13 [Bug fortran/29284] New: ICE for optional subroutine argument rakuen_himawari at yahoo dot co dot jp
2006-09-29 8:20 ` [Bug fortran/29284] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-10-01 9:23 ` pault at gcc dot gnu dot org
2006-10-01 13:45 ` patchapp at dberlin dot org
2006-10-01 15:28 ` rep dot nop at aon dot at
2006-10-01 19:59 ` paulthomas2 at wanadoo dot fr
2006-10-01 23:05 ` mmitchel at gcc dot gnu dot org
2006-10-03 20:13 ` pault at gcc dot gnu dot org
2006-10-03 20:16 ` pault at gcc dot gnu dot org
2006-10-24 8:06 ` 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).