public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on x86_64-apple-darwin13 with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-21 13:04 ` rguenth at gcc dot gnu.org
  2013-11-21 13:51 ` [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* " dominiq at lps dot ens.fr
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-21 13:04 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.0


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
  2013-11-21 13:04 ` [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on x86_64-apple-darwin13 with -m32 rguenth at gcc dot gnu.org
@ 2013-11-21 13:51 ` dominiq at lps dot ens.fr
  2013-11-21 14:10 ` dominiq at lps dot ens.fr
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-11-21 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-apple-darwin13       |*-apple-darwin*
               Host|x86_64-apple-darwin13       |*-apple-darwin*
            Summary|[4.9 Regression] C++        |[4.9 Regression] C++
                   |failures after revision     |failures after revision
                   |205058 on                   |205058 on *-apple-darwin*
                   |x86_64-apple-darwin13 with  |with -m32
                   |-m32                        |
              Build|x86_64-apple-darwin13       |*-apple-darwin*

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The PR is exposed by r205058: if I compile the tests with r205057 (back to
r202590) and -freorder-blocks-and-partition, I get the ICE. I see the same
behavior on powerpc-apple-darwin9 (for both -m32 and -m64) and
x86_64-apple-darwin10.

Note that I don't get the ICE under a debugger.


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
  2013-11-21 13:04 ` [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on x86_64-apple-darwin13 with -m32 rguenth at gcc dot gnu.org
  2013-11-21 13:51 ` [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* " dominiq at lps dot ens.fr
@ 2013-11-21 14:10 ` dominiq at lps dot ens.fr
  2013-11-21 14:41 ` tejohnson at google dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-11-21 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The ICE with -freorder-blocks-and-partition appeared between revisions 200946
(OK, 2013-07-14) and 201266 (ICE, 2013-07-26).


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-11-21 14:10 ` dominiq at lps dot ens.fr
@ 2013-11-21 14:41 ` tejohnson at google dot com
  2013-11-21 15:05 ` iains at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: tejohnson at google dot com @ 2013-11-21 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Teresa Johnson <tejohnson at google dot com> ---
On Thu, Nov 21, 2013 at 6:10 AM, dominiq at lps dot ens.fr
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
>
> --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> The ICE with -freorder-blocks-and-partition appeared between revisions 200946
> (OK, 2013-07-14) and 201266 (ICE, 2013-07-26).
>

Taking a look. Since I can't reproduce on x86-64-unknown-linux-gnu I
am going to build a cross-compiler for x86_64-apple-darwin10 and see
if I can reproduce it. I looked at the range of revisions you mention
above and there weren't any partitioning specific changes, so it is
probably a side effect of some other change in that range.

Teresa

> --
> You are receiving this mail because:
> You are on the CC list for the bug.


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-11-21 14:41 ` tejohnson at google dot com
@ 2013-11-21 15:05 ` iains at gcc dot gnu.org
  2013-11-21 15:06 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: iains at gcc dot gnu.org @ 2013-11-21 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-21
     Ever confirmed|0                           |1

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Teresa Johnson from comment #3)
> On Thu, Nov 21, 2013 at 6:10 AM, dominiq at lps dot ens.fr
> <gcc-bugzilla@gcc.gnu.org> wrote:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
> >
> > --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > The ICE with -freorder-blocks-and-partition appeared between revisions 200946
> > (OK, 2013-07-14) and 201266 (ICE, 2013-07-26).
> >
> 
> Taking a look. Since I can't reproduce on x86-64-unknown-linux-gnu I
> am going to build a cross-compiler for x86_64-apple-darwin10 and see
> if I can reproduce it. I looked at the range of revisions you mention
> above and there weren't any partitioning specific changes, so it is
> probably a side effect of some other change in that range.

confirmed with TOT on x86_64-darwin12 for -m32 -Os only, other optimisation
levels are OK.

/src/gcc-live-trunk/gcc/testsuite/g++.dg/torture/pr52772.C: In member function
‘int c8::tria(c7*, c5*)’:
/src/gcc-live-trunk/gcc/testsuite/g++.dg/torture/pr52772.C:85:1: internal
compiler error: Segmentation fault: 11
 }
>From gcc-bugs-return-435415-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 21 15:05:46 2013
Return-Path: <gcc-bugs-return-435415-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29679 invoked by alias); 21 Nov 2013 15:05:46 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 29609 invoked by uid 48); 21 Nov 2013 15:05:43 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59216] [4.9 Regression] ARM negdi*extendsidi regression
Date: Thu, 21 Nov 2013 15:05:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: wrong-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: priority short_desc
Message-ID: <bug-59216-4-4s26teusgx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59216-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59216-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02192.txt.bz2
Content-length: 437

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY216

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
            Summary|[[4.9 Regression] ARM]      |[4.9 Regression] ARM
                   |negdi*extendsidi regression |negdi*extendsidi regression


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2013-11-21 15:05 ` iains at gcc dot gnu.org
@ 2013-11-21 15:06 ` rguenth at gcc dot gnu.org
  2013-11-21 15:12 ` tejohnson at google dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-21 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2013-11-21 15:06 ` rguenth at gcc dot gnu.org
