This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30432] gfortran.dg/c_by_val_1.f fails on ia64-*-*, problem with %VAL
- From: "sje at cup dot hp dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2007 21:52:10 -0000
- Subject: [Bug fortran/30432] gfortran.dg/c_by_val_1.f fails on ia64-*-*, problem with %VAL
- References: <bug-30432-3107@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from sje at cup dot hp dot com 2007-01-12 21:52 -------
I am not sure if I can unflummox you or not. It still fails for me on IA64
HP-UX and on IA64 Debian 3.1 Linux. It also shows up in the testresults mail
from H.J and Andreas on their IA64 Linux testing. Here are two short programs
to reproduce the error. The interesting thing is that a1 is correctly printed
out if I remove the initial integer argument. With the integer argument I get
the value zero printed. Looking at the assembly code again, it still looks
like the float argument is being passed in an integer register by the Fortran
main program and read from a floating point register by the C code. With out
the integer argument the float argument is written to and read from a floating
point register, which is what I would expect.
C code:
void f_to_f__(int i, float a1)
{
printf("a1 = %f\n", (double) a1);
return;
}
program c_by_val_1
external f_to_f
real a
integer i
a = 42.0
call f_to_f (i, %VAL (a))
stop
end
Fortran code:
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30432