http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60969
Bug ID: 60969 Summary: ICE in output_129 in MMXMOV of mode MODE_SF for march=pentium4 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mliska at suse dot cz g++ -O2 pentium.cpp -c -ftree-vectorize -march=pentium4 -m32 BT: #0 output_129 (operands=0x1413ac0 <recog_data>, insn=0x7ffff6e0d948) at ../../gcc/config/i386/i386.md:3177 #1 0x00000000007805e2 in final_scan_insn (insn=insn@entry=0x7ffff6e0d948, file=file@entry=0x14c7370, optimize_p=optimize_p@entry=2, nopeepholes=nopeepholes@entry=0, seen=seen@entry=0x7fffffffd55c) at ../../gcc/final.c:2918 #2 0x0000000000780ec7 in final (first=0x7ffff6dbc5c0, file=0x14c7370, optimize_p=2) at ../../gcc/final.c:2023 #3 0x00000000007810f6 in rest_of_handle_final () at ../../gcc/final.c:4427 #4 (anonymous namespace)::pass_final::execute (this=<optimized out>) at ../../gcc/final.c:4502 #5 0x00000000008b3dba in execute_one_pass (pass=pass@entry=0x14a26c0) at ../../gcc/passes.c:2229 #6 0x00000000008b4006 in execute_pass_list (pass=0x14a26c0) at ../../gcc/passes.c:2282 #7 0x00000000008b4018 in execute_pass_list (pass=0x14a1940) at ../../gcc/passes.c:2283 #8 0x00000000008b4018 in execute_pass_list (pass=0x14a0800) at ../../gcc/passes.c:2283 #9 0x00000000006dccf6 in expand_function (node=node@entry=0x7ffff6dada40) at ../../gcc/cgraphunit.c:1774 #10 0x00000000006de5ed in expand_all_functions () at ../../gcc/cgraphunit.c:1908 #11 compile () at ../../gcc/cgraphunit.c:2252 #12 0x00000000006dea45 in finalize_compilation_unit () at ../../gcc/cgraphunit.c:2329 #13 0x00000000005940ec in cp_write_global_declarations () at ../../gcc/cp/decl2.c:4611 #14 0x000000000094dd9d in compile_file () at ../../gcc/toplev.c:562 #15 0x000000000094f970 in do_compile () at ../../gcc/toplev.c:1914 #16 toplev_main (argc=19, argv=0x7fffffffd8c8) at ../../gcc/toplev.c:1990 #17 0x00007ffff6e4ebe5 in __libc_start_main () from /lib64/libc.so.6 #18 0x000000000052c9a1 in _start () at ../sysdeps/x86_64/start.S:122 $ cat pentium4.cpp: struct A { float f0, f1, f2, f3; A() { } A(float v0, float v1, float v2) : f0(v0), f1(v1), f2(v2), f3(0.0f) { } A method(A & a, float t) { return A (f0 + a.f0 * t, f1 + a.f1 * t, f2 + a.f2 * t); } }; A function(A & v1, A & v2, float t) { return v1.method (v2, t); } void Foo(A & a1, A & a2, A & a3, A & a4, int i1, int i2) { int MIN_TRIGGER = 7; // set below 7 and it compiles ok A * x = new A[i1 * i2]; for (int i = 0; i < MIN_TRIGGER; i++) { A a1 = function (a1, a3, i / (float)i2); A a2 = function (a2, a4, i / (float)i2); for (int j = 0; j < MIN_TRIGGER; j++) x[i * i1 + j] = function (a1, a2, j / (float)i1); } }