@ 2013-11-21 15:12 ` tejohnson at google dot com
  2013-11-21 17:32 ` tejohnson at google dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: tejohnson at google dot com @ 2013-11-21 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Teresa Johnson <tejohnson at google dot com> ---
Reproduced with cross compiler:

$
/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/bld-gcc/./gcc/xg++
-B/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/bld-gcc/./gcc/
-B/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/bin/
-B/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/lib/
-isystem
/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/include
-isystem
/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/sys-include
   -c -m32 -Os pr52772.C
pr52772.C: In member function ‘int c8::tria(c7*, c5*)’:
pr52772.C:85:1: internal compiler error: Segmentation fault
 }
 ^
0xb657af crash_signal
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/toplev.c:336
0xff4e1d old_insns_match_p
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1128
0xff4e1d old_insns_match_p
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1093
0xff5943 outgoing_edges_match
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1754
0xff5943 try_crossjump_to_edge
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1927
0xff6ed4 try_crossjump_bb
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:2252
0xff6ed4 try_crossjump_bb
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:2138
0xff7a6c try_optimize_cfg
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:2808
0xff7a6c cleanup_cfg(int)
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:3014
0xff9836 execute_jump2
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:3123
0xff9836 execute
/usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:3152
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

In debugger:

Program received signal SIGSEGV, Segmentation fault.
old_insns_match_p (i2=0x7ffff6390cc0, i1=0x7ffff6390d00, mode=2)
    at /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1128
1128  if (GET_CODE (p1) != GET_CODE (p2))
(gdb) p p1
$1 = (rtx) 0x0
(gdb) p p2
$2 = (rtx) 0x0
(gdb) p i1
$3 = (rtx) 0x7ffff6390d00
(gdb) p i2
$4 = (rtx) 0x7ffff6390cc0
(gdb) p debug_rtx(i1)
(note 170 134 58 7 NOTE_INSN_DELETED)
$5 = void
(gdb) p debug_rtx(i2)
(note 169 130 87 11 NOTE_INSN_DELETED)
$6 = void

So it doesn't handle NOTE_INSN_DELETED. Looking at the caller:

(gdb) up
#1  old_insns_match_p (mode=2, i1=0x7ffff6390d00, i2=0x7ffff6390cc0)
    at /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1093
1093 old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2)
(gdb) up
#2  0x0000000000ff5944 in outgoing_edges_match (bb2=0x7ffff639b270,
    bb1=0x7ffff639b2d8, mode=2)
    at /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1754
1754  if (old_insns_match_p (mode, last1, last2) != dir_both)
(gdb) p debug_bb(bb1)
(code_label/s 131 154 134 7 17 "" [1 uses])
(note 134 131 170 7 [bb 7] NOTE_INSN_BASIC_BLOCK)
(note 170 134 58 7 NOTE_INSN_DELETED)

