SPEC CPU2006 tests 464.h264ref and 482.sphinx3 fail to build on powerpc64-linux with "-m64 -lto -fsigned-char". For some reason we've added the option -fsigned-char to the SPEC config files for those two tests; without it both tests fail at runtime for -m64, but it doesn't affect the results for -m32. The failure to build with -flto might be due to some problem with -fsigned-char on powerpc64, rather than a problem with LTO. Here's a minimized testcase: --------------------- extern char *a; extern int f; void foo (void) { f = (*a != '-'); } --------------------- And here's what happens: elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gcc -m64 -flto -fsigned-char bug.c -c elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gcc -m64 -flto -fsigned-char bug.o -shared -o x.so In function ‘foo’: lto1: error: type mismatch in indirect reference <unnamed-signed:8> <unnamed-unsigned:8> D.1228_2 = *a.0_1; lto1: internal compiler error: verify_stmts failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: /home/janis/tools/gcc-trunk-anonsvn/bin/gcc returned 1 exit status collect2: lto-wrapper returned 1 exit status If the type of 'a' is signed char then everything works fine.
Mine. I hate -f[un]signed-char ...
Subject: Bug 42696 Author: rguenth Date: Tue Jul 20 15:05:59 2010 New Revision: 162341 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162341 Log: 2010-07-20 Richard Guenther <rguenther@suse.de> PR lto/42696 * gcc.dg/lto/20100720-4_0.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/lto/20100720-4_0.c Modified: trunk/gcc/testsuite/ChangeLog
Fixed.