[Bug target/23775] [4.1 Regression] wrong code in argument passing
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Sep 8 09:08:00 GMT 2005
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-08 09:08 -------
Reduced testcase:
extern "C" double cos(double);
extern "C" void abort(void);
double x_from_z(double pitch=0, double stereo=0); // __attribute__((const));
double x_from_z(double pitch, double stereo)
{
return 1.0/cos(stereo);
}
void local_to_trflocal(int, double x_loc, int=0)
{
if (x_loc != 1.0)
abort ();
}
int main()
{
local_to_trflocal(0, x_from_z());
return 0;
}
Code is ok if you declare x_from_z const.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23775
More information about the Gcc-bugs
mailing list