$11 = void
(gdb) p debug_bb(bb2)
(code_label/s 127 167 130 11 16 "" [1 uses])
(note 130 127 169 11 [bb 11] NOTE_INSN_BASIC_BLOCK)
(note 169 130 87 11 NOTE_INSN_DELETED)

$12 = void


Looking to see what the right solution is here - either
old_insns_match_p should handle this or caller outgoing_edges_match
should avoid calling old_insns_match_p on these instruction types.

Teresa

On Thu, Nov 21, 2013 at 6:41 AM, tejohnson at google dot com
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
>
> --- Comment #3 from Teresa Johnson <tejohnson at google dot com> ---
> On Thu, Nov 21, 2013 at 6:10 AM, dominiq at lps dot ens.fr
> <gcc-bugzilla@gcc.gnu.org> wrote:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
>>
>> --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
>> The ICE with -freorder-blocks-and-partition appeared between revisions 200946
>> (OK, 2013-07-14) and 201266 (ICE, 2013-07-26).
>>
>
> Taking a look. Since I can't reproduce on x86-64-unknown-linux-gnu I
> am going to build a cross-compiler for x86_64-apple-darwin10 and see
> if I can reproduce it. I looked at the range of revisions you mention
> above and there weren't any partitioning specific changes, so it is
> probably a side effect of some other change in that range.
>
> Teresa
>
>> --
>> You are receiving this mail because:
>> You are on the CC list for the bug.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>From gcc-bugs-return-435424-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 21 15:17:52 2013
Return-Path: <gcc-bugs-return-435424-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18046 invoked by alias); 21 Nov 2013 15:17:51 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17978 invoked by uid 48); 21 Nov 2013 15:17:45 -0000
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/51635] LTO should not merge (type) decls with different locations
Date: Thu, 21 Nov 2013 15:17:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: lto
X-Bugzilla-Version: 4.7.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: rguenth at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-51635-4-Ono7eeosn9@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-51635-4@http.gcc.gnu.org/bugzilla/>
References: <bug-51635-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02201.txt.bz2
Content-length: 528

http://gcc.gnu.org/bugzilla/show_bug.cgi?idQ635

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
Let's close this - the new tree merging has landed and should have improved
all this.

(fingers crossing).


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2013-11-21 15:12 ` tejohnson at google dot com
@ 2013-11-21 17:32 ` tejohnson at google dot com
  2013-11-21 18:55 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: tejohnson at google dot com @ 2013-11-21 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Teresa Johnson <tejohnson at google dot com> ---
