Created attachment 27687 [details] C source code I just tried to compile the package ratpoints-2.1.3-5 on gcc-4.8 trunk dated 20120620 on an AMD x86_64 box. The compiler said find_points.c: In function 'find_points_work': find_points.c:1236:6: internal compiler error: in fold_convert_loc, at fold-const.c:1986 long find_points_work(ratpoints_args *args, ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Preprocessed source code attached. Flag -O2 required.
Confirmed. Happens in tree-ssa-phiopt.c in conditional_replacement.
It is caused by revision 186905: http://gcc.gnu.org/ml/gcc-cvs/2012-04/msg00858.html
Reduced testcase: typedef long long V __attribute__ ((__vector_size__ (16))); void foo (int x, V *y) { *y = x ? ((V) { ~0UL, ~0UL }) : ((V) { 0LL, 0LL }); }
Created attachment 27700 [details] gcc48-pr53748.patch UNtested fix.
Author: jakub Date: Tue Jun 26 08:02:20 2012 New Revision: 188975 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=188975 Log: PR tree-optimization/53748 * tree-ssa-phiopt.c (conditional_replacement): Only optimize if arg0/arg1 have integral or pointer types. * gcc.c-torture/compile/pr53748.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr53748.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-phiopt.c
Fixed.