fails with r191092, worked with r190380 on the 4.7 branch, taken from a cython testcase, with -O[0-3]: $ gcc -c -g -O0 -I/usr/include/python2.7 pyx.c pyx.c: In function '__pyx_t_long_double_complex_from_parts': pyx.c:14:16: internal compiler error: in gimplify_expr, at gimplify.c:7592 Please submit a full bug report, with preprocessed source if appropriate. typedef struct { double real; double imag; } Py_complex; typedef struct _object { unsigned int refcnt; } PyObject; typedef long double _Complex __pyx_t_long_double_complex; static __inline__ __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) { return x + y*(__pyx_t_long_double_complex)(__extension__ 1.0iF); } static __pyx_t_long_double_complex __Pyx_PyComplex_As___pyx_t_long_double_complex(PyObject* o) { Py_complex cval; return __pyx_t_long_double_complex_from_parts( (long double)cval.real, (long double)cval.imag); }
It was caused by revision 190899: http://gcc.gnu.org/ml/gcc-cvs/2012-09/msg00056.html
Created attachment 28185 [details] gcc48-pr54559.patch Untested fix.
Trunk also fails for me. P1.
Author: jakub Date: Thu Sep 13 16:57:15 2012 New Revision: 191270 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191270 Log: PR c/54559 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or COMPLEX_TYPE with in_late_binary_op set temporarily to true. * gcc.c-torture/compile/pr54559.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr54559.c Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-typeck.c trunk/gcc/testsuite/ChangeLog
Author: jakub Date: Thu Sep 13 17:04:44 2012 New Revision: 191271 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191271 Log: PR c/54559 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or COMPLEX_TYPE with in_late_binary_op set temporarily to true. * gcc.c-torture/compile/pr54559.c: New test. Added: branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr54559.c Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/c-typeck.c branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
Fixed.