public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jcmvbkbc at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65730] New: xtensa: ICE in libstdc++-v3/include/bits/atomic_base.h: In function ‘bool std::atomic_flag_test_and_set_explicit(std::__atomic_flag_base*, std::memory_order)’
Date: Fri, 10 Apr 2015 13:15:00 -0000	[thread overview]
Message-ID: <bug-65730-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65730

            Bug ID: 65730
           Summary: xtensa: ICE in
                    libstdc++-v3/include/bits/atomic_base.h: In function
                    ‘bool
                    std::atomic_flag_test_and_set_explicit(std::__atomic_f
                    lag_base*, std::memory_order)’
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jcmvbkbc at gcc dot gnu.org

Created attachment 35287
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35287&action=edit
preprocessed source

With overlay that has no hardware multiplication option building libstdc++ ends
with ICE:

cc1plus -std=gnu++11 compatibility-atomic-c++0x.ii

In file included from
/home/jcmvbkbc/tmp/jr/Max_Fusion_MMU_KC705/build-buildroot/build/host-gcc-final-4.8.4/build/xtensa-buildroot-linux-uclibc/libstdc++-v3/include/atomic:41:0,
                 from
../../../../libstdc++-v3/src/c++11/compatibility-atomic-c++0x.cc:26:
/home/jcmvbkbc/tmp/jr/Max_Fusion_MMU_KC705/build-buildroot/build/host-gcc-final-4.8.4/build/xtensa-buildroot-linux-uclibc/libstdc++-v3/include/bits/atomic_base.h:
In member function ‘bool std::atomic_flag::test_and_set(std::memory_order)’:
/home/jcmvbkbc/tmp/jr/Max_Fusion_MMU_KC705/build-buildroot/build/host-gcc-final-4.8.4/build/xtensa-buildroot-linux-uclibc/libstdc++-v3/include/bits/atomic_base.h:287:47:
internal compiler error: Segmentation fault
       return __atomic_test_and_set (&_M_i, __m);
                                               ^
0xed8ae7 crash_signal
        ../../gcc/gcc/toplev.c:383
0xdba4e1 widened_mode
        ../../gcc/gcc/optabs.c:303
0xdbd699 expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
        ../../gcc/gcc/optabs.c:1561
0xdbce5a expand_simple_binop(machine_mode, rtx_code, rtx_def*, rtx_def*,
rtx_def*, int, optab_methods)
        ../../gcc/gcc/optabs.c:1313
0x1248be4 init_alignment_context
        ../../gcc/gcc/config/xtensa/xtensa.c:1470
0x1248cb4 xtensa_expand_compare_and_swap(rtx_def*, rtx_def*, rtx_def*,
rtx_def*)
        ../../gcc/gcc/config/xtensa/xtensa.c:1494
0x125383e gen_sync_compare_and_swapqi(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
        ../../gcc/gcc/config/xtensa/xtensa.md:1977
0xdcee66 insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*, rtx_def*) const
        ../../gcc/gcc/recog.h:305
0xdcddc5 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        ../../gcc/gcc/optabs.c:8391
0xdce0c2 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        ../../gcc/gcc/optabs.c:8421
0xdcc1c1 expand_atomic_compare_and_swap(rtx_def**, rtx_def**, rtx_def*,
rtx_def*, rtx_def*, bool, memmodel, memmodel)
        ../../gcc/gcc/optabs.c:7533
0xdcb856 expand_compare_and_swap_loop
        ../../gcc/gcc/optabs.c:7182
0xdcbba7 maybe_emit_compare_and_swap_exchange_loop
        ../../gcc/gcc/optabs.c:7294
0xdcbd6d expand_atomic_test_and_set(rtx_def*, rtx_def*, memmodel)
        ../../gcc/gcc/optabs.c:7406
0x98afc6 expand_builtin_atomic_test_and_set
        ../../gcc/gcc/builtins.c:5679
0x98e5a1 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        ../../gcc/gcc/builtins.c:6974
0xb0b404 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:10488
0xb00e4a expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        ../../gcc/gcc/expr.c:8017
0xae8ff3 expand_expr
        ../../gcc/gcc/expr.h:254
0xaf6f2f store_expr_with_bounds(tree_node*, rtx_def*, int, bool, tree_node*)
        ../../gcc/gcc/expr.c:5290

This is reproducible with current mainline and with 4.9.4.
>From gcc-bugs-return-483299-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Apr 10 13:16:58 2015
Return-Path: <gcc-bugs-return-483299-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 43460 invoked by alias); 10 Apr 2015 13:16:58 -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 43401 invoked by uid 48); 10 Apr 2015 13:16:54 -0000
From: "yroux at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65710] [4.9/5 Regression] Thumb1 ICE caused by no register to spill
Date: Fri, 10 Apr 2015 13:16: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: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: yroux at gcc dot gnu.org
X-Bugzilla-Status: REOPENED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65710-4-nxroYsnXHw@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65710-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65710-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: 2015-04/txt/msg00851.txt.bz2
Content-length: 481

https://gcc.gnu.org/bugzilla/show_bug.cgi?ide710

--- Comment #11 from Yvan Roux <yroux at gcc dot gnu.org> ---
Re-introducing the condition that stop updating lra_constraint_new_regno_start
after switching off inheritance and remat, seems to fix the problem:
gcc.target/arm/pr65647-2.c is ok and the reduced test case from Terry builds as
well, at least with my quick test on 4.9 branch.  I'll do it on trunk and pass
a full validation.

Is it the correct fix for you Vlad ?


             reply	other threads:[~2015-04-10 13:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10 13:15 jcmvbkbc at gcc dot gnu.org [this message]
2015-04-10 13:17 ` [Bug target/65730] " jcmvbkbc at gcc dot gnu.org
2015-05-20 18:56 ` jcmvbkbc at gcc dot gnu.org
2015-05-20 19:14 ` jcmvbkbc at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65730-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).