http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49767
Summary: __mulsc3 runs into infinite recursion if GCC is compiled with -O0 option Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: major Priority: P3 Component: other AssignedTo: unassig...@gcc.gnu.org ReportedBy: waffle....@gmail.com The GCC built is of version 4.3.2 and is configured with option ``--enable-languages=c,c++,fortran --disable-libada' CFLAGS='-O0 -g' '' `uname -a' : Linux f18 2.6.34.8-68.fc13.i686.PAE #1 SMP Thu Feb 17 14:54:10 UTC 2011 i686 i686 i386 GNU/Linux The implementation of __mulsc3 in libgcc2.c is somehow contingent on certain optimization to get rid of the infinite tail call recursion. A simple test program is as follows. #include <stdio.h> int main (int argc, char **argv) { _Complex float c = 2.5fi; _Complex float d = 1.0; _Complex float x, y; float a = (float) argc; x = c * d; y = a * 1i; printf ("%f %f\n", __imag__ x, y); return 0; }