Bug 57269 - [4.7 Regression] ICE in gcov_open, at gcov-io.c:82
Summary: [4.7 Regression] ICE in gcov_open, at gcov-io.c:82
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: gcov-profile (show other bugs)
Version: 4.7.4
: P3 normal
Target Milestone: 4.7.4
Assignee: Richard Biener
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-14 02:03 UTC by Ryan Hill
Modified: 2013-05-14 10:50 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.6.4, 4.8.0
Known to fail: 4.7.2
Last reconfirmed: 2013-05-14 00:00:00


Attachments
poc.i.bz2 (17.88 KB, application/x-bzip2)
2013-05-14 02:03 UTC, Ryan Hill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill 2013-05-14 02:03:27 UTC
Created attachment 30107 [details]
poc.i.bz2

$ gcc-4.7.3 -v -O2 poc.i -fprofile-use --coverage -o /dev/null
Using built-in specs.
COLLECT_GCC=gcc-4.7.3
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.3/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.7.3/work/gcc-4.7.3/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --with-cloog --with-ppl --with-cloog-include=/usr/include/cloog-ppl --disable-ppl-version-check --enable-lto --disable-nls --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --enable-multilib --with-multilib-list=m32,m64 --disable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.7.3/python --enable-checking=release --disable-libgcj --enable-libstdcxx-time --disable-libquadmath --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-targets=all --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.7.3 p1.0, pie-0.5.5'
Thread model: posix
gcc version 4.7.3 (Gentoo 4.7.3 p1.0, pie-0.5.5) 
COLLECT_GCC_OPTIONS='-v' '-O2' '-fprofile-use' '-coverage' '-o' '/dev/null' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.3/cc1 -fpreprocessed poc.i -quiet -dumpbase poc.i -mtune=generic -march=x86-64 -auxbase poc -O2 -version -fprofile-use -fprofile-arcs -ftest-coverage -o /tmp/cco33h8C.s
GNU C (Gentoo 4.7.3 p1.0, pie-0.5.5) version 4.7.3 (x86_64-pc-linux-gnu)
	compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (Gentoo 4.7.3 p1.0, pie-0.5.5) version 4.7.3 (x86_64-pc-linux-gnu)
	compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 2df2c46e238255eca0f13c5d46fa52c6
poc.c:1:0: internal compiler error: in gcov_open, at gcov-io.c:82
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.


This also fails with a vanilla build of the 4.7 branch as of May 8.  There is no error with 4.8.0.
Comment 1 Richard Biener 2013-05-14 09:51:19 UTC
Confirmed.

2012-06-30  Nathan Sidwell  <nathan@acm.org>

...
        (coverage_init): Initialize bbg_file_stamp.  Read counts file
        before writing graph header.
...

fixed it for 4.8.
Comment 2 Richard Biener 2013-05-14 10:50:17 UTC
Author: rguenth
Date: Tue May 14 10:49:28 2013
New Revision: 198875

URL: http://gcc.gnu.org/viewcvs?rev=198875&root=gcc&view=rev
Log:
2013-05-14  Richard Biener  <rguenther@suse.de>

	PR gcov-profile/57269
	Backport from mainline
	2012-06-30  Nathan Sidwell  <nathan@acm.org>

	* coverage.c (coverage_init): Read counts file before writing
	graph header.

Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/coverage.c