public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29652] New: ambiguous interface declaration undetected
@ 2006-10-30 14:55 franke dot daniel at gmail dot com
2006-10-31 5:41 ` [Bug fortran/29652] " pault at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: franke dot daniel at gmail dot com @ 2006-10-30 14:55 UTC (permalink / raw)
To: gcc-bugs
The following code has an ambiguous interface, sub_a and sub_b are identical.
This is correctly reported as an error, if sub_a/sub_b are the only procedures
listed. Adding a third and different overload to the interface (sub_c), the
ambiguity in sub_a/sub_b goes undetected.
$> cat iface.f90
MODULE mod
INTERFACE iface
MODULE PROCEDURE sub_a
MODULE PROCEDURE sub_b
MODULE PROCEDURE sub_c
END INTERFACE
CONTAINS
SUBROUTINE sub_a(x)
INTEGER, INTENT(in) :: x
WRITE (*,*) 'A: ', x
END SUBROUTINE
SUBROUTINE sub_b(y)
INTEGER, INTENT(in) :: y
WRITE (*,*) 'B: ', y
END SUBROUTINE
SUBROUTINE sub_c(x, y)
REAL, INTENT(in) :: x, y
WRITE(*,*) x, y
END SUBROUTINE
END MODULE
PROGRAM test_interface
USE mod
CALL iface(42)
END PROGRAM
$> gfortran-svn -g -Wall iface.f90 && ./a.out
B: 42
$> gfortran-svn -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../svn/gcc/configure --prefix=$(localpath) --disable-nls
--enable-threads=posix --enable-shared --enable-bootstrap --with-system-zlib
--program-suffix=-svn --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.3.0 20061030 (experimental)
--
Summary: ambiguous interface declaration undetected
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: franke dot daniel at gmail dot com
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/29652] ambiguous interface declaration undetected
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
@ 2006-10-31 5:41 ` pault at gcc dot gnu dot org
2006-11-15 18:25 ` patchapp at dberlin dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-31 5:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2006-10-31 05:41 -------
OK, we are going to need a meta-bug for interfaces.
Confirmed accepts-invalid.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |accepts-invalid
Last reconfirmed|0000-00-00 00:00:00 |2006-10-31 05:41:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/29652] ambiguous interface declaration undetected
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
2006-10-31 5:41 ` [Bug fortran/29652] " pault at gcc dot gnu dot org
@ 2006-11-15 18:25 ` patchapp at dberlin dot org
2006-11-15 18:58 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-11-15 18:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from patchapp at dberlin dot org 2006-11-15 18:25 -------
Subject: Bug number PR29652
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/msg01067.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/29652] ambiguous interface declaration undetected
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
2006-10-31 5:41 ` [Bug fortran/29652] " pault at gcc dot gnu dot org
2006-11-15 18:25 ` patchapp at dberlin dot org
@ 2006-11-15 18:58 ` pault at gcc dot gnu dot org
2006-11-22 0:02 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-15 18:58 UTC (permalink / raw)
To: gcc-bugs
--
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-10-31 05:41:20 |2006-11-15 18:58:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/29652] ambiguous interface declaration undetected
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
` (2 preceding siblings ...)
2006-11-15 18:58 ` pault at gcc dot gnu dot org
@ 2006-11-22 0:02 ` pault at gcc dot gnu dot org
2006-11-23 19:14 ` pault at gcc dot gnu dot org
2006-11-23 19:18 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-22 0:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2006-11-22 00:02 -------
Subject: Bug 29652
Author: pault
Date: Wed Nov 22 00:02:02 2006
New Revision: 119076
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119076
Log:
2006-11-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29652
* interface.c (check_interface1): Use a local value, instead of
the dummy, as the inner iterator over interface symbols.
2006-11-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29652
* gfortran.dg/generic_7.f90: New test.
* gfortran.dg/defined_operators_1.f90: Add new error.
Added:
trunk/gcc/testsuite/gfortran.dg/generic_7.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/defined_operators_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/29652] ambiguous interface declaration undetected
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
` (3 preceding siblings ...)
2006-11-22 0:02 ` pault at gcc dot gnu dot org
@ 2006-11-23 19:14 ` pault at gcc dot gnu dot org
2006-11-23 19:18 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-23 19:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2006-11-23 19:14 -------
Subject: Bug 29652
Author: pault
Date: Thu Nov 23 19:14:05 2006
New Revision: 119132
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119132
Log:
2006-11-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25087
* resolve.c (resolve_fl_procedure): Add an error if an external
automatic character length function does not have an explicit
interface.
PR fortran/29652
* interface.c (check_interface1): Use a local value, instead of
the dummy, as the inner iterator over interface symbols.
PR fortran/29820
* trans-array.c (gfc_get_derived_type): Once done, spread the
backend_decl to all identical derived types in all sibling
namespaces.
2006-11-23 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25087
* gfortran.dg/auto_char_len_4.f90: New test.
PR fortran/29652
* gfortran.dg/generic_7.f90: New test.
* gfortran.dg/defined_operators_1.f90: Add new error.
PR fortran/29820
* gfortran.dg/used_types_13.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/auto_char_len_4.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_7.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/used_types_13.f90
Modified:
branches/gcc-4_2-branch/gcc/fortran/ChangeLog
branches/gcc-4_2-branch/gcc/fortran/interface.c
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/trans-types.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/defined_operators_1.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/29652] ambiguous interface declaration undetected
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
` (4 preceding siblings ...)
2006-11-23 19:14 ` pault at gcc dot gnu dot org
@ 2006-11-23 19:18 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-11-23 19:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2006-11-23 19:18 -------
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=29652
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-11-23 19:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-30 14:55 [Bug fortran/29652] New: ambiguous interface declaration undetected franke dot daniel at gmail dot com
2006-10-31 5:41 ` [Bug fortran/29652] " pault at gcc dot gnu dot org
2006-11-15 18:25 ` patchapp at dberlin dot org
2006-11-15 18:58 ` pault at gcc dot gnu dot org
2006-11-22 0:02 ` pault at gcc dot gnu dot org
2006-11-23 19:14 ` pault at gcc dot gnu dot org
2006-11-23 19:18 ` 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).