[Bug target/107336] [10 regression] ICE segfault expand_expr_real_1 on sparc-sun-solaris2.11 with -m32 -mcpu=niagara4 -O3

andrew at ishiboo dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 20 23:28:40 GMT 2022


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

Andrew Paprocki <andrew at ishiboo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|DUPLICATE                   |---
             Status|RESOLVED                    |UNCONFIRMED
            Summary|[10/11 regression] ICE      |[10 regression] ICE
                   |segfault expand_expr_real_1 |segfault expand_expr_real_1
                   |on sparc-sun-solaris2.11    |on sparc-sun-solaris2.11
                   |with -m32 -mcpu=niagara4    |with -m32 -mcpu=niagara4
                   |-O3                         |-O3

--- Comment #4 from Andrew Paprocki <andrew at ishiboo dot com> ---
Changed to reflect this is just an issue with GCC 10 at this point.

I built HEAD of the releases/gcc-10 branch and it still segfaults here with
using attached test case:

    during RTL pass: expand
    In file included from /usr/lib/gcc-10.4/include/c++/10.4.1/random:51,
                     from output_test_helper-10.cc:7:
    /usr/lib/gcc-10.4/include/c++/10.4.1/bits/random.tcc: In member function
'void std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u,
__d, __s, __b, __t, __c, __l, __f>::_M_gen_rand() [with _UIntType = unsigned
int; unsigned int __w = 32; unsigned int __n = 624; unsigned int __m = 397;
unsigned int __r = 31; _UIntType __a = 2567483615; unsigned int __u = 11;
_UIntType __d = 4294967295; unsigned int __s = 7; _UIntType __b = 2636928640;
unsigned int __t = 15; _UIntType __c = 4022730752; unsigned int __l = 18;
_UIntType __f = 1812433253]':
    /usr/lib/gcc-10.4/include/c++/10.4.1/bits/random.tcc:405:14: internal
compiler error: Segmentation Fault
    0x162a903 crash_signal
            ../../gcc/toplev.c:328
    0x103ceac expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
            ../../gcc/expr.c:10078
    0x1035423 expand_expr_real(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
            ../../gcc/expr.c:8366
    0x102a2c3 store_expr(tree_node*, rtx_def*, int, bool, bool)
            ../../gcc/expr.c:5757
    0x1029077 expand_assignment(tree_node*, tree_node*, bool)
            ../../gcc/expr.c:5516
    0xe3746b expand_gimple_stmt_1
            ../../gcc/cfgexpand.c:3784
    0xe37993 expand_gimple_stmt
            ../../gcc/cfgexpand.c:3880
    0xe40a8b expand_gimple_basic_block
            ../../gcc/cfgexpand.c:5929
    0xe42a97 execute
            ../../gcc/cfgexpand.c:6584

I can confirm that the patch in the above linked bug does fix GCC 11.3.0.


More information about the Gcc-bugs mailing list