public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/60141] New: ICE in i386.c distance_non_agu_define_in_bb
@ 2014-02-11  0:49 shenhan at google dot com
  2014-02-13 17:23 ` [Bug rtl-optimization/60141] " tejohnson at google dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: shenhan at google dot com @ 2014-02-11  0:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60141
           Summary: ICE in i386.c distance_non_agu_define_in_bb
           Product: gcc
           Version: 4.8.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shenhan at google dot com
                CC: llozano at google dot com, tejohnson at google dot com

This only fails for google/gcc-4_8

To reproduce - 
  configure:
     ~/gcc.git/configure --disable-bootstrap --enable-languages='c,c++'
--disable-multilib --disable-libatomic     --disable-libmudflap
--disable-libssp --enable-libgomp --enable-__cxa_atexit
--enable-checking=release     --disable-libquadmath --disable-libitm
--enable-esp --with-arch=atom --with-tune=atom --enable-frame-pointer
  Build - 
     make -j40
  Compile a testcase - 
   ./gcc/xgcc -B./gcc -g -O2 -fpic -c -m32 ~/SROA.pp.cpp
  Output - 
   SROA.cpp: In member function ‘void
{anonymous}::AllocaPartitioning::UseBuilder::operator()()’:
SROA.cpp:873:3: internal compiler error: Segmentation fault
0x8d0baf crash_signal
        ../../../gcc.git/gcc/toplev.c:346
0xa798c8 distance_non_agu_define_in_bb
        ../../../gcc.git/gcc/config/i386/i386.c:17506
0xa79cad distance_non_agu_define
        ../../../gcc.git/gcc/config/i386/i386.c:17564
0xa79cad ix86_lea_outperforms
        ../../../gcc.git/gcc/config/i386/i386.c:17730
0xb8e6ca output_89
        ../../../gcc.git/gcc/config/i386/i386.md:2152
0x72a5c3 final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
        ../../../gcc.git/gcc/final.c:2895
0x72ae84 final(rtx_def*, _IO_FILE*, int)
        ../../../gcc.git/gcc/final.c:1986
0x72b46d rest_of_handle_final
        ../../../gcc.git/gcc/final.c:4432
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.

Debugging shows that in distance_non_agu_define_in_bb (i386.c),
BLOCK_FOR_INSN(start) returns zero, which caused this ICE.

A preliminary bisecting in google/gcc-4_8 shows that the follow CL introduces 
this ICE. (So I cc'ed Teresa Johnson)


commit 907fca49eae2da51a328eb192c691cc24f69e6af
Author: tejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Dec 2 18:28:19 2013 +0000

    Backport the last few fixes for -freorder-blocks-and-partition from
    trunk to google/4_8: r204985, r205057 and r205243

    ------------------------------------------------------------------------
        r204985 | tejohnson | 2013-11-18 14:38:51 -0800 (Mon, 18 Nov 2013) | 15
lines

        This patch fixes an lto profiledbootstrap failure with
        -freorder-blocks-and-partition enabled. Currently compgotos
        is the only pass that goes into cfglayout mode after bb reordering,
        which is undesireable (and in the case of
-freorder-blocks-and-partition
        can cause illegal partitioning) because of the optimizations performed
        on the cfg when going into cfglayout mode. Moved compgoto before
        bb reordering to avoid these problems.

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

        * gcc/cfgrtl.c (cfg_layout_initialize): Assert if we
        try to go into cfglayout after bb reordering.
        * gcc/passes.def: Move compgotos before bb reordering
        since it goes into cfglayout.

    ------------------------------------------------------------------------
    ------------------------------------------------------------------------
        r205057 | tmsriram | 2013-11-19 14:12:21 -0800 (Tue, 19 Nov 2013) | 7
lines

        Emit a label for the split cold function part.  Label name is formed by
        suffixing the original function name with "cold".

        Patch tested for bootstrap on all default languages on x86_64 and
        regression testsuite checked for parity with RUNTESTFLAGS -m32 and m64.

        2013-11-19  Sriraman Tallam  <tmsriram@google.com>

        * final.c (final_scan_insn): Emit a label for the split
        cold function part.  Label name is formed by suffixing
        the original function name with "cold".

        2013-11-19  Sriraman Tallam  <tmsriram@google.com>

        * gcc.dg/tree-prof/cold_partition_label.c: New testcase.

    ------------------------------------------------------------------------
    ------------------------------------------------------------------------
        r205243 | tejohnson | 2013-11-21 20:16:47 -0800 (Thu, 21 Nov 2013) | 6
lines

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

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

    ------------------------------------------------------------------------


    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_8@205594
138bc75d-0d04-0410-961f-82ee72b054a4
>From gcc-bugs-return-443258-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Feb 11 01:13:20 2014
Return-Path: <gcc-bugs-return-443258-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29406 invoked by alias); 11 Feb 2014 01:13:19 -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 29322 invoked by uid 55); 11 Feb 2014 01:13:10 -0000
From: "rth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/59927] [4.9 Regression] ICE sorry, unimplemented: ms_abi attribute requires -maccumulate-outgoing-args or subtarget optimization implying it
Date: Tue, 11 Feb 2014 01:13: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:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: rth at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: rth at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59927-4-gMJYjtepG3@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59927-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59927-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: 2014-02/txt/msg01015.txt.bz2
Content-length: 773

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

--- Comment #9 from Richard Henderson <rth at gcc dot gnu.org> ---
Author: rth
Date: Tue Feb 11 01:12:38 2014
New Revision: 207677

URL: http://gcc.gnu.org/viewcvs?rev 7677&root=gcc&view=rev
Log:
PR target/59927

        * calls.c (expand_call): Don't double-push for reg_parm_stack_space.
        * config/i386/i386.c (init_cumulative_args): Remove sorry for 64-bit
        ms-abi vs -mno-accumulate-outgoing-args.
        (ix86_expand_prologue): Unconditionally call ix86_eax_live_at_start_p.
        * config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Fix comment with
        respect to ms-abi.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/i386.h


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

* [Bug rtl-optimization/60141] ICE in i386.c distance_non_agu_define_in_bb
  2014-02-11  0:49 [Bug rtl-optimization/60141] New: ICE in i386.c distance_non_agu_define_in_bb shenhan at google dot com
@ 2014-02-13 17:23 ` tejohnson at google dot com
  2014-02-13 17:43 ` shenhanc at gmail dot com
  2014-02-13 21:17 ` tejohnson at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tejohnson at google dot com @ 2014-02-13 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Teresa Johnson <tejohnson at google dot com> ---
