public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45086] New: For whole-file checking, also check whether an INTERFACE matches
@ 2010-07-26 17:00 burnus at gcc dot gnu dot org
2010-07-26 19:17 ` [Bug fortran/45086] " burnus at gcc dot gnu dot org
2010-07-27 8:30 ` burnus at gcc dot gnu dot org
0 siblings, 2 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-26 17:00 UTC (permalink / raw)
To: gcc-bugs
The check should be done in resolve_global_procedure.
NAG has:
Error: fjkff.f90: Inconsistent INTERFACE block for procedure FOO from $main$
Argument X (no. 1) should be an assumed-shape array
g95 has:
Error: Passing array at (1) to assumed-shape actual argument at (2) via an
implicit interface
Example:
subroutine foo(x)
integer :: x(:)
end subroutine foo
interface
subroutine foo(x)
integer :: x(1)
end subroutine foo
end interface
call foo([1])
end
--
Summary: For whole-file checking, also check whether an INTERFACE
matches
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45086
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/45086] For whole-file checking, also check whether an INTERFACE matches
2010-07-26 17:00 [Bug fortran/45086] New: For whole-file checking, also check whether an INTERFACE matches burnus at gcc dot gnu dot org
@ 2010-07-26 19:17 ` burnus at gcc dot gnu dot org
2010-07-27 8:30 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-26 19:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2010-07-26 19:17 -------
Related - the original version of gfortran.dg/char_result_4.f90 shows:
pure elemental function double (x)
1
Error: ELEMENTAL procedure 'double' at (1) must have an explicit interface
Expected: This message is shown for the CALL to the procedure and not for the
definition.
Note 1: I quickly tried to generate a minimal example, but I did not succeed.
Note 2: As part of PR 40873 the example will be fixed, please remember this
when testing.
* * *
Another item to do argument checking if there is an INTERFACE present. A simple
use check cannot be done as the INTERFACE might have different argument names
than the real procedure, which will fail. Thus gfc_procedure_use needs to be
augmented by having a mode which goes trough the list one-to-one without
checking the presence of other arguments. (Assumes that list has been
reordered). Or, one adds a function which simply compares the formal arguments,
which is probably the better approach.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45086
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/45086] For whole-file checking, also check whether an INTERFACE matches
2010-07-26 17:00 [Bug fortran/45086] New: For whole-file checking, also check whether an INTERFACE matches burnus at gcc dot gnu dot org
2010-07-26 19:17 ` [Bug fortran/45086] " burnus at gcc dot gnu dot org
@ 2010-07-27 8:30 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-07-27 8:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2010-07-27 08:29 -------
subroutine foo(x)
integer, allocatable :: x
end subroutine
integer, allocatable :: ptr
call foo(ptr)
end
Error: Dummy argument 'x' of procedure 'foo' at (1) has an attribute that
requires an explicit interface for this procedure
Expected: Could be more explicit, maybe.
* * *
subroutine foo(x)
integer, allocatable :: x
end subroutine
interface
subroutine foo(x)
integer :: x
end subroutine
end interface
integer, allocatable :: ptr
call foo(ptr)
end
Expected: Mismatched interface is detected.
* * *
subroutine foo(x)
integer, allocatable :: x
end subroutine
interface
subroutine foo(x)
integer :: x
end subroutine
end interface
integer :: ptr
call foo(ptr)
end
Expected: Mismatched actual argument is detected as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45086
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/45086] For whole-file checking, also check whether an INTERFACE matches
[not found] <bug-45086-4@http.gcc.gnu.org/bugzilla/>
2010-12-28 18:24 ` dfranke at gcc dot gnu.org
@ 2010-12-28 18:28 ` dfranke at gcc dot gnu.org
1 sibling, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu.org @ 2010-12-28 18:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45086
Daniel Franke <dfranke at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
--- Comment #4 from Daniel Franke <dfranke at gcc dot gnu.org> 2010-12-28 18:26:20 UTC ---
Bugger, should have been closed as dupe, 2nd try.
*** This bug has been marked as a duplicate of bug 27318 ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/45086] For whole-file checking, also check whether an INTERFACE matches
[not found] <bug-45086-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-28 18:24 ` dfranke at gcc dot gnu.org
2010-12-28 18:28 ` dfranke at gcc dot gnu.org
1 sibling, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu.org @ 2010-12-28 18:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45086
Daniel Franke <dfranke at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu.org
Blocks| |29670
--- Comment #3 from Daniel Franke <dfranke at gcc dot gnu.org> 2010-12-28 18:23:56 UTC ---
Same as #27318.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-28 18:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-26 17:00 [Bug fortran/45086] New: For whole-file checking, also check whether an INTERFACE matches burnus at gcc dot gnu dot org
2010-07-26 19:17 ` [Bug fortran/45086] " burnus at gcc dot gnu dot org
2010-07-27 8:30 ` burnus at gcc dot gnu dot org
[not found] <bug-45086-4@http.gcc.gnu.org/bugzilla/>
2010-12-28 18:24 ` dfranke at gcc dot gnu.org
2010-12-28 18:28 ` dfranke at gcc dot gnu.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).