gcc.dg/vmx/bug-2.c fails at -O3 with the following ICE: /home/apinski/src/local/gcc/gcc/testsuite/gcc.dg/vmx/bug-2.c:24:1: internal compiler error: in build_int_cst_wide, at tree.c:1147 Which is caused by the fold_binary call here: #10 0x109fe834 in ipcp_lattice_from_jfunc (info=0x1119b3b0, lat=0xff90c4ec, jfunc=0x1119bc98) at /home/apinski/src/local/gcc/gcc/ipa-cp.c:302 302 cst = fold_binary (jfunc->value.pass_through.operation, (gdb) p debug_generic_expr (cst) 1.0e+0 $1 = void (gdb) p debug_generic_expr (jfunc->value.pass_through.operand) 1.0e+0 I will see if I can get a non PowerPC specific testcase soon.
Here is a testcase that fails also on x86_64 (but it also fails most likely everywhere): check (int result, const char *name) { if (!result) printf ("fail %s\n", name); } #define vector __attribute__((vector_size(16) )) static vector unsigned char value = { 0x7c, 0x12, 0x1, 0xd5, 0x39, 0x66, 0xa8, 0x87 }; int g(int, vector unsigned char, vector unsigned char); void initn_c ( double p5 , vector unsigned char p6) { check(p5 == 1, "p5"); check(g (2, (p6), (value)), "p6"); } void test(int a) { initn_c (1, value); }
Thanks, I'll have a look at it early next week.
Proposed patch: http://gcc.gnu.org/ml/gcc-patches/2009-10/msg00771.html
Subject: Bug 41661 Author: jamborm Date: Tue Oct 13 11:31:08 2009 New Revision: 152702 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152702 Log: 2009-10-13 Martin Jambor <mjambor@suse.cz> PR tree-optimization/41661 * ipa-prop.c (compute_complex_pass_through): Allow only operations that are tcc_comparisons or do not change the type in any un-usleless way. * ipa-cp.c (ipcp_lattice_from_jfunc): Request boolean type when folding tcc_comparison operations. * testsuite/gcc.c-torture/compile/pr41661.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr41661.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-cp.c trunk/gcc/ipa-prop.c trunk/gcc/testsuite/ChangeLog
Fixed.
*** Bug 41147 has been marked as a duplicate of this bug. ***