This appears to have been exposed, not caused, by the change to the
pass ordering. It is in fact a duplicate of PR middle-end/43631, which
was fixed on trunk by r197994 on 4/15/13. I will backport the fix to
google-4_8.

Teresa

On Mon, Feb 10, 2014 at 4:49 PM, shenhan at google dot com
<gcc-bugzilla@gcc.gnu.org> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60141
>
>             Bug ID: 60141
>            Summary: ICE in i386.c distance_non_agu_define_in_bb
>            Product: gcc
>            Version: 4.8.3
>             Status: UNCONFIRMED
>           Severity: normal
>           Priority: P3
>          Component: rtl-optimization
>           Assignee: unassigned at gcc dot gnu.org
>           Reporter: shenhan at google dot com
>                 CC: llozano at google dot com, tejohnson at google dot com
>
> This only fails for google/gcc-4_8
>
> To reproduce -
>   configure:
>      ~/gcc.git/configure --disable-bootstrap --enable-languages='c,c++'
> --disable-multilib --disable-libatomic     --disable-libmudflap
> --disable-libssp --enable-libgomp --enable-__cxa_atexit
> --enable-checking=release     --disable-libquadmath --disable-libitm
> --enable-esp --with-arch=atom --with-tune=atom --enable-frame-pointer
>   Build -
>      make -j40
>   Compile a testcase -
>    ./gcc/xgcc -B./gcc -g -O2 -fpic -c -m32 ~/SROA.pp.cpp
>   Output -
>    SROA.cpp: In member function ‘void
> {anonymous}::AllocaPartitioning::UseBuilder::operator()()’:
> SROA.cpp:873:3: internal compiler error: Segmentation fault
> 0x8d0baf crash_signal
>         ../../../gcc.git/gcc/toplev.c:346
> 0xa798c8 distance_non_agu_define_in_bb
>         ../../../gcc.git/gcc/config/i386/i386.c:17506
> 0xa79cad distance_non_agu_define
>         ../../../gcc.git/gcc/config/i386/i386.c:17564
> 0xa79cad ix86_lea_outperforms
>         ../../../gcc.git/gcc/config/i386/i386.c:17730
> 0xb8e6ca output_89
>         ../../../gcc.git/gcc/config/i386/i386.md:2152
> 0x72a5c3 final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
>         ../../../gcc.git/gcc/final.c:2895
> 0x72ae84 final(rtx_def*, _IO_FILE*, int)
>         ../../../gcc.git/gcc/final.c:1986
> 0x72b46d rest_of_handle_final
>         ../../../gcc.git/gcc/final.c:4432
> 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.
>
> Debugging shows that in distance_non_agu_define_in_bb (i386.c),
> BLOCK_FOR_INSN(start) returns zero, which caused this ICE.
>
> A preliminary bisecting in google/gcc-4_8 shows that the follow CL introduces
> this ICE. (So I cc'ed Teresa Johnson)
>
>
> commit 907fca49eae2da51a328eb192c691cc24f69e6af
> Author: tejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
> Date:   Mon Dec 2 18:28:19 2013 +0000
>
>     Backport the last few fixes for -freorder-blocks-and-partition from
>     trunk to google/4_8: r204985, r205057 and r205243
>
>     ------------------------------------------------------------------------
>         r204985 | tejohnson | 2013-11-18 14:38:51 -0800 (Mon, 18 Nov 2013) | 15
> lines
>
>         This patch fixes an lto profiledbootstrap failure with
>         -freorder-blocks-and-partition enabled. Currently compgotos
>         is the only pass that goes into cfglayout mode after bb reordering,
>         which is undesireable (and in the case of
> -freorder-blocks-and-partition
>         can cause illegal partitioning) because of the optimizations performed
>         on the cfg when going into cfglayout mode. Moved compgoto before
>         bb reordering to avoid these problems.
>
>         2013-11-18  Teresa Johnson  <tejohnson@google.com>
>
>         * gcc/cfgrtl.c (cfg_layout_initialize): Assert if we
>         try to go into cfglayout after bb reordering.
>         * gcc/passes.def: Move compgotos before bb reordering
>         since it goes into cfglayout.
>
>     ------------------------------------------------------------------------
>     ------------------------------------------------------------------------
>         r205057 | tmsriram | 2013-11-19 14:12:21 -0800 (Tue, 19 Nov 2013) | 7
> lines
>
>         Emit a label for the split cold function part.  Label name is formed by
>         suffixing the original function name with "cold".
>
>         Patch tested for bootstrap on all default languages on x86_64 and
>         regression testsuite checked for parity with RUNTESTFLAGS -m32 and m64.
>
>         2013-11-19  Sriraman Tallam  <tmsriram@google.com>
>
>         * final.c (final_scan_insn): Emit a label for the split
>         cold function part.  Label name is formed by suffixing
>         the original function name with "cold".
>
>         2013-11-19  Sriraman Tallam  <tmsriram@google.com>
>
>         * gcc.dg/tree-prof/cold_partition_label.c: New testcase.
>
>     ------------------------------------------------------------------------
>     ------------------------------------------------------------------------
>         r205243 | tejohnson | 2013-11-21 20:16:47 -0800 (Thu, 21 Nov 2013) | 6
> lines
>
>         2013-11-21  Teresa Johnson  <tejohnson@google.com>
>
>         * cfgcleanup.c (outgoing_edges_match): Walk up past note instructions
>         not understood by old_insns_match_p.
>
>     ------------------------------------------------------------------------
>
>
>     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_8@205594
> 138bc75d-0d04-0410-961f-82ee72b054a4
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
>From gcc-bugs-return-443497-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 13 17:28:10 2014
Return-Path: <gcc-bugs-return-443497-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 32361 invoked by alias); 13 Feb 2014 17:28:10 -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 32332 invoked by uid 48); 13 Feb 2014 17:28:06 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/60178] std::mutex::try_lock failing
Date: Thu, 13 Feb 2014 17:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: libstdc++
X-Bugzilla-Version: 4.8.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status component resolution
Message-ID: <bug-60178-4-ztNuuYvNAu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60178-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60178-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: 2014-02/txt/msg01254.txt.bz2
Content-length: 605

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`178

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
          Component|c++                         |libstdc++
         Resolution|---                         |WORKSFORME

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You need to use -pthread

The program has undefined behaviour anyway due to locking the same mutex twice
in a single thread.


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

* [Bug rtl-optimization/60141] ICE in i386.c distance_non_agu_define_in_bb
  2014-02-11  0:49 [Bug rtl-optimization/60141] New: ICE in i386.c distance_non_agu_define_in_bb shenhan at google dot com
  2014-02-13 17:23 ` [Bug rtl-optimization/60141] " tejohnson at google dot com
