This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/27554] Strange assembler produced
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 May 2006 13:26:04 -0000
- Subject: [Bug fortran/27554] Strange assembler produced
- References: <bug-27554-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2006-05-29 13:26 -------
My fix for pr25147 and pr25098 also fixes this problem.
The code is incorrect ; abs being interpreted as a real variable, rather than
the intrinsic of this name. The patch produces the error that a procedure was
expected, in the same way that ifort and g95 do.
Adding the declaration:
real, intrinsic :: abs
produces code that compiles and runs correctly.
Paul
eg. This does what it should:-
function bar (z)
real z
bar = sin (z)
end function bar
real, external :: bar
real, intrinsic :: exp
real, intrinsic :: abs
call foo(bar)
call foo(exp)
call foo(abs)
contains
subroutine foo (a)
real, external :: a
print *, a (-1.0)
end subroutine foo
end
--
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27554