Executing on host: /home/dave/gnu/gcc-4.5/objdir/gcc/xgcc -B/home/dave/gnu/gcc-4 .5/objdir/gcc/ /home/dave/gnu/gcc-4.5/gcc/gcc/testsuite/gcc.dg/torture/builtin-m ath-7.c -O2 -flto -lm -o ./builtin-math-7.exe (timeout = 300) PASS: gcc.dg/torture/builtin-math-7.c -O2 -flto (test for excess errors) Setting LD_LIBRARY_PATH to :/home/dave/gnu/gcc-4.5/objdir/gcc::/home/dave/gnu/gc c-4.5/objdir/gcc:/home/dave/gnu/gcc-4.5/objdir/hppa-linux/libstdc++-v3/.libs:/ho me/dave/gnu/gcc-4.5/objdir/hppa-linux/libmudflap/.libs:/home/dave/gnu/gcc-4.5/ob jdir/hppa-linux/libssp/.libs:/home/dave/gnu/gcc-4.5/objdir/hppa-linux/libgomp/.l ibs:/home/dave/gnu/gcc-4.5/objdir/./gcc:/home/dave/gnu/gcc-4.5/objdir/./prev-gcc FAIL: gcc.dg/torture/builtin-math-7.c -O2 -flto execution test Executing on host: /home/dave/gnu/gcc-4.5/objdir/gcc/xgcc -B/home/dave/gnu/gcc-4 .5/objdir/gcc/ /home/dave/gnu/gcc-4.5/gcc/gcc/testsuite/gcc.dg/torture/builtin-m ath-7.c -O2 -fwhopr -lm -o ./builtin-math-7.exe (timeout = 300) PASS: gcc.dg/torture/builtin-math-7.c -O2 -fwhopr (test for excess errors) Setting LD_LIBRARY_PATH to :/home/dave/gnu/gcc-4.5/objdir/gcc::/home/dave/gnu/gc c-4.5/objdir/gcc:/home/dave/gnu/gcc-4.5/objdir/hppa-linux/libstdc++-v3/.libs:/ho me/dave/gnu/gcc-4.5/objdir/hppa-linux/libmudflap/.libs:/home/dave/gnu/gcc-4.5/ob jdir/hppa-linux/libssp/.libs:/home/dave/gnu/gcc-4.5/objdir/hppa-linux/libgomp/.l ibs:/home/dave/gnu/gcc-4.5/objdir/./gcc:/home/dave/gnu/gcc-4.5/objdir/./prev-gcc FAIL: gcc.dg/torture/builtin-math-7.c -O2 -fwhopr execution test dave@hiauly6:~/gnu/gcc/objdir/gcc$ ./xgcc -B./ -v Reading specs from ./specs COLLECT_GCC=./xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: hppa-linux Configured with: ../gcc/configure --with-gnu-as --with-gnu-ld --enable-shared --prefix=/home/dave/opt/gnu/gcc/gcc-4.5.0 --with-local-prefix=/home/dave/opt/gnu --enable-threads=posix --enable-__cxa_atexit --build=hppa-linux --enable-clocale=gnu --enable-java-gc=boehm --enable-java-awt=xlib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --with-libelf=/home/dave/opt/gnu Thread model: posix gcc version 4.5.0 20091102 (experimental) [trunk revision 153799] (GCC)
also fails on hppa64-hp-hpux11.11.
Confirmed. Fails everywhere. The issue is that flag_complex_method is not the same in lto1 compared to cc1 so we lower the complex multiplication differently. The specific issue is that we fold D.2036_6 = __complex__ ( Inf, 0.0) * __complex__ (0.0, 1.0e+0); D.2035_7 = D.2036_6 * D.2036_6; to D.2036_6 = COMPLEX_EXPR < Nan, Inf>; D.2035_7 = COMPLEX_EXPR < Nan, Nan>; with -fcx-fortran-rules (flag_complex_method == 1). So the particular issue is a middle-end one while the general flag_complex_method issue remains. In the end we need to move flag_complex_method into the IL just like flag_wrapv. I'm going to try fix the testcase at least.
Fixed.
Subject: Bug 41915 Author: rguenth Date: Fri Dec 11 14:49:35 2009 New Revision: 155164 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155164 Log: 2009-12-11 Richard Guenther <rguenther@suse.de> PR lto/41915 * lto-lang.c (lto_init_options): Initialize flag_complex_method to the C99 default. Do not set flag_unit_at_a_time. Modified: trunk/gcc/lto/ChangeLog trunk/gcc/lto/lto-lang.c