When running the testsuite on ia64-unknown-linux-gnu with extra passes containing -fpic/-fPIC I get the following additional error on the 4.5 trunk: FAIL: gcc.c-torture/execute/20000603-1.c execution, -O2 FAIL: gcc.c-torture/execute/20000603-1.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/20000603-1.c execution, -O3 -g FAIL: gcc.c-torture/execute/20000603-1.c execution, -Os This is a regressions from previous releases. Testsuite results showing the extra error: http://gcc.gnu.org/ml/gcc-testresults/2010-03/msg01997.html
Testcase also fails on powerpc-unknown-linux-gnu with -fpic/-fPIC: http://gcc.gnu.org/ml/gcc-testresults/2010-03/msg01630.html
Testcase also fails on sparc64-unknown-linux-gnu with -fpic/-fPIC in both 32 and 64 bit modes: http://gcc.gnu.org/ml/gcc-testresults/2010-03/msg00753.html
The test is bogus and does not agree with how GCC interprets type-based aliasing rules. Thus it invokes undefined behavior (dependent on whether we inline or not).
OK, I'll modify the testcase to ensure function f() gets inlined.
Created attachment 20336 [details] testcase with inlined f() fails at x86_64-linux Even when the f() is declared as static inline __attribute__((always_inline)) double f(struct s1 *a, struct s2 *b) the testcase still fails with: $ gcc -fschedule-insns -fstrict-aliasing pr43495-2.c && ./a.out Aborted
Testcase from comment #5 fails at x86_64-linux, trunk r153685, r158095. It doesn't fail in the 4.4 branch.
Just going to make this as a dup of bug 14319. *** This bug has been marked as a duplicate of bug 14319 ***