@ 2014-02-13 17:43 ` shenhanc at gmail dot com
  2014-02-13 21:17 ` tejohnson at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: shenhanc at gmail dot com @ 2014-02-13 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

Han Shen <shenhanc at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |shenhanc at gmail dot com

--- Comment #2 from Han Shen <shenhanc at gmail dot com> ---
Thanks, Teresa!


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

* [Bug rtl-optimization/60141] ICE in i386.c distance_non_agu_define_in_bb
  2014-02-11  0:49 [Bug rtl-optimization/60141] New: ICE in i386.c distance_non_agu_define_in_bb shenhan at google dot com
  2014-02-13 17:23 ` [Bug rtl-optimization/60141] " tejohnson at google dot com
  2014-02-13 17:43 ` shenhanc at gmail dot com
@ 2014-02-13 21:17 ` tejohnson at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: tejohnson at google dot com @ 2014-02-13 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Teresa Johnson <tejohnson at google dot com> ---
On Thu, Feb 13, 2014 at 9:22 AM, Teresa Johnson <tejohnson@google.com> wrote:
> This appears to have been exposed, not caused, by the change to the
> pass ordering. It is in fact a duplicate of PR middle-end/43631, which
> was fixed on trunk by r197994 on 4/15/13. I will backport the fix to
> google-4_8.

Backported fix as r207766:

2014-02-13  Teresa Johnson  <tejohnson@google.com>

        For Google b/12971524, backport r197994 to fix PR60141.

        2013-04-16  Steven Bosscher  <steven@gcc.gnu.org>

        PR middle-end/43631
        * emit-rtl.c (make_note_raw): New function.
        (link_insn_into_chain): New static inline function.
        (add_insn): Use it.
        (add_insn_before, add_insn_after): Factor insn chain linking code...
        (add_insn_before_nobb, add_insn_after_nobb): ...here, new functions
        using link_insn_into_chain.
        (note_outside_basic_block_p): New helper function for emit_note_after
        and emit_note_before.
        (emit_note_after): Use nobb variant of add_insn_after if the note
        should not be contained in a basic block.
        (emit_note_before): Use nobb variant of add_insn_before if the note
        should not be contained in a basic block.
        (emit_note_copy): Use make_note_raw.
        (emit_note): Likewise.
        * bb-reorder.c (insert_section_boundary_note): Remove hack to set
        BLOCK_FOR_INSN to NULL manually for NOTE_INSN_SWITCH_TEXT_SECTIONS.
        * jump.c (cleanup_barriers): Use reorder_insns_nobb to avoid making
        the moved barrier the tail of the basic block it follows.
        * var-tracking.c (pass_variable_tracking): Add TODO_verify_flow.


Teresa

>
> Teresa
>
> On Mon, Feb 10, 2014 at 4:49 PM, shenhan at google dot com
> <gcc-bugzilla@gcc.gnu.org> wrote:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60141
>>
>>             Bug ID: 60141
>>            Summary: ICE in i386.c distance_non_agu_define_in_bb
>>            Product: gcc
>>            Version: 4.8.3
>>             Status: UNCONFIRMED
>>           Severity: normal
>>           Priority: P3
>>          Component: rtl-optimization
>>           Assignee: unassigned at gcc dot gnu.org
>>           Reporter: shenhan at google dot com
>>                 CC: llozano at google dot com, tejohnson at google dot com
>>
>> This only fails for google/gcc-4_8
>>
>> To reproduce -
>>   configure:
>>      ~/gcc.git/configure --disable-bootstrap --enable-languages='c,c++'
>> --disable-multilib --disable-libatomic     --disable-libmudflap
>> --disable-libssp --enable-libgomp --enable-__cxa_atexit
>> --enable-checking=release     --disable-libquadmath --disable-libitm
>> --enable-esp --with-arch=atom --with-tune=atom --enable-frame-pointer
>>   Build -
>>      make -j40
>>   Compile a testcase -
>>    ./gcc/xgcc -B./gcc -g -O2 -fpic -c -m32 ~/SROA.pp.cpp
>>   Output -
>>    SROA.cpp: In member function ‘void
>> {anonymous}::AllocaPartitioning::UseBuilder::operator()()’:
>> SROA.cpp:873:3: internal compiler error: Segmentation fault
>> 0x8d0baf crash_signal
>>         ../../../gcc.git/gcc/toplev.c:346
>> 0xa798c8 distance_non_agu_define_in_bb
>>         ../../../gcc.git/gcc/config/i386/i386.c:17506
>> 0xa79cad distance_non_agu_define
>>         ../../../gcc.git/gcc/config/i386/i386.c:17564
>> 0xa79cad ix86_lea_outperforms
>>         ../../../gcc.git/gcc/config/i386/i386.c:17730
>> 0xb8e6ca output_89
>>         ../../../gcc.git/gcc/config/i386/i386.md:2152
>> 0x72a5c3 final_scan_insn(rtx_def*, _IO_FILE*, int, int, int*)
>>         ../../../gcc.git/gcc/final.c:2895
>> 0x72ae84 final(rtx_def*, _IO_FILE*, int)
>>         ../../../gcc.git/gcc/final.c:1986
>> 0x72b46d rest_of_handle_final
>>         ../../../gcc.git/gcc/final.c:4432
>> 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.
>>
>> Debugging shows that in distance_non_agu_define_in_bb (i386.c),
>> BLOCK_FOR_INSN(start) returns zero, which caused this ICE.
>>
>> A preliminary bisecting in google/gcc-4_8 shows that the follow CL introduces
>> this ICE. (So I cc'ed Teresa Johnson)
>>
>>
>> commit 907fca49eae2da51a328eb192c691cc24f69e6af
>> Author: tejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>
>> Date:   Mon Dec 2 18:28:19 2013 +0000
>>
>>     Backport the last few fixes for -freorder-blocks-and-partition from
>>     trunk to google/4_8: r204985, r205057 and r205243
>>
>>     ------------------------------------------------------------------------
>>         r204985 | tejohnson | 2013-11-18 14:38:51 -0800 (Mon, 18 Nov 2013) | 15
>> lines
>>
>>         This patch fixes an lto profiledbootstrap failure with
>>         -freorder-blocks-and-partition enabled. Currently compgotos
>>         is the only pass that goes into cfglayout mode after bb reordering,
>>         which is undesireable (and in the case of
>> -freorder-blocks-and-partition
>>         can cause illegal partitioning) because of the optimizations performed
>>         on the cfg when going into cfglayout mode. Moved compgoto before
>>         bb reordering to avoid these problems.
>>
>>         2013-11-18  Teresa Johnson  <tejohnson@google.com>
>>
>>         * gcc/cfgrtl.c (cfg_layout_initialize): Assert if we
>>         try to go into cfglayout after bb reordering.
>>         * gcc/passes.def: Move compgotos before bb reordering
>>         since it goes into cfglayout.
>>
>>     ------------------------------------------------------------------------
>>     ------------------------------------------------------------------------
>>         r205057 | tmsriram | 2013-11-19 14:12:21 -0800 (Tue, 19 Nov 2013) | 7
>> lines
>>
>>         Emit a label for the split cold function part.  Label name is formed by
>>         suffixing the original function name with "cold".
>>
>>         Patch tested for bootstrap on all default languages on x86_64 and
>>         regression testsuite checked for parity with RUNTESTFLAGS -m32 and m64.
>>
>>         2013-11-19  Sriraman Tallam  <tmsriram@google.com>
>>
>>         * final.c (final_scan_insn): Emit a label for the split
>>         cold function part.  Label name is formed by suffixing
>>         the original function name with "cold".
>>
>>         2013-11-19  Sriraman Tallam  <tmsriram@google.com>
>>
>>         * gcc.dg/tree-prof/cold_partition_label.c: New testcase.
>>
>>     ------------------------------------------------------------------------
>>     ------------------------------------------------------------------------
>>         r205243 | tejohnson | 2013-11-21 20:16:47 -0800 (Thu, 21 Nov 2013) | 6
>> lines
>>
>>         2013-11-21  Teresa Johnson  <tejohnson@google.com>
>>
>>         * cfgcleanup.c (outgoing_edges_match): Walk up past note instructions
>>         not understood by old_insns_match_p.
>>
>>     ------------------------------------------------------------------------
>>
>>
>>     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_8@205594
>> 138bc75d-0d04-0410-961f-82ee72b054a4
>>
>> --
>> You are receiving this mail because:
>> You are on the CC list for the bug.
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
>From gcc-bugs-return-443507-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Feb 13 22:32:01 2014
Return-Path: <gcc-bugs-return-443507-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 24056 invoked by alias); 13 Feb 2014 22:32:00 -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 23211 invoked by uid 48); 13 Feb 2014 22:31:52 -0000
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60185] New: [4.9 Regression] ICE with invalid default parameter
Date: Thu, 13 Feb 2014 22:32:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: reichelt at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60185-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: 2014-02/txt/msg01264.txt.bz2
Content-length: 2568

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`185

            Bug ID: 60185
           Summary: [4.9 Regression] ICE with invalid default parameter
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet triggers an ICE on trunk:

