http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53045
Bug #: 53045 Summary: Missing loop termination Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: ubiz...@gmail.com Following testcase --cut here-- struct { double d[1]; } foo0, foo1, foo2, foo3, foo4, foo5, foo6, foo7; int main () { struct { double d; } bar[8] = { 48.394, 39.3, -397.9, 3484.9, -8.394, -93.3, 7.9, 84.94 }; int i; for (i = 0; i < 8; i++) foo0.d[i] = bar[i].d; return 0; } -- cut here-- segfaults when compiled with -O2, xgcc (GCC) 4.8.0 20120419 (experimental) [trunk revision 186596] Loop termination is missing from asm dump: .L2: movsd %xmm0, foo0(%rax) movsd -64(%rsp,%rax), %xmm0 addq $8, %rax jmp .L2 Loop termination is already missing from .optimized dump: This problem is the reason for following testsuite failures on x86 AVX: FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c execution, -O2 FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c execution, -O3 -fomit-frame-pointer FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finli ne-functions FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c execution, -O3 -g FAIL: gcc.target/x86_64/abi/avx/test_passing_structs.c execution, -Os FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c execution, -O2 FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c execution, -O3 -fomit-frame-pointer FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finlin e-functions FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c execution, -O3 -g FAIL: gcc.target/x86_64/abi/avx/test_passing_unions.c execution, -Os