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. -- Summary: lto1 error with -fsigned-char and char comparison Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janis at gcc dot gnu dot org GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42696