[Bug regression/43867] New: ICE on valid with PGO and -fwhole-program options on small example (istringstream) with gcc 4.5.0 only
martin dot audet at imi dot cnrc-nrc dot gc dot ca
gcc-bugzilla@gcc.gnu.org
Fri Apr 23 15:56:00 GMT 2010
The following little program:
#include <sstream>
int main(int argc, char *argv[])
{
int nn;
return (argc != 2) || !(std::istringstream(argv[1]) >> nn);
}
when compiled with gcc 4.5.0 with both -fwhole-program and -fprofile-use
options generate an ICE. Note that this doesn't happen with gcc 4.4.3 or if I
don't use -fwhole-program option. There is no problem when compiling and
running the above little program with gcc 4.5.0 with -fwhole-program and
-fprogram-generate options. The ICE happens when trying to use the feedback
information.
For example, the command (the small program is in a file named mv.cpp):
rm -f mv.gcda && g++ -Wall -fwhole-program -fprofile-generate mv.cpp &&
./a.out 1000 && g++ -Wall -fwhole-program -fprofile-use mv.cpp
Produce the following output during the second compilation (profile-use):
mv.cpp:8:1: internal compiler error: in ipcp_iterate_stage, at ipa-cp.c:760
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Now here are some information about my gcc and my system:
[audet@mc1 experiences]$ gcc --version
gcc (GCC) 4.5.0
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Note my gcc version is identical to the official except it include the
following patch (r158484) to fix the problem 43771 I submited last week:
--- trunk/gcc/tree-vect-slp.c 2010/04/18 10:52:26 158483
+++ trunk/gcc/tree-vect-slp.c 2010/04/18 12:20:34 158484
@@ -844,7 +844,11 @@
SET_BIT (load_index, prev);
}
-
+
+ for (j = 0; j < group_size; j++)
+ if (!TEST_BIT (load_index, j))
+ return false;
+
sbitmap_free (load_index);
if (supported && i == group_size * group_size
[audet@mc1 experiences]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/publique/gcc45/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.5.0/configure --prefix=/usr/local/gcc45
--enable-shared --enable-threads=posix --with-system-zlib
--with-gmp=/usr/local/gmp-4.3.2 --with-mpfr=/usr/local/mpfr-2.4.2
--with-mpc=/usr/local/mpc-0.8.1 --with-ppl=/usr/local/ppl-0.10.2
--with-cloog=/usr/local/cloog-ppl-0.15.9 --with-libelf=/usr/local/libelf-0.8.12
--enable-__cxa_atexit --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.5.0 (GCC)
[audet@mc1 experiences]$ uname -a
Linux mc1 2.6.22.9-91.fc7 #1 SMP Thu Jun 18 16:01:22 EDT 2009 x86_64 x86_64
x86_64 GNU/Linux
[audet@mc1 experiences]$
As you can see my system uses Fedora Linux 7 distribution. gcc was compiled and
tested (make -k check) on this machine. Only a small fraction of
the tests failled.
Regards,
Martin Audet
--
Summary: ICE on valid with PGO and -fwhole-program options on
small example (istringstream) with gcc 4.5.0 only
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin dot audet at imi dot cnrc-nrc dot gc dot ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43867
More information about the Gcc-bugs
mailing list