This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Un-promoting incoming arguments passed by reference
On Mar 22, 2001, Neil Booth <neil@daikokuya.demon.co.uk> wrote:
> Alexandre Oliva wrote:-
>> When an argument is promoted and passed by reference, GCC fails to
>> un-promote the incoming argument. This patch fixes this bug. Tested
>> with a new port, yet to be contributed. Ok to install?
> Is there no testcase?
There is one that's part of the GDB testsuite. But it would only fail
with an ABI in which a float argument is promoted to double and then
passed by transparent reference (i.e., not as in C++'s `float&'), and
the argument is then used as an argument to a libcall. For example:
double f(x, y)
float x;
double y;
{
return x + y;
}
assuming adddf isn't available.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me