------- 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