public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25135] New: Interface name does not conflict with subroutine name
@ 2005-11-28 12:22 iguchi at coral dot t dot u-tokyo dot ac dot jp
2005-11-28 13:19 ` [Bug fortran/25135] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: iguchi at coral dot t dot u-tokyo dot ac dot jp @ 2005-11-28 12:22 UTC (permalink / raw)
To: gcc-bugs
The following program should occur an error since the same named
entity from different modules cannot be referenced.
However, I compiled successfully, and got output "foo".
I think it is wrong behavior.
module m_foo
contains
subroutine foo
print *, "foo"
end subroutine
end module
module m_bar
interface foo
module procedure bar
end interface
contains
subroutine bar
print *, "bar"
end subroutine
end module
use m_foo
use m_bar
call foo
end
--
Summary: Interface name does not conflict with subroutine name
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: iguchi at coral dot t dot u-tokyo dot ac dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25135] Interface name does not conflict with subroutine name
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
@ 2005-11-28 13:19 ` pinskia at gcc dot gnu dot org
2006-12-27 13:47 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-28 13:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-28 13:19 -------
Confirmed, IFC gives:
fortcom: Error: The same named entity from different modules and/or program
units cannot be referenced. [FOO]
in file (null), line 0, column 0
compilation aborted for t.f90 (code 1)
--
pinskia 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 |2005-11-28 13:19:54
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25135] Interface name does not conflict with subroutine name
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
2005-11-28 13:19 ` [Bug fortran/25135] " pinskia at gcc dot gnu dot org
@ 2006-12-27 13:47 ` pault at gcc dot gnu dot org
2007-01-01 20:47 ` [Bug fortran/25135] [4.2 and 4.1 only] " pault at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-12-27 13:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pault at gcc dot gnu dot org 2006-12-27 13:46 -------
Subject: Bug 25135
Author: pault
Date: Wed Dec 27 13:46:47 2006
New Revision: 120218
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120218
Log:
2006-12-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20896
* interface.c (check_sym_interfaces): Try to resolve interface
reference as a global symbol, if it is not a nodule procedure.
(compare_actual_formal): Remove call to gfc_find_symbol; if
the expression is already a variable it is locally declared
and this has precedence.
gfortran.h : Add prototype for resolve_global_procedure.
resolve.c (resolve_global_procedure): Remove static attribute
from function declaration.
(resolve_fl_procedure): Remove symtree declaration and the
redundant check for an ambiguous procedure.
PR fortran/25135
* module.c (load_generic_interfaces): If the symbol is present
and is not generic it is ambiguous.
2006-12-27 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20896
* gfortran.dg/interface_10.f90: New test.
* gfortran.dg/dummy_procedure_1.f90: Add error for call s1(z),
since z is already, locally a variable.
PR fortran/25135
* gfortran.dg/generic_11.f90: New test.
* gfortran.dg/interface_7.f90: Remove name clash between module
name and procedure 'x' referenced in the interface.
Added:
trunk/gcc/testsuite/gfortran.dg/generic_11.f90
trunk/gcc/testsuite/gfortran.dg/interface_10.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/module.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/dummy_procedure_1.f90
trunk/gcc/testsuite/gfortran.dg/interface_7.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25135] [4.2 and 4.1 only] Interface name does not conflict with subroutine name
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
2005-11-28 13:19 ` [Bug fortran/25135] " pinskia at gcc dot gnu dot org
2006-12-27 13:47 ` pault at gcc dot gnu dot org
@ 2007-01-01 20:47 ` pault at gcc dot gnu dot org
2007-01-06 14:14 ` 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 @ 2007-01-01 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2007-01-01 20:47 -------
I seem not to have taken this one on.
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
Last reconfirmed|2006-02-26 20:07:48 |2007-01-01 20:47:44
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25135] [4.2 and 4.1 only] Interface name does not conflict with subroutine name
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
` (2 preceding siblings ...)
2007-01-01 20:47 ` [Bug fortran/25135] [4.2 and 4.1 only] " pault at gcc dot gnu dot org
@ 2007-01-06 14:14 ` pault at gcc dot gnu dot org
2007-01-06 14:17 ` [Bug fortran/25135] [4.1 " pault at gcc dot gnu dot org
2007-01-10 19:12 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-06 14:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2007-01-06 14:13 -------
Subject: Bug 25135
Author: pault
Date: Sat Jan 6 14:13:20 2007
New Revision: 120525
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120525
Log:
2007-01-06 Paul Thomas <pault@gcc.gnu.org>
Bug fixes from trunk
PR fortran/30034
* resolve.c (resolve_formal_arglist): Exclude the test for
pointers and procedures for subroutine arguments as well as
functions.
PR fortran/30237
* intrinsic.c (remove_nullargs): Do not pass up arguments with
a label. If the actual has a label and the formal has a type
then emit an error.
PR fortran/25135
* module.c (load_generic_interfaces): If the symbol is present
and is not generic it is ambiguous.
PR fortran/23060
* intrinsic.c (compare_actual_formal ): Distinguish argument
list functions from keywords.
* intrinsic.c (sort_actual): If formal is NULL, the presence of
an argument list function actual is an error.
* trans-expr.c (conv_arglist_function) : New function to
implement argument list functions %VAL, %REF and %LOC.
(gfc_conv_function_call): Call it.
* resolve.c (resolve_actual_arglist): Add arg ptype and check
argument list functions.
(resolve_function, resolve_call): Set value of ptype before
calls to resolve_actual_arglist.
* primary.c (match_arg_list_function): New function.
(gfc_match_actual_arglist): Call it before trying for a
keyword argument.
PR fortran/27900
* resolve.c (resolve_actual_arglist): If all else fails and a
procedure actual argument has no type, see if a specific
intrinsic matches.
PR fortran/24325
* resolve.c (resolve_function): If the function reference is
FL_VARIABLE this is an error.
2007-01-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30034
* gfortran.dg/pure_formal_proc_1.f90: New test.
PR fortran/30237
* gfortran.dg/intrinsic_actual_3.f90: New test.
PR fortran/25135
* gfortran.dg/generic_11.f90: New test.
* gfortran.dg/interface_7.f90: Remove name clash between module
name and procedure 'x' referenced in the interface.
PR fortran/23060
* gfortran.dg/c_by_val.c: Called by c_by_val_1.f.
* gfortran.dg/c_by_val_1.f: New test.
* gfortran.dg/c_by_val_2.f: New test.
* gfortran.dg/c_by_val_3.f: New test.
PR fortran/27900
* gfortran.dg/intrinsic_actual_4.f90: New test.
PR fortran/24325
* gfortran.dg/func_decl_3.f90: New test.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/c_by_val.c
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/c_by_val_1.f
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/c_by_val_2.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/c_by_val_3.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/func_decl_3.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/generic_11.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/intrinsic_actual_4.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/pure_formal_proc_1.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/intrinsic.c
branches/gcc-4_2-branch/gcc/fortran/module.c
branches/gcc-4_2-branch/gcc/fortran/primary.c
branches/gcc-4_2-branch/gcc/fortran/resolve.c
branches/gcc-4_2-branch/gcc/fortran/trans-expr.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/dummy_procedure_1.f90
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/interface_7.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25135] [4.1 only] Interface name does not conflict with subroutine name
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
` (3 preceding siblings ...)
2007-01-06 14:14 ` pault at gcc dot gnu dot org
@ 2007-01-06 14:17 ` pault at gcc dot gnu dot org
2007-01-10 19:12 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2007-01-06 14:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2007-01-06 14:17 -------
Fixed on trunk and 4.2
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|[4.2 and 4.1 only] Interface|[4.1 only] Interface name
|name does not conflict with |does not conflict with
|subroutine name |subroutine name
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/25135] [4.1 only] Interface name does not conflict with subroutine name
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
` (4 preceding siblings ...)
2007-01-06 14:17 ` [Bug fortran/25135] [4.1 " pault at gcc dot gnu dot org
@ 2007-01-10 19:12 ` pinskia at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 19:12 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25135
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-01-10 19:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-28 12:22 [Bug fortran/25135] New: Interface name does not conflict with subroutine name iguchi at coral dot t dot u-tokyo dot ac dot jp
2005-11-28 13:19 ` [Bug fortran/25135] " pinskia at gcc dot gnu dot org
2006-12-27 13:47 ` pault at gcc dot gnu dot org
2007-01-01 20:47 ` [Bug fortran/25135] [4.2 and 4.1 only] " pault at gcc dot gnu dot org
2007-01-06 14:14 ` pault at gcc dot gnu dot org
2007-01-06 14:17 ` [Bug fortran/25135] [4.1 " pault at gcc dot gnu dot org
2007-01-10 19:12 ` pinskia 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).