[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-06 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #10 from Jakub Jelinek  2012-01-06 
22:06:59 UTC ---
Fixed.


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-06 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #9 from Jakub Jelinek  2012-01-06 
22:05:06 UTC ---
Author: jakub
Date: Fri Jan  6 22:05:03 2012
New Revision: 182973

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182973
Log:
PR gcov-profile/50127
* bb-reorder.c (partition_hot_cold_basic_blocks): Call
clear_aux_for_blocks.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/bb-reorder.c


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-06 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Jakub Jelinek  changed:

   What|Removed |Added

 Status|REOPENED|ASSIGNED
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |

--- Comment #8 from Jakub Jelinek  2012-01-06 
13:00:28 UTC ---
Created attachment 26256
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26256
gcc47-pr50127.patch

Untested fix.

The problem was that partition_hot_cold_basic_blocks was leaving garbage in
some bb->aux fields, but subsequent optimization passes and/or df_analyze here
assume that each pass cleans that up after itself.  DF was storing age in
bb->aux as ptrdiff_t values, and when some bb->aux contained pointer to another
bb, if it was in the upper half of address space (for 32-bit hosts), it was
treated as negative age, while if in the lower half of AS (for 64-bit hosts),
it was just assumed to be very huge age.


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-06 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #7 from Jakub Jelinek  2012-01-06 
10:57:15 UTC ---
Ok, I can reproduce this now.
Compared to 64-bit cc1 the difference starts during the bbpart pass,
particularly when partition_hot_cold_basic_blocks invokes df in if
(cfun->eh->lp_array).
Something in the df rescanning or so goes wrong and finally the DF fast DCE
removes setters of two pseudos (114 and 116) that are actually needed.
Note the pseudos are set in a hot bb and used in a cold successor bb (there is
a direct EDGE_CROSSING edge in between the two).


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-05 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE  2012-01-05 17:16:21 UTC ---
> --- Comment #5 from Jakub Jelinek  2012-01-05 
> 09:41:13 UTC ---
> Can't reproduce on x86_64-linux, nor with cross from that to
> i686-sun-solaris2.11 with -m64 and using x86_64-linux bb-reorder.gcda.

It reproduces for me on x86_64-linux with the following configuration:

/vol/gcc/src/hg/trunk/local/configure --prefix=/vol/gcc
--target=i686-unknown-linux-gnu --enable-checking=release --enable-targets=all
--enable-objc-gc --with-as=/vol/gcc/bin/gas-2.22 --with-gnu-as
--with-as=/vol/gcc/bin/gas-2.22 --with-gnu-as
--with-ld=/vol/gcc/bin/i686/gld-2.22 --with-gnu-ld --disable-initfini-array
--with-ld=/vol/gcc/bin/i686/gld-2.22 --with-gnu-ld --disable-initfini-array
--with-gmp-include=/vol/gcc/include --with-gmp-lib=/vol/gcc/lib/i686
--with-mpfr-include=/vol/gcc/include --with-mpfr-lib=/vol/gcc/lib/i686
--with-mpc-include=/vol/gcc/include --with-mpc-lib=/vol/gcc/lib/i686
--enable-languages=all,ada,obj-c++,go --build=i686-unknown-linux-gnu
--host=i686-unknown-linux-gnu

i.e. with a 32-bit compiler executable.  It doesn't with a 64-bit
compiler executable.

Rainer


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-05 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  2012-01-05 
09:41:13 UTC ---
Can't reproduce on x86_64-linux, nor with cross from that to
i686-sun-solaris2.11 with -m64 and using x86_64-linux bb-reorder.gcda.


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2012-01-04 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Rainer Orth  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2012-01-04
 Resolution|DUPLICATE   |
   Target Milestone|--- |4.7.0
 Ever Confirmed|0   |1

--- Comment #4 from Rainer Orth  2012-01-04 17:42:53 UTC 
---
While the partition2.C assembly failure has in fact been resolved by the fix
for
PR 49972, the 64-bit gcc.dg/tree-prof/bb-reorg.c execution failure remains,
as described.

I could meanwhile reproduce it in a i686-unknown-linux-gnu --enable-targets=all
bootstrap, so there's nothing Solaris-specific in here.

Richard, could you please have a look?  This is also a regression from 4.6.

Thanks.
  Rainer


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2011-08-29 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Rainer Orth  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||rth at gcc dot gnu.org
 Resolution||DUPLICATE

--- Comment #3 from Rainer Orth  2011-08-29 16:15:02 UTC 
---
A reghunt has confirmed that the failure of 64-bit

FAIL: gcc.dg/tree-prof/bb-reorg.c execution,-fprofile-use -D_PROFILE_USE

was also caused by

2011-07-23  Richard Henderson  

* basic-block.h (EDGE_PRESERVE): New.
(EDGE_ALL_FLAGS, EDGE_COMPLEX): Include it.
* bb-reorder.c: Include except.h.
[...]

bb-reorg SEGVs here:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
main ()
at
/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c:23
23t2[t0] = s;
(gdb) where
#0  main ()
at
/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c:23
#1  0x00400c4c in _start ()

which is caused by the following difference in assembler output:

--- 21827/gcc/bb-reorg.s2011-08-20 10:48:12.562998495 +0200
+++ 21828/gcc/bb-reorg.s2011-08-20 10:48:23.486467546 +0200
@@ -83,13 +83,13 @@
 .L16:
 movb$0, (%rax)
 movl$buf+4, %eax
-movq$buf+3, t2+32(%rip)
+movq$buf+3, (%rdx)
 cmpb$0, (%rax)
 movl$5, %esi
 je.L19
 movb$0, (%rax)
 movl$buf+5, %eax
-movq$buf+4, t2+40(%rip)
+movq$buf+4, (%rcx)
 cmpb$0, (%rax)
 movl$6, %esi
 movl$7, %ecx

Both %rcx/%rdx are uninitialized.

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


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2011-08-19 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Rainer Orth  changed:

   What|Removed |Added

 Depends on||49972

--- Comment #2 from Rainer Orth  2011-08-19 14:29:26 UTC 
---
The partition2.C part is a duplicate, the bb-reorg.c might be as well.


[Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets

2011-08-19 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #1 from Dominique d'Humieres  2011-08-19 
14:22:34 UTC ---
See pr50035 marked as a duplicate of bug 49972.