> /usr/local/gcc46/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc46/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc46/libexec/gcc/x86_64-apple-darwin10.3.1/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.3.1
Configured with: ../../src/gcc/configure --prefix=/usr/local/gcc46
--with-arch=native --with-tune=native --disable-nls --enable-lto
--disable-bootstrap LDFLAGS=-L/sw/lib CPPFLAGS=-I/sw/include
--enable-languages=c,c++,objc,obj-c++,lto
Thread model: posix
gcc version 4.6.0 20100511 (experimental) (GCC) 

The attached files have two different definitions of MpegEncContext. -flto with
checking gives an ice on it instead of a readable warning/error:

> /usr/local/gcc46/bin/gcc -O3 -flto -c h263dec.i
> /usr/local/gcc46/bin/gcc -O3 -flto -c ituh263dec.i
> echo "h263dec.o ituh263dec.o" > test
> /usr/local/gcc46/libexec/gcc/x86_64-apple-darwin10.3.1/4.6.0/lto1 -O3 @test   
>  
Reading object files: h263dec.o ituh263dec.o
Reading the callgraph
Merging declarations
Reading summaries
Reading function bodies: ff_h263_decode_mb ff_h263_decode_init
Performing interprocedural optimizations
 <whole-program>
In function 'ff_h263_decode_init':
lto1: error: type mismatch in address expression
<unnamed-signed:32> (*<T4a5>) (struct MpegEncContext *, <unnamed-signed:16>[64]
*)

<unnamed-signed:32> <T4ac> (struct MpegEncContext *, <unnamed-signed:16>[64] *)

# .MEM_5 = VDEF <.MEM_4(D)>
s_3->decode_mb = ff_h263_decode_mb;

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.

It looks obviously invalid here, but building ffmpeg with -O3 -flto gives the
same ice, and I can't see any bugs that would cause that. It's hard to debug
it, though, since it doesn't print the origin files of the mismatched
definitions or anything.

The original, absolutely not unreduced version:
> svn co -r23100 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
> cd ffmpeg
> ./configure --cc=/usr/local/gcc46/bin/gcc --extra-cflags="-flto -O3" 
> --extra-ldflags="-flto -O3" --enable-shared; make
...
<lots of lto "type of ... does not match original declaration" warnings that
all seem to be wrong>
...
s_4->decode_mb = ff_h263_decode_mb;

lto1: internal compiler error: verify_stmts failed


-- 
           Summary: lto ice in verify_stmts
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: astrange at ithinksw dot com
  GCC host triplet: x86_64-apple-darwin10.3.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44090

Reply via email to