public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35865] New: Spurious warning for vector-valued functions passed as arguments
@ 2008-04-08 1:41 john dot young at jrc dot co dot jp
2008-04-08 1:42 ` [Bug fortran/35865] " john dot young at jrc dot co dot jp
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: john dot young at jrc dot co dot jp @ 2008-04-08 1:41 UTC (permalink / raw)
To: gcc-bugs
In the code below, the following warning is produced
"Waring: Actual argument contains too few elements for dummy argument 'func'
(1/3) at (1)"
If the function result is changed to a scalar instead of a vector, no warning
is produced. I do not know the standard well enough to know if this is a
problem, but other compilers (G95,Intel) do not produce a warning. The
function arguments do match however. I obtained this from "GCC 4.3.0 20080212
(experimental) [trunk revision 132252]" using cygwin under WinXP.
!===============================================
module vec_func
implicit none
contains
!===============================================
!===============================================
!function vector_func(func,r1) result(res)
function vector_func(func) result(res)
implicit none
interface
function func(r) result(res)
implicit none
real, intent(in) :: r
real :: res(3)
end function func
end interface
real :: res(3)
res = func(0.)
end function vector_func
!==============================
function test_func(r) result(res)
implicit none
real,intent(in) :: r
real :: res(3)
res = r
end function test_func
!=========================================
end module vec_func
!=========================================
program a
use vec_func
implicit none
real :: z(3)
z = vector_func(test_func)
print*, z
end program a
!=========================================
--
Summary: Spurious warning for vector-valued functions passed as
arguments
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john dot young at jrc dot co dot jp
GCC target triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35865
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/35865] Spurious warning for vector-valued functions passed as arguments
2008-04-08 1:41 [Bug fortran/35865] New: Spurious warning for vector-valued functions passed as arguments john dot young at jrc dot co dot jp
@ 2008-04-08 1:42 ` john dot young at jrc dot co dot jp
2008-04-08 9:21 ` burnus at gcc dot gnu dot org
2009-03-28 12:36 ` fxcoudert at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: john dot young at jrc dot co dot jp @ 2008-04-08 1:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from john dot young at jrc dot co dot jp 2008-04-08 01:42 -------
Created an attachment (id=15444)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15444&action=view)
code to produce spurious warning described in bug report
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35865
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/35865] Spurious warning for vector-valued functions passed as arguments
2008-04-08 1:41 [Bug fortran/35865] New: Spurious warning for vector-valued functions passed as arguments john dot young at jrc dot co dot jp
2008-04-08 1:42 ` [Bug fortran/35865] " john dot young at jrc dot co dot jp
@ 2008-04-08 9:21 ` burnus at gcc dot gnu dot org
2009-03-28 12:36 ` fxcoudert at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-04-08 9:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2008-04-08 09:20 -------
Confirm. Something really goes wrong here, but fortunately it is only a warning
and not an (invalid) error message.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2008-04-08 09:20:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35865
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/35865] Spurious warning for vector-valued functions passed as arguments
2008-04-08 1:41 [Bug fortran/35865] New: Spurious warning for vector-valued functions passed as arguments john dot young at jrc dot co dot jp
2008-04-08 1:42 ` [Bug fortran/35865] " john dot young at jrc dot co dot jp
2008-04-08 9:21 ` burnus at gcc dot gnu dot org
@ 2009-03-28 12:36 ` fxcoudert at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-28 12:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2009-03-28 12:35 -------
The warning has disappeared in 4.3.2, the 4.4 branch and trunk, at least on
x64_64-linux; because I doubt it's cygwin-related, I close this report for now,
please feel free to reopen it with any additional info if I'm wrong.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35865
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-28 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-08 1:41 [Bug fortran/35865] New: Spurious warning for vector-valued functions passed as arguments john dot young at jrc dot co dot jp
2008-04-08 1:42 ` [Bug fortran/35865] " john dot young at jrc dot co dot jp
2008-04-08 9:21 ` burnus at gcc dot gnu dot org
2009-03-28 12:36 ` fxcoudert 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).