===============================template<int> struct A
{
  int i;
  A() { void foo(int=i); }
};

A<0> a;
===============================
bug.cc: In instantiation of 'A<<anonymous> >::A() [with int <anonymous> = 0]':
bug.cc:7:6:   required from here
bug.cc:4:14: internal compiler error: in tsubst_copy, at cp/pt.c:12375
   A() { void foo(int=i); }
              ^
0x62bfa5 tsubst_copy
        ../../gcc/gcc/cp/pt.c:12375
0x60687b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14974
0x607dcb tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14035
0x60895b tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14018
0x608054 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:14764
0x6115c6 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13812
0x61862c tsubst_default_argument(tree_node*, tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/pt.c:10094
0x631760 tsubst_default_arguments
        ../../gcc/gcc/cp/pt.c:10143
0x631760 tsubst_decl
        ../../gcc/gcc/cp/pt.c:10521
0x61be9f tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/gcc/cp/pt.c:11357
0x6127fb tsubst_expr
        ../../gcc/gcc/cp/pt.c:13276
0x61208c tsubst_expr
        ../../gcc/gcc/cp/pt.c:13424
0x611093 tsubst_expr
        ../../gcc/gcc/cp/pt.c:13219
0x61208c tsubst_expr
        ../../gcc/gcc/cp/pt.c:13424
0x60f2a9 instantiate_decl(tree_node*, int, bool)
        ../../gcc/gcc/cp/pt.c:19690
0x64d8c7 instantiate_pending_templates(int)
        ../../gcc/gcc/cp/pt.c:19806
0x688bed cp_write_global_declarations()
        ../../gcc/gcc/cp/decl2.c:4148
Please submit a full bug report, [etc.]

This is a recent regression, introduced between 2014-01-28 and 2014-02-01.

The bug is related to PR39055. It is actually the original testcase
of this PR (which never made it into the testsuite). Only a non-template
version of this testcase was added as
  gcc/testsuite/g++.dg/overload/defarg5.C


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

end of thread, other threads:[~2014-02-13 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11  0:49 [Bug rtl-optimization/60141] New: ICE in i386.c distance_non_agu_define_in_bb shenhan at google dot com
2014-02-13 17:23 ` [Bug rtl-optimization/60141] " tejohnson at google dot com
2014-02-13 17:43 ` shenhanc at gmail dot com
2014-02-13 21:17 ` tejohnson at google dot com

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