Bug 35215 - ICE: verify_histograms failed with -fprofile-use
Summary: ICE: verify_histograms failed with -fprofile-use
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Uroš Bizjak
URL:
Keywords: ice-checking
Depends on:
Blocks:
 
Reported: 2008-02-16 04:56 UTC by astrange+gcc@gmail.com
Modified: 2008-05-10 11:21 UTC (History)
4 users (show)

See Also:
Host: 386-apple-darwin9.2.0
Target: 386-apple-darwin9.2.0
Build: 386-apple-darwin9.2.0
Known to work:
Known to fail:
Last reconfirmed: 2008-05-09 19:30:08


Attachments
source (20.41 KB, text/plain)
2008-02-16 04:56 UTC, astrange+gcc@gmail.com
Details
gcda (157 bytes, text/plain)
2008-02-16 04:56 UTC, astrange+gcc@gmail.com
Details
gcno (880 bytes, text/plain)
2008-02-16 04:57 UTC, astrange+gcc@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description astrange+gcc@gmail.com 2008-02-16 04:56:04 UTC
> /usr/local/gcc43/bin/gcc -v
Using built-in specs.
Target: i386-apple-darwin9.2.0
Configured with: ../gcc/configure --prefix=/usr/local/gcc43 --enable-threads=posix --with-arch=core2 --with-tune=core2 --with-gmp=/sw --with-mpfr=/sw --disable-nls --disable-bootstrap --enable-checking=yes,rtl CFLAGS=-g LDFLAGS=/usr/lib/libiconv.dylib --enable-languages=c,c++,objc,obj-c++
Thread model: posix
gcc version 4.3.0 20080215 (experimental) (GCC) 

> /usr/local/gcc43/bin/gcc -O3 -fprofile-use -c pcx.i 
pcx.c: In function 'pcx_decode_frame':
pcx.c:247: error: Dead histogram
IOR value ior:0.
memset (dst_28, 0, 0);

pcx.c:247: internal compiler error: verify_histograms failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

I compiled ffmpeg profiled and didn't exercise code before doing -fprofile-use, so the stats are all empty.
Comment 1 astrange+gcc@gmail.com 2008-02-16 04:56:40 UTC
Created attachment 15164 [details]
source
Comment 2 astrange+gcc@gmail.com 2008-02-16 04:56:56 UTC
Created attachment 15165 [details]
gcda
Comment 3 astrange+gcc@gmail.com 2008-02-16 04:57:08 UTC
Created attachment 15166 [details]
gcno
Comment 4 Richard Biener 2008-02-16 10:54:20 UTC
Happens only with checking enabled.  Honza, can you have a look here?
Comment 5 Uroš Bizjak 2008-05-09 11:50:19 UTC
The proposed patch is attached to PR36129. Should also fix this PR.

*** This bug has been marked as a duplicate of 36129 ***
Comment 6 Uroš Bizjak 2008-05-09 18:23:58 UTC
Alexander, can you apply the patch at http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00562.html to 4.3 branch and test if it fixes your ICE? I would like to backport the patch to 4.3.
Comment 7 Uroš Bizjak 2008-05-09 19:29:30 UTC
This is not the same failure as PR36129. It is similar, just happens in another place.

It also fails on x86_64-linux-gnu. I'll look into it.
Comment 8 Uroš Bizjak 2008-05-09 19:30:08 UTC
Taking bug.
Comment 9 Uroš Bizjak 2008-05-10 11:21:11 UTC
Current 4.3.1 branch doesn't generate memset with zero length anymore.

Closed as WORKSFORME, but if still fails, please reopen and attach new *.i, *.gcda and *.gcno files, produced with latest SVN HEAD versions of the compiler.