public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
@ 2011-08-19 14:23 ro at gcc dot gnu.org
  2011-08-19 14:24 ` [Bug gcov-profile/50127] " dominiq at lps dot ens.fr
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-19 14:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

             Bug #: 50127
           Summary: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs
                    on several targets
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: assemble-failure
          Severity: normal
          Priority: P3
         Component: gcov-profile
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
              Host: *-*-solaris2.*, i386-apple-darwin,
                    x86_64-unknown-linux-gnu
            Target: *-*-solaris2.*, i386-apple-darwin,
                    x86_64-unknown-linux-gnu
             Build: *-*-solaris2.*, i386-apple-darwin,
                    x86_64-unknown-linux-gnu


Between 20110722 and 20110729, g++.dg/tree-prof/partition2.C started to FAIL on
several targets:

FAIL: g++.dg/tree-prof/partition2.C compilation,  -Os  -fprofile-use
UNRESOLVED: g++.dg/tree-prof/partition2.C execution,    -Os  -fprofile-use

On Solaris, the error happens with both Sun as ...

output is:
Assembler: partition2.C
    "/var/tmp//ccdbaqzf.s", line 79 : Illegal subtraction - symbols from
different sections: ".L5", ".LFB0"

... and gas:

output is:
/var/tmp//ccXAayTS.s: Assembler messages:
/var/tmp//ccXAayTS.s:95: Error: invalid operands (.text.unlikely and
.text.startup sections) for `-'

Likewise on Linux/amd64.

This is a regression from 4.5 and 4.6.

At the same time (and only on Solaris, it seems), another tree-prof test
started
to fail:

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

But only for 64-bit Solaris/x86.  I haven't investigated in more detail what's
wrong here.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
@ 2011-08-19 14:24 ` dominiq at lps dot ens.fr
  2011-08-19 14:34 ` ro at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-08-19 14:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-08-19 14:22:34 UTC ---
See pr50035 marked as a duplicate of bug 49972.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
  2011-08-19 14:24 ` [Bug gcov-profile/50127] " dominiq at lps dot ens.fr
@ 2011-08-19 14:34 ` ro at gcc dot gnu.org
  2011-08-29 16:20 ` ro at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-19 14:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |49972

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
  2011-08-19 14:24 ` [Bug gcov-profile/50127] " dominiq at lps dot ens.fr
  2011-08-19 14:34 ` ro at gcc dot gnu.org
@ 2011-08-29 16:20 ` ro at gcc dot gnu.org
  2012-01-04 17:43 ` ro at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-29 16:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |rth at gcc dot gnu.org
         Resolution|                            |DUPLICATE

--- Comment #3 from Rainer Orth <ro at gcc dot gnu.org> 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  <rth@redhat.com>

    * 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
23                t2[t0] = s;
(gdb) where
#0  main ()
    at
/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c:23
#1  0x0000000000400c4c in _start ()

which is caused by the following difference in assembler output:

--- 21827/gcc/bb-reorg.s    2011-08-20 10:48:12.562998495 +0200
+++ 21828/gcc/bb-reorg.s    2011-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 ***


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-08-29 16:20 ` ro at gcc dot gnu.org
@ 2012-01-04 17:43 ` ro at gcc dot gnu.org
  2012-01-05  9:42 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2012-01-04 17:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Rainer Orth <ro at gcc dot gnu.org> 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 <ro at gcc dot gnu.org> 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-01-04 17:43 ` ro at gcc dot gnu.org
@ 2012-01-05  9:42 ` jakub at gcc dot gnu.org
  2012-01-05 17:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-05  9:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-01-05  9:42 ` jakub at gcc dot gnu.org
@ 2012-01-05 17:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2012-01-06 10:57 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2012-01-05 17:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2012-01-05 17:16:21 UTC ---
> --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-01-05 17:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2012-01-06 10:57 ` jakub at gcc dot gnu.org
  2012-01-06 13:01 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-06 10:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 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).


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-01-06 10:57 ` jakub at gcc dot gnu.org
@ 2012-01-06 13:01 ` jakub at gcc dot gnu.org
  2012-01-06 22:06 ` jakub at gcc dot gnu.org
  2012-01-06 22:08 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-06 13:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Jakub Jelinek <jakub at gcc dot gnu.org> 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 <jakub at gcc dot gnu.org> 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.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-01-06 13:01 ` jakub at gcc dot gnu.org
@ 2012-01-06 22:06 ` jakub at gcc dot gnu.org
  2012-01-06 22:08 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-06 22:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug gcov-profile/50127] [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets
  2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-01-06 22:06 ` jakub at gcc dot gnu.org
@ 2012-01-06 22:08 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-06 22:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50127

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-06 22:06:59 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-01-06 22:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-19 14:23 [Bug gcov-profile/50127] New: [4.7 regression] g++.dg/tree-prof/partition2.C FAILs on several targets ro at gcc dot gnu.org
2011-08-19 14:24 ` [Bug gcov-profile/50127] " dominiq at lps dot ens.fr
2011-08-19 14:34 ` ro at gcc dot gnu.org
2011-08-29 16:20 ` ro at gcc dot gnu.org
2012-01-04 17:43 ` ro at gcc dot gnu.org
2012-01-05  9:42 ` jakub at gcc dot gnu.org
2012-01-05 17:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
2012-01-06 10:57 ` jakub at gcc dot gnu.org
2012-01-06 13:01 ` jakub at gcc dot gnu.org
2012-01-06 22:06 ` jakub at gcc dot gnu.org
2012-01-06 22:08 ` jakub at gcc dot gnu.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).