[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)=?UTF-8?Q?’

jcmvbkbc at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 10 13:15:00 GMT 2015


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.


More information about the Gcc-bugs mailing list