On Thu, Nov 21, 2013 at 7:10 AM, tejohnson at google dot com
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
>
> --- Comment #5 from Teresa Johnson <tejohnson at google dot com> ---
> Reproduced with cross compiler:
>
> $
> /usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/bld-gcc/./gcc/xg++
> -B/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/bld-gcc/./gcc/
> -B/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/bin/
> -B/usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/lib/
> -isystem
> /usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/include
> -isystem
> /usr/local/google/home/tejohnson/gcc_trunk_9_x86_64-apple-darwin10/install/x86_64-apple-darwin10/sys-include
>    -c -m32 -Os pr52772.C
> pr52772.C: In member function ‘int c8::tria(c7*, c5*)’:
> pr52772.C:85:1: internal compiler error: Segmentation fault
>  }
>  ^
> 0xb657af crash_signal
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/toplev.c:336
> 0xff4e1d old_insns_match_p
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1128
> 0xff4e1d old_insns_match_p
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1093
> 0xff5943 outgoing_edges_match
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1754
> 0xff5943 try_crossjump_to_edge
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1927
> 0xff6ed4 try_crossjump_bb
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:2252
> 0xff6ed4 try_crossjump_bb
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:2138
> 0xff7a6c try_optimize_cfg
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:2808
> 0xff7a6c cleanup_cfg(int)
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:3014
> 0xff9836 execute_jump2
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:3123
> 0xff9836 execute
> /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:3152
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
> In debugger:
>
> Program received signal SIGSEGV, Segmentation fault.
> old_insns_match_p (i2=0x7ffff6390cc0, i1=0x7ffff6390d00, mode=2)
>     at /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1128
> 1128  if (GET_CODE (p1) != GET_CODE (p2))
> (gdb) p p1
> $1 = (rtx) 0x0
> (gdb) p p2
> $2 = (rtx) 0x0
> (gdb) p i1
> $3 = (rtx) 0x7ffff6390d00
> (gdb) p i2
> $4 = (rtx) 0x7ffff6390cc0
> (gdb) p debug_rtx(i1)
> (note 170 134 58 7 NOTE_INSN_DELETED)
> $5 = void
> (gdb) p debug_rtx(i2)
> (note 169 130 87 11 NOTE_INSN_DELETED)
> $6 = void
>
> So it doesn't handle NOTE_INSN_DELETED. Looking at the caller:
>
> (gdb) up
> #1  old_insns_match_p (mode=2, i1=0x7ffff6390d00, i2=0x7ffff6390cc0)
>     at /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1093
> 1093 old_insns_match_p (int mode ATTRIBUTE_UNUSED, rtx i1, rtx i2)
> (gdb) up
> #2  0x0000000000ff5944 in outgoing_edges_match (bb2=0x7ffff639b270,
>     bb1=0x7ffff639b2d8, mode=2)
>     at /usr/local/google/home/tejohnson/gcc_trunk_9/gcc/cfgcleanup.c:1754
> 1754  if (old_insns_match_p (mode, last1, last2) != dir_both)
> (gdb) p debug_bb(bb1)
> (code_label/s 131 154 134 7 17 "" [1 uses])
> (note 134 131 170 7 [bb 7] NOTE_INSN_BASIC_BLOCK)
> (note 170 134 58 7 NOTE_INSN_DELETED)
>
> $11 = void
> (gdb) p debug_bb(bb2)
> (code_label/s 127 167 130 11 16 "" [1 uses])
> (note 130 127 169 11 [bb 11] NOTE_INSN_BASIC_BLOCK)
> (note 169 130 87 11 NOTE_INSN_DELETED)
>
> $12 = void
>
>
> Looking to see what the right solution is here - either
> old_insns_match_p should handle this or caller outgoing_edges_match
> should avoid calling old_insns_match_p on these instruction types.

I have added handling to outgoing_edges_match to ignore these and
other types of notes that it doesn't understand, just as it was
ignoring debug instructions. This fixes the immediate problem.

But the next question is how does -freorder-blocks-and-partition cause
an issue, since it won't do anything with -Os? The reason is that in
except.c when expanding landing pads, under
flag_reorder_blocks_and_partition the edges are marked with
EDGE_PRESERVE, which means some  block combining upstream of jump2 is
not occurring, resulting in the attempt at optimizing this block. Note
that later on the EDGE_PRESERVE flag is removed by
find_rarely_executed_basic_blocks_and_crossing_edges. However, in this
case since we have -Os, bbpart is gated off, and we never execute
find_rarely_executed_basic_blocks_and_crossing_edges. Additionally, we
can detect earlier during except.c that we will not even attempt
bbpart. In order to do this I have moved the body of
gate_handle_partition_blocks to a new function do_partition_blocks
that can be called by except.c to check whether we really need to
preserve the landing pad edges.

I am currently regression testing both fixes on
x86-64-unknown-linux-gnu. Here is the full patch.

Teresa

2013-11-21  Teresa Johnson  <tejohnson@google.com>

        * bb-reorder.c (do_partition_blocks): New function.
        (gate_handle_partition_blocks): Call do_partition_blocks.
        * bb-reorder.h (do_partition_blocks): Declare.
        * cfgcleanup.c (outgoing_edges_match): Walk up past note instructions
        not understood by old_insns_match_p.
        * except.c (dw2_build_landing_pads): Call do_partition_blocks.

Index: bb-reorder.c
===================================================================
--- bb-reorder.c        (revision 205063)
+++ bb-reorder.c        (working copy)
@@ -2532,8 +2532,13 @@ make_pass_duplicate_computed_gotos (gcc::context *
   return new pass_duplicate_computed_gotos (ctxt);
 }

