public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23423] New: module routines do not resolve module's interface blocks
@ 2005-08-16 16:54 jeffrey dot armstrong at analexcleveland dot com
2005-08-16 17:15 ` [Bug fortran/23423] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: jeffrey dot armstrong at analexcleveland dot com @ 2005-08-16 16:54 UTC (permalink / raw)
To: gcc-bugs
Functions/subroutines in a module are not aware of interfaces declared within
the module. For example, the test case:
! BEGIN test.f90 -----------------------------
module test
implicit none
interface foo
module procedure foo_4
module procedure foo_8
end interface foo
contains
function foo_4(input_num)
implicit none
real(kind=4)::foo_4
real(kind=4)::input_num
foo_4 = input_num*input_num
end function foo_4
function foo_8(input_num)
implicit none
real(kind=8)::foo_8
real(kind=8)::input_num
foo_8 = input_num*input_num
end function foo_8
function bar(input_num)
implicit none
real(kind=8)::bar
real(kind=8)::input_num
bar = foo(input_num)
end function bar
end module test
! END test.f90 -------------------------------
When compiled, gcc returns the following output:
$ gfortran -v -save-temps -c test.f90
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../gcc-4.0.1/configure --enable-threads=win32 --enable-java-awt=gtk
Thread model: win32
gcc version 4.0.1
/usr/local/libexec/gcc/i686-pc-cygwin/4.0.1/f951.exe test.f90 -quiet -dumpbase
test.f90 -mtune=pentiumpro -auxbase test -version -o test.s
GNU F95 version 4.0.1 (i686-pc-cygwin)
compiled by GNU C version 4.0.1.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=65446
In file test.f90:35
bar = foo(input_num)
1
Error: Symbol 'foo' at (1) has no IMPLICIT type
Other Fortran compilers (Absoft, DEC/Compaq Visual Fortran) are able to compile
this code.
--
Summary: module routines do not resolve module's interface blocks
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jeffrey dot armstrong at analexcleveland dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-cygwin
GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23423
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/23423] module routines do not resolve module's interface blocks
2005-08-16 16:54 [Bug fortran/23423] New: module routines do not resolve module's interface blocks jeffrey dot armstrong at analexcleveland dot com
@ 2005-08-16 17:15 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-16 17:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-16 16:54 -------
Fixed already in 4.0.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23423
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-16 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 16:54 [Bug fortran/23423] New: module routines do not resolve module's interface blocks jeffrey dot armstrong at analexcleveland dot com
2005-08-16 17:15 ` [Bug fortran/23423] " 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).