------- Comment #4 from Kyle dot D dot Moffett at boeing dot com 2010-06-03 20:09 ------- Ok, I have a trivial 19-line testcase that triggers the bug on my native Debian GCC 4.4.4-2+powerpcspe1 (with PR44169 fix) with -O0 and -O3. The compiler was built with: --with-cpu=8548 --enable-e500_double --with-long-double-128 In order to make it work on -O3 I had to split the "double z", "void problem()" and "int main()" into 3 separate files to prevent GCC from inlining everything.
Compiled with: gcc -Wall -Wextra -Werror -ggdb3 -O0 -o testall testall.c Output (the two "main: a" lines should read the same): main: a = 78.463000 problem: a = 39.231500 main: a = 39.231476 Or with: gcc -Wall -Wextra -Werror -ggdb3 -O3 -o test.o -c test.c gcc -Wall -Wextra -Werror -ggdb3 -O3 -o test2.o -c test2.c gcc -Wall -Wextra -Werror -ggdb3 -O3 -o test3.o -c test3.c gcc -Wall -Wextra -Werror -ggdb3 -O3 -o test test.o test2.o test3.o Output: (again, "main" lines should be identical) main: a = 78.463000 problem: a = 39.231500 main: a = 78.462952 As you might imagine, a bug this bad triggers testsuite failures in MPFR, GMP, PostgreSQL, lapack, and basically everything else with a comprehensive floating-point test-suite. Cheers, Kyle Moffett -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44364