-static bool
-gate_handle_partition_blocks (void)
+/* This function will return true if hot/cold partitioning will
+   be performed, and is declared non-static so that other passes
+   (namely landing pad expansion in except.c) can more accurately
+   determine whether they need to assume that partitioning will occur.  */
+
+bool
+do_partition_blocks (void)
 {
   /* The optimization to partition hot/cold basic blocks into separate
      sections of the .o file does not work well with linkonce or with
@@ -2548,6 +2553,12 @@ make_pass_duplicate_computed_gotos (gcc::context *
          && !user_defined_section_attribute);
 }

+static bool
+gate_handle_partition_blocks (void)
+{
+  return do_partition_blocks ();
+}
+
 /* This function is the main 'entrance' for the optimization that
    partitions hot and cold basic blocks into separate sections of the
    .o file (to improve performance and cache locality).  Ideally it
Index: bb-reorder.h
===================================================================
--- bb-reorder.h        (revision 205063)
+++ bb-reorder.h        (working copy)
@@ -37,4 +37,5 @@ extern int get_uncond_jump_length (void);

 extern void insert_section_boundary_note (void);

+extern bool do_partition_blocks (void);
 #endif
Index: cfgcleanup.c
===================================================================
--- cfgcleanup.c        (revision 205063)
+++ cfgcleanup.c        (working copy)
@@ -1743,12 +1743,20 @@ outgoing_edges_match (int mode, basic_block bb1, b
        }
     }

+  /* Find the last non-debug non-note instruction in each bb, except
+     stop when we see the NOTE_INSN_BASIC_BLOCK, as old_insns_match_p
+     handles that case specially. old_insns_match_p does not handle
+     other types of instruction notes.  */
   rtx last1 = BB_END (bb1);
   rtx last2 = BB_END (bb2);
-  if (DEBUG_INSN_P (last1))
-    last1 = prev_nondebug_insn (last1);
-  if (DEBUG_INSN_P (last2))
-    last2 = prev_nondebug_insn (last2);
+  while (!NOTE_INSN_BASIC_BLOCK_P (last1) &&
+         (DEBUG_INSN_P (last1) || NOTE_P (last1)))
+    last1 = PREV_INSN (last1);
+  while (!NOTE_INSN_BASIC_BLOCK_P (last2) &&
+         (DEBUG_INSN_P (last2) || NOTE_P (last2)))
+    last2 = PREV_INSN (last2);
+  gcc_assert (last1 && last2);
+
   /* First ensure that the instructions match.  There may be many outgoing
      edges so this test is generally cheaper.  */
   if (old_insns_match_p (mode, last1, last2) != dir_both)
Index: except.c
===================================================================
--- except.c    (revision 205063)
+++ except.c    (working copy)
@@ -125,6 +125,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "except.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
+#include "bb-reorder.h"
 #include "output.h"
 #include "dwarf2asm.h"
 #include "dwarf2out.h"
@@ -1014,7 +1015,7 @@ dw2_build_landing_pads (void)
      new landing pads later, which means that we need to hold on to
      the post-landing-pad block.  Prevent it from being merged away.
      We'll remove this bit after partitioning.  */
-  if (flag_reorder_blocks_and_partition)
+  if (do_partition_blocks ())
     e_flags |= EDGE_PRESERVE;

   for (i = 1; vec_safe_iterate (cfun->eh->lp_array, i, &lp); ++i)


>
> Teresa
>
> On Thu, Nov 21, 2013 at 6:41 AM, tejohnson at google dot com
> <gcc-bugzilla@gcc.gnu.org> wrote:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
>>
>> --- Comment #3 from Teresa Johnson <tejohnson at google dot com> ---
>> On Thu, Nov 21, 2013 at 6:10 AM, dominiq at lps dot ens.fr
>> <gcc-bugzilla@gcc.gnu.org> wrote:
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233
>>>
>>> --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
>>> The ICE with -freorder-blocks-and-partition appeared between revisions 200946
>>> (OK, 2013-07-14) and 201266 (ICE, 2013-07-26).
>>>
>>
>> Taking a look. Since I can't reproduce on x86-64-unknown-linux-gnu I
>> am going to build a cross-compiler for x86_64-apple-darwin10 and see
>> if I can reproduce it. I looked at the range of revisions you mention
>> above and there weren't any partitioning specific changes, so it is
>> probably a side effect of some other change in that range.
>>
>> Teresa
>>
>>> --
>>> You are receiving this mail because:
>>> You are on the CC list for the bug.
>>
>> --
>> You are receiving this mail because:
>> You are on the CC list for the bug.
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>From gcc-bugs-return-435436-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 21 17:39:08 2013
Return-Path: <gcc-bugs-return-435436-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 10382 invoked by alias); 21 Nov 2013 17:39:07 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 10343 invoked by uid 48); 21 Nov 2013 17:39:04 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/41090] [4.7/4.8/4.9 Regression] Using static label reference in c++ class constructor produces wrong code
Date: Thu, 21 Nov 2013 17:39:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.4.0
X-Bugzilla-Keywords: assemble-failure, link-failure
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status assigned_to
Message-ID: <bug-41090-4-tdR3V8tpkO@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-41090-4@http.gcc.gnu.org/bugzilla/>
References: <bug-41090-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02213.txt.bz2
Content-length: 374

