This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/49767] New: __mulsc3 runs into infinite recursion if GCC is compiled with -O0 option
- From: "waffle.bai at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 17 Jul 2011 03:40:37 +0000
- Subject: [Bug other/49767] New: __mulsc3 runs into infinite recursion if GCC is compiled with -O0 option
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: waffle.bai@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;
}