public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface
@ 2006-06-29 12:55 daniel dot franke at imbs dot uni-luebeck dot de
2006-06-29 22:30 ` [Bug fortran/28201] " pault at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: daniel dot franke at imbs dot uni-luebeck dot de @ 2006-06-29 12:55 UTC (permalink / raw)
To: gcc-bugs
$> cat ice.f90
MODULE ice_gfortran
INTERFACE ice
MODULE PROCEDURE ice_i
END INTERFACE
CONTAINS
SUBROUTINE ice_i(i)
INTEGER, INTENT(IN) :: i
! do nothing
END SUBROUTINE
END MODULE
MODULE provoke_ice
CONTAINS
SUBROUTINE provoke
USE ice_gfortran
CALL ice(23.0)
END SUBROUTINE
END MODULE
PROGRAM xxx
USE provoke_ice
CALL provoke
END PROGRAM
$> gfortran-4.1.1 -g ice.f90
ice.f90:3: internal compiler error: Segmentation fault
Please submit a full bug report,
Without the intermediate module 'provoke_ice', an error is reported:
$> cat no-ice.f90
MODULE ice_gfortran
INTERFACE ice
MODULE PROCEDURE ice_i
END INTERFACE
CONTAINS
SUBROUTINE ice_i(i)
INTEGER, INTENT(IN) :: i
! do nothing
END SUBROUTINE
END MODULE
PROGRAM xxx
USE ice_gfortran
CALL ice(23.0)
END PROGRAM
$> gfortran-4.1.1 -g no-ice.f90
In file no-ice.f90:15
CALL ice(23.0)
1
Error: Generic subroutine 'ice' at (1) is not an intrinsic subroutine
--
Summary: gfortran ICE if argument list does not match generic
interface
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: daniel dot franke at imbs dot uni-luebeck dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/28201] gfortran ICE if argument list does not match generic interface
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
@ 2006-06-29 22:30 ` pault at gcc dot gnu dot org
2006-07-07 18:46 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-06-29 22:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2006-06-29 22:28 -------
(gdb) run pr28201.f90
Starting program: /svn-4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/f951 pr28201.f90
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xc7b000
ice_i
Program received signal SIGSEGV, Segmentation fault.
resolve_call (c=0x8b12420) at ../../trunk/gcc/fortran/resolve.c:1518
1518 if (!gfc_generic_intrinsic (sym->name))
(gdb) backtrace
#0 resolve_call (c=0x8b12420) at ../../trunk/gcc/fortran/resolve.c:1518
#1 0x080909d8 in resolve_code (code=Variable "code" is not available.
)
at ../../trunk/gcc/fortran/resolve.c:4731
#2 0x080921d8 in resolve_codes (ns=0x8b323e8)
at ../../trunk/gcc/fortran/resolve.c:6582
#3 0x08092233 in gfc_resolve (ns=0x8b323e8)
at ../../trunk/gcc/fortran/resolve.c:6606
#4 0x080875b9 in gfc_parse_file () at ../../trunk/gcc/fortran/parse.c:3190
#5 0x080a861d in gfc_be_parse_file (set_yydebug=0)
at ../../trunk/gcc/fortran/f95-lang.c:303
#6 0x0839be8a in toplev_main (argc=2, argv=0xbfbee314)
at ../../trunk/gcc/toplev.c:999
#7 0x080dbf2f in main (argc=Cannot access memory at address 0xffffffff
) at ../../trunk/gcc/main.c:35
Thanks for the report
Paul
--
pault 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 |2006-06-29 22:28:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/28201] gfortran ICE if argument list does not match generic interface
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
2006-06-29 22:30 ` [Bug fortran/28201] " pault at gcc dot gnu dot org
@ 2006-07-07 18:46 ` pault at gcc dot gnu dot org
2006-07-08 13:35 ` patchapp at dberlin dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-07 18:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-07-07 18:46 -------
This fixes the fault and i presently regtesting:
Index: gcc/fortran/resolve.c
===================================================================
*** gcc/fortran/resolve.c (revision 115245)
--- gcc/fortran/resolve.c (working copy)
*************** resolve_generic_s (gfc_code * c)
*** 1500,1508 ****
if (m == MATCH_ERROR)
return FAILURE;
! if (sym->ns->parent != NULL)
{
! gfc_find_symbol (sym->name, sym->ns->parent, 1, &sym);
if (sym != NULL)
{
m = resolve_generic_s0 (c, sym);
--- 1500,1511 ----
if (m == MATCH_ERROR)
return FAILURE;
! if (sym->ns->parent != NULL || sym->attr.use_assoc)
{
! if (sym->attr.use_assoc)
! gfc_find_symbol (sym->name, sym->ns, 1, &sym);
! else
! gfc_find_symbol (sym->name, sym->ns->parent, 1, &sym);
if (sym != NULL)
{
m = resolve_generic_s0 (c, sym);
If all is well, I will prepare a testsuite case and submit tomorrow.
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=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/28201] gfortran ICE if argument list does not match generic interface
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
2006-06-29 22:30 ` [Bug fortran/28201] " pault at gcc dot gnu dot org
2006-07-07 18:46 ` pault at gcc dot gnu dot org
@ 2006-07-08 13:35 ` patchapp at dberlin dot org
2006-07-16 15:02 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-07-08 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from patchapp at dberlin dot org 2006-07-08 13:35 -------
Subject: Bug number PR28201
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-07/msg00371.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/28201] gfortran ICE if argument list does not match generic interface
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
` (2 preceding siblings ...)
2006-07-08 13:35 ` patchapp at dberlin dot org
@ 2006-07-16 15:02 ` pault at gcc dot gnu dot org
2006-07-16 17:17 ` pault at gcc dot gnu dot org
2006-07-16 17:19 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-16 15:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-07-16 15:02 -------
Subject: Bug 28201
Author: pault
Date: Sun Jul 16 15:01:59 2006
New Revision: 115499
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115499
Log:
2006-07-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28384
* trans-common.c (translate_common): If common_segment is NULL
emit error that common block does not exist.
PR fortran/20844
* io.c (check_io_constraints): It is an error if an ADVANCE
specifier appears without an explicit format.
PR fortran/28201
* resolve.c (resolve_generic_s): For a use_associated function,
do not search for an alternative symbol in the parent name
space.
PR fortran/20893
* resolve.c (resolve_elemental_actual): New function t combine
all the checks of elemental procedure actual arguments. In
addition, check of array valued optional args(this PR) has
been added.
(resolve_function, resolve_call): Remove parts that treated
elemental procedure actual arguments and call the above.
2006-07-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20844
* gfortran.dg/io_constaints_2.f90: Add the test for ADVANCE
specifiers requiring an explicit format tag..
PR fortran/28201
* gfortran.dg/generic_5: New test.
PR fortran/20893
* gfortran.dg/elemental_optional_args_1.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/elemental_optional_args_1.f90
trunk/gcc/testsuite/gfortran.dg/generic_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/io.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-common.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/io_constraints_2.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/28201] gfortran ICE if argument list does not match generic interface
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
` (3 preceding siblings ...)
2006-07-16 15:02 ` pault at gcc dot gnu dot org
@ 2006-07-16 17:17 ` pault at gcc dot gnu dot org
2006-07-16 17:19 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-16 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2006-07-16 17:17 -------
Subject: Bug 28201
Author: pault
Date: Sun Jul 16 17:17:04 2006
New Revision: 115502
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115502
Log:
2006-07-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28384
* trans-common.c (translate_common): If common_segment is NULL
emit error that common block does not exist.
PR fortran/20844
* io.c (check_io_constraints): It is an error if an ADVANCE
specifier appears without an explicit format.
PR fortran/28201
* resolve.c (resolve_generic_s): For a use_associated function,
do not search for an alternative symbol in the parent name
space.
PR fortran/20893
* resolve.c (resolve_elemental_actual): New function t combine
all the checks of elemental procedure actual arguments. In
addition, check of array valued optional args(this PR) has
been added.
(resolve_function, resolve_call): Remove parts that treated
elemental procedure actual arguments and call the above.
PR fortran/28353
* trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
that intent is INOUT (fixes regression).
PR fortran/25097
* check.c (check_present): The only permitted reference is a
full array reference.
PR fortran/20903
* decl.c (variable_decl): Add error if a derived type is not
from the current namespace if the namespace is an interface
body.
2006-07-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20844
* gfortran.dg/io_constaints_2.f90: Add the test for ADVANCE
specifiers requiring an explicit format tag..
PR fortran/28201
* gfortran.dg/generic_5: New test.
PR fortran/20893
* gfortran.dg/elemental_optional_args_1.f90: New test.
PR fortran/25097
* gfortran.dg/present_1.f90: New test.
PR fortran/20903
* gfortran.dg/interface_derived_type_1.f90: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/elemental_optional_args_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/generic_5.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/present_1.f90
Modified:
branches/gcc-4_1-branch/gcc/fortran/ChangeLog
branches/gcc-4_1-branch/gcc/fortran/check.c
branches/gcc-4_1-branch/gcc/fortran/decl.c
branches/gcc-4_1-branch/gcc/fortran/io.c
branches/gcc-4_1-branch/gcc/fortran/resolve.c
branches/gcc-4_1-branch/gcc/fortran/trans-common.c
branches/gcc-4_1-branch/gcc/fortran/trans-expr.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/io_constraints_2.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/28201] gfortran ICE if argument list does not match generic interface
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
` (4 preceding siblings ...)
2006-07-16 17:17 ` pault at gcc dot gnu dot org
@ 2006-07-16 17:19 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-07-16 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2006-07-16 17:19 -------
Fixed on trunk and 4.2
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=28201
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-07-16 17:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-29 12:55 [Bug fortran/28201] New: gfortran ICE if argument list does not match generic interface daniel dot franke at imbs dot uni-luebeck dot de
2006-06-29 22:30 ` [Bug fortran/28201] " pault at gcc dot gnu dot org
2006-07-07 18:46 ` pault at gcc dot gnu dot org
2006-07-08 13:35 ` patchapp at dberlin dot org
2006-07-16 15:02 ` pault at gcc dot gnu dot org
2006-07-16 17:17 ` pault at gcc dot gnu dot org
2006-07-16 17:19 ` 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).