http://gcc.gnu.org/bugzilla/show_bug.cgi?idA090

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2013-11-21 17:32 ` tejohnson at google dot com
@ 2013-11-21 18:55 ` dominiq at lps dot ens.fr
  2013-11-22  4:16 ` tejohnson at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-11-21 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Thanks for the patch. It fixes the ICEs. I am currently regtesting.


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2013-11-21 18:55 ` dominiq at lps dot ens.fr
@ 2013-11-22  4:16 ` tejohnson at gcc dot gnu.org
  2013-12-17 16:46 ` jakub at gcc dot gnu.org
  2013-12-17 16:58 ` dominiq at lps dot ens.fr
  11 siblings, 0 replies; 12+ messages in thread
From: tejohnson at gcc dot gnu.org @ 2013-11-22  4:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from tejohnson at gcc dot gnu.org ---
Author: tejohnson
Date: Fri Nov 22 04:16:47 2013
New Revision: 205243

URL: http://gcc.gnu.org/viewcvs?rev=205243&root=gcc&view=rev
Log:
2013-11-21  Teresa Johnson  <tejohnson@google.com>

    PR target/59233
    * cfgcleanup.c (outgoing_edges_match): Walk up past note instructions
    not understood by old_insns_match_p.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2013-11-22  4:16 ` tejohnson at gcc dot gnu.org
@ 2013-12-17 16:46 ` jakub at gcc dot gnu.org
  2013-12-17 16:58 ` dominiq at lps dot ens.fr
  11 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-12-17 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So is this fixed now?


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

* [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* with -m32
       [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2013-12-17 16:46 ` jakub at gcc dot gnu.org
@ 2013-12-17 16:58 ` dominiq at lps dot ens.fr
  11 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-17 16:58 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> So is this fixed now?

AFAICT yes, closing.


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

end of thread, other threads:[~2013-12-17 16:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-59233-4@http.gcc.gnu.org/bugzilla/>
2013-11-21 13:04 ` [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on x86_64-apple-darwin13 with -m32 rguenth at gcc dot gnu.org
2013-11-21 13:51 ` [Bug target/59233] [4.9 Regression] C++ failures after revision 205058 on *-apple-darwin* " dominiq at lps dot ens.fr
2013-11-21 14:10 ` dominiq at lps dot ens.fr
2013-11-21 14:41 ` tejohnson at google dot com
2013-11-21 15:05 ` iains at gcc dot gnu.org
2013-11-21 15:06 ` rguenth at gcc dot gnu.org
2013-11-21 15:12 ` tejohnson at google dot com
2013-11-21 17:32 ` tejohnson at google dot com
2013-11-21 18:55 ` dominiq at lps dot ens.fr
2013-11-22  4:16 ` tejohnson at gcc dot gnu.org
2013-12-17 16:46 ` jakub at gcc dot gnu.org
2013-12-17 16:58 ` dominiq at lps dot ens.fr

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).