public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use
@ 2007-01-31 11:13 burnus at gcc dot gnu dot org
2007-01-31 12:48 ` [Bug gcov-profile/30650] " rguenth at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-31 11:13 UTC (permalink / raw)
To: gcc-bugs
This is with gcc-Version 4.3.0 20070131 on x86_64-unknown-linux-gnu.
Using the Polyhedron tests, four tests fail with the -fprofile-use option, cf.
http://www.physik.fu-berlin.de/~tburnus/gcc-trunk/benchmark/#rt
The tests are available from:
http://www.polyhedron.co.uk/pb05/polyhedron_benchmark_suite.html
I did:
gfortran -fprofile-generate -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -msse3 -O3 -o aermod aermod.f90
./aermod
gfortran -fprofile-use -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -msse3 -O3 aermod.f90
The latter crashes with
test.f90: In function 'setidg':
test.f90:48679: internal compiler error: Floating point exception
If the *.gc* file(s) don't exist, no error occures.
This regression occurs between 2007-01-27-r121231 and 2007-01-30-r121332.
Program received signal SIGFPE, Arithmetic exception.
0x000000000076c316 in stringop_block_profile (stmt=0x2b59f9ca67d0,
expected_align=0x7fffb3a2ed70, expected_size=0x7fffb3a2ed68)
at /projects/tob/gcc/gcc/value-prof.c:1440
1440 size = ((histogram->hvalue.counters[0]
(gdb) bt
#0 0x000000000076c316 in stringop_block_profile (stmt=0x2b59f9ca67d0,
expected_align=0x7fffb3a2ed70, expected_size=0x7fffb3a2ed68)
at /projects/tob/gcc/gcc/value-prof.c:1440
#1 0x00000000004c4f97 in expand_builtin_memset (arglist=<value optimized out>,
target=0x2b59f70c7400, mode=VOIDmode,
orig_exp=0x2b59f9ca67d0) at /projects/tob/gcc/gcc/builtins.c:3739
#2 0x00000000004c86db in expand_builtin (exp=0x2b59f9ca67d0,
target=0x2b59f70c7400, subtarget=0x0, mode=VOIDmode, ignore=1)
at /projects/tob/gcc/gcc/builtins.c:6228
#3 0x0000000000534bb8 in expand_expr_real_1 (exp=0x2b59f9ca67d0, target=0x0,
tmode=VOIDmode, modifier=EXPAND_NORMAL, alt_rtl=0x0)
at /projects/tob/gcc/gcc/expr.c:7724
#4 0x000000000053a3e3 in expand_expr_real (exp=0x2b59f9ca67d0,
target=0x2b59f70c7400, tmode=VOIDmode, modifier=EXPAND_NORMAL,
alt_rtl=0x0) at /projects/tob/gcc/gcc/expr.c:6746
#5 0x0000000000642049 in expand_expr_stmt (exp=0x2b59fa3e8540) at
/projects/tob/gcc/gcc/expr.h:501
#6 0x00000000008ed6b5 in expand_gimple_basic_block (bb=0x2b59fa526000) at
/projects/tob/gcc/gcc/cfgexpand.c:1540
#7 0x00000000008ee42e in tree_expand_cfg () at
/projects/tob/gcc/gcc/cfgexpand.c:1810
--
Summary: [Regression 4.3] ICE with -fprofile-use
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [Regression 4.3] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
@ 2007-01-31 12:48 ` rguenth at gcc dot gnu dot org
2007-02-03 17:32 ` [Bug gcov-profile/30650] [4.3 Regression] " jsm28 at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-31 12:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2007-01-31 12:48 -------
Confirmed. I'm confused by the code anyways:
size = ((histogram->hvalue.counters[0]
+ histogram->hvalue.counters[0] / 2)
/ histogram->hvalue.counters[0]);
according to the source counter[0] is supposed to be the sum of the sizes and
counters[1] the call count. Also all of this profiling stuff needs better
commenting. Like
#define GCOV_COUNTER_AVERAGE 6 /* The most common difference between
consecutive values of expression. */
#define GCOV_COUNTER_IOR 7 /* The most common difference between
consecutive values of expression. */
and
case HIST_TYPE_AVERAGE:
hist->n_counters = 3;
break;
(which should be 2?) as
void
__gcov_average_profiler (gcov_type *counters, gcov_type value)
{
counters[0] += value;
counters[1] ++;
}
suggests.
So the code in question should probably read
if (!histogram
|| histogram->hvalue.counters[1] == 0)
*expected_size = -1;
else
{
gcov_type size;
size = ((histogram->hvalue.counters[0]
+ histogram->hvalue.counters[0] / 2)
/ histogram->hvalue.counters[1]);
but defering to Honza who wrote all this code.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-01-31 12:48:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
2007-01-31 12:48 ` [Bug gcov-profile/30650] " rguenth at gcc dot gnu dot org
@ 2007-02-03 17:32 ` jsm28 at gcc dot gnu dot org
2007-02-03 21:45 ` stefaan dot deroeck at gmail dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2007-02-03 17:32 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[Regression 4.3] ICE with - |[4.3 Regression] ICE with -
|fprofile-use |fprofile-use
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
2007-01-31 12:48 ` [Bug gcov-profile/30650] " rguenth at gcc dot gnu dot org
2007-02-03 17:32 ` [Bug gcov-profile/30650] [4.3 Regression] " jsm28 at gcc dot gnu dot org
@ 2007-02-03 21:45 ` stefaan dot deroeck at gmail dot com
2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: stefaan dot deroeck at gmail dot com @ 2007-02-03 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from stefaan dot deroeck at gmail dot com 2007-02-03 21:45 -------
I'm guessing "make profiledbootstrap" fails on my machine for the same reason.
(I get the same ICE). Last tested with snapshot gcc-4.3.0_alpha20070202. My
platform is i386 though, not x86_64, using CFLAGS "-march=pentium4 -O2 -pipe".
For sake of completeness, I tried "make bootstrap-lean" to see if the same
error would occur. The build failed on assembler messages trying to compile
io/unix.c in libgfortran, which I'm guessing is at a later stage than the ICE
we're talking about.
--
stefaan dot deroeck at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stefaan dot deroeck at gmail
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
@ 2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
2007-02-03 21:51 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-02-03 21:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hubicka at gcc dot gnu dot org 2007-02-03 21:49 -------
Created an attachment (id=13002)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13002&action=view)
Fix
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-02-03 21:45 ` stefaan dot deroeck at gmail dot com
@ 2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-02-03 21:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from hubicka at gcc dot gnu dot org 2007-02-03 21:48 -------
Testing fix.
--
hubicka at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |hubicka at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-01-31 12:48:13 |2007-02-03 21:48:50
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
@ 2007-02-03 21:51 ` rguenth at gcc dot gnu dot org
2007-02-03 21:55 ` hubicka at ucw dot cz
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-03 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-02-03 21:51 -------
size = ((histogram->hvalue.counters[0]
+ histogram->hvalue.counters[0] / 2)
- / histogram->hvalue.counters[0]);
+ / histogram->hvalue.counters[1]);
micha suggested you meant
size = ((histogram->hvalue.counters[0]
+ histogram->hvalue.counters[1] / 2)
/ histogram->hvalue.counters[1]);
(upward rounding)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-02-03 21:51 ` rguenth at gcc dot gnu dot org
@ 2007-02-03 21:55 ` hubicka at ucw dot cz
2007-02-03 23:36 ` hubicka at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at ucw dot cz @ 2007-02-03 21:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from hubicka at ucw dot cz 2007-02-03 21:55 -------
Subject: Re: [4.3 Regression] ICE with -fprofile-use
> size = ((histogram->hvalue.counters[0]
> + histogram->hvalue.counters[0] / 2)
> - / histogram->hvalue.counters[0]);
> + / histogram->hvalue.counters[1]);
>
> micha suggested you meant
>
> size = ((histogram->hvalue.counters[0]
> + histogram->hvalue.counters[1] / 2)
> / histogram->hvalue.counters[1]);
>
> (upward rounding)
Ah, yes, thanks! I probably should've scheduled updating this patch for
mainline after the trip as I didn't do particularly good work on it just
before leaving :(
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-02-03 21:55 ` hubicka at ucw dot cz
@ 2007-02-03 23:36 ` hubicka at gcc dot gnu dot org
2007-02-05 14:45 ` burnus at gcc dot gnu dot org
2007-02-14 1:25 ` hubicka at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-02-03 23:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from hubicka at gcc dot gnu dot org 2007-02-03 23:35 -------
Subject: Bug 30650
Author: hubicka
Date: Sat Feb 3 23:35:42 2007
New Revision: 121554
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121554
Log:
PR gcov-profile/30650
* value-prof.c (stringop_block_profile): Fix handling of size counter;
do not divide by zero for never executed counters.
(tree_find_values_to_profile): Fix counters.
* gcov-ui.h (GCOV_COUNTER_AVERAGE, GCOV_COUNTER_IOR): Fix comments.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcov-io.h
trunk/gcc/value-prof.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-02-03 23:36 ` hubicka at gcc dot gnu dot org
@ 2007-02-05 14:45 ` burnus at gcc dot gnu dot org
2007-02-14 1:25 ` hubicka at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-05 14:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from burnus at gcc dot gnu dot org 2007-02-05 14:45 -------
Thanks, aermod now works. :-)
channel, gas_dyn, induct, nf, protein, rnflow still fail respectively fail now.
$ gfortran -fprofile-generate -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -O3 -o channel channel.f90
$ ./channel
$ gfortran -fprofile-use -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -msse3 -O3 channel.f90 -o channel
channel.f90: In function 'ddx':
channel.f90:280: error: coverage mismatch for function 'ddx.1399' while reading
counter 'arcs'
channel.f90:280: note: checksum is ba382717 instead of 69f94a4c
channel.f90: In function 'ddy':
channel.f90:280: error: coverage mismatch for function 'ddy.1395' while reading
counter 'arcs'
channel.f90:280: note: checksum is bb64fb88 instead of 68a596d3
$ gfortran -fprofile-generate -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -O3 -o gas_dyn gas_dyn.f90
$ ./gas_dyn
$ gfortran -fprofile-use -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -msse3 -O3 gas_dyn.f90 -o gas_dyn
gas_dyn.f90: In function 'cd':
gas_dyn.f90:2381: error: coverage mismatch for function 'cd.1530' while reading
counter 'arcs'
gas_dyn.f90:2381: note: checksum is 84fd4f39 instead of df1d94b9
gas_dyn.f90: In function 'sgeom':
gas_dyn.f90:2381: error: coverage mismatch for function 'sgeom.1760' while
reading counter 'arcs'
gas_dyn.f90:2381: note: checksum is d9079ae8 instead of 82e74168
gas_dyn.f90: In function 'qsort':
gas_dyn.f90:2381: error: coverage mismatch for function 'qsort.2270' while
reading counter 'arcs'
gas_dyn.f90:2381: note: checksum is 33561d20 instead of 68b6c6a0
$ gfortran -fprofile-generate -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -O3 -o induct induct.f90
$ ./induct
$ gfortran -fprofile-use -march=opteron -ffast-math -funroll-loops
-ftree-vectorize -msse3 -O3 induct.f90 -o induct
induct.f90: In function 'time_now':
induct.f90:6607: error: coverage mismatch for function 'time_now.7478' while
reading counter 'arcs'
induct.f90:6607: note: checksum is 76f94b6a instead of caa6dac5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug gcov-profile/30650] [4.3 Regression] ICE with -fprofile-use
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-02-05 14:45 ` burnus at gcc dot gnu dot org
@ 2007-02-14 1:25 ` hubicka at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: hubicka at gcc dot gnu dot org @ 2007-02-14 1:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from hubicka at gcc dot gnu dot org 2007-02-14 01:24 -------
Hi,
the reason is -msse3 that is supposed to be at both invocations. -msse3
enables the SSE builtins that do change declarations UIDs that in turn changes
function names:
< ;; Function ddx (ddx.1401)
---
> ;; Function ddx (ddx.1390)
so profiles can't match. While it is possible to ignore the SSA names, I don't
think there is actual need to mess with this - the use of different swtiches
that do affect input language clearly can't be much accepted in between train
and compilation run
(I am hoping that optimization switches like -funroll-loops will run, but for
language features, like SSE is we will get different divergences anyway)
The other problem was fixed, so I am closing the PR.
Honza
--
hubicka at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30650
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2007-02-14 1:25 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-31 11:13 [Bug gcov-profile/30650] New: [Regression 4.3] ICE with -fprofile-use burnus at gcc dot gnu dot org
2007-01-31 12:48 ` [Bug gcov-profile/30650] " rguenth at gcc dot gnu dot org
2007-02-03 17:32 ` [Bug gcov-profile/30650] [4.3 Regression] " jsm28 at gcc dot gnu dot org
2007-02-03 21:45 ` stefaan dot deroeck at gmail dot com
2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
2007-02-03 21:49 ` hubicka at gcc dot gnu dot org
2007-02-03 21:51 ` rguenth at gcc dot gnu dot org
2007-02-03 21:55 ` hubicka at ucw dot cz
2007-02-03 23:36 ` hubicka at gcc dot gnu dot org
2007-02-05 14:45 ` burnus at gcc dot gnu dot org
2007-02-14 1:25 ` hubicka at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).