Bug 37044 - Heisenbug: SVN of gcc throws internal compiler error on PPC
Summary: Heisenbug: SVN of gcc throws internal compiler error on PPC
Status: RESOLVED DUPLICATE of bug 38553
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-08-07 04:06 UTC by Mike Melanson
Modified: 2008-12-27 14:51 UTC (History)
3 users (show)

See Also:
Host: powerpc-unknown-linux-gnu
Target: powerpc-unknown-linux-gnu
Build: powerpc-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessor output for file that is crashing compiler (133.42 KB, text/plain)
2008-08-08 03:25 UTC, Mike Melanson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Melanson 2008-08-07 04:06:44 UTC
For several months, I have been keeping abreast of recent gcc-SVN builds on several platforms for automatically building and testing a certain free software project. The build for PowerPC has intermittently given internal compiler errors. It has been difficult to nail down because the internal error might go away depending on the state of the project source tree being compiled.

I usually rebuild the gcc-SVN copies once every 1-3 weeks. The gcc build process follows this pattern:

'svn update' in my local copy of the gcc tree
'mkdir build-gcc' in an unrelated directory
'/path/to/gcc-svn/configure --enable-languages=c --prefix=/usr/local/gcc-138544-20080801' -- this reflects the last build I made: SVN revision 138544, built on 2008-08-01

So I build and install the C compiler. When I compile the program in question (ffmpeg) and the build fails, it happens on one of a few files. With the build mentioned above, this command fails:

 /usr/local/gcc-138544-20080801/bin/gcc -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I. -I"/home/melanson/ffmpeg/ffmpeg-main" -fomit-frame-pointer -maltivec -mabi=altivec -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -O3 -fno-math-errno -fno-signed-zeros        -fPIC -DPIC -c -o libavcodec/dca.o /home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c

This is the error:

/home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c: In function 'dca_subsubframe':
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c:941: warning: array subscript is above array bounds
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c:941: warning: array subscript is above array bounds
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c:941: warning: array subscript is above array bounds
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c: In function 'dca_decode_frame':
/home/melanson/ffmpeg/ffmpeg-main/libavcodec/dca.c:1200: internal compiler error: in tree_node_structure, at tree.c:2412
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Now here's the Heisenbug unpredictability: I added -save-temps as requested on the bug page. The compiler does not crash.

I'm working on a new PPC compiler build right now. I just wanted to finally enter this bug as a placeholder. I hope to have more data soon.
Comment 1 Mike Melanson 2008-08-07 05:30:51 UTC
The same thing happens with gcc SVN-138833 (along with FFmpeg SVN 14654)-- dca.c file compilation crashes but not with -save-temps.
Comment 2 pinskia@gmail.com 2008-08-07 05:48:50 UTC
Subject: Re:  Heisenbug: SVN of gcc throws internal compiler error on PPC



Sent from my iPhone

On Aug 6, 2008, at 22:30, "contact at multimedia dot cx" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #1 from contact at multimedia dot cx  2008-08-07  
> 05:30 -------
> The same thing happens with gcc SVN-138833 (along with FFmpeg SVN  
> 14654)--
> dca.c file compilation crashes but not with -save-temps.
>

Please attach the preprocessed source.  This is most likely a GC issue.

-- Pinski



>
> -- 
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37044
>
Comment 3 Mike Melanson 2008-08-08 03:25:00 UTC
Created attachment 16042 [details]
Preprocessor output for file that is crashing compiler

As requested, this is the preprocessed output when adding -save-temps to the command line in the original bug post.
Comment 4 Andrew Pinski 2008-09-03 02:49:24 UTC
I want to say this was really fixed by:
2008-07-24  Ben Elliston  <bje@au.ibm.com>

        * config/rs6000/rs6000-c.c: Move GTY(()) markers to match
        conventional usage.

Comment 5 Mike Melanson 2008-09-04 15:13:02 UTC
Perhaps the change should have, but it didn't. The problem still manifests with SVN 139974 (latest as of yesterday).
Comment 6 Andrew Pinski 2008-12-27 14:51:32 UTC

*** This bug has been marked as a duplicate of 38553 ***