From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CFEFB386546C; Thu, 20 Oct 2022 19:51:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CFEFB386546C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666295518; bh=EDxgKEmIiWwv6NT63Sr5C5nfqFbJdEWxsr3EKY5GfLY=; h=From:To:Subject:Date:From; b=o9N0iiUvKAYOviqCtZOif4m+dQ+L12W3ErUr99xcXC6y8p9OgtztqsP8Vd0lpaIiy RwsTars6WlfuY/Q2/pBXFP/5aD/+H6dr/ZW8WF76WZlBv6+1esOKPy7EtVkWrpdBgu uYy7OJrKxUf9C5Nkf1v1FQiKUHarhh8v7Mq7+Dnc= From: "andrew at ishiboo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107336] New: [10/11 regression] ICE segfault expand_expr_real_1 on sparc-sun-solaris2.11 with -m32 -mcpu=niagara4 -O3 Date: Thu, 20 Oct 2022 19:51:57 +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: 10.4.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andrew at ishiboo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107336 Bug ID: 107336 Summary: [10/11 regression] ICE segfault expand_expr_real_1 on sparc-sun-solaris2.11 with -m32 -mcpu=3Dniagara4 -O3 Product: gcc Version: 10.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: andrew at ishiboo dot com Target Milestone: --- Created attachment 53736 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53736&action=3Dedit GCC 10 & 11 pre-processed source files, compressed because they are 2MB each The ICE segfault happens when building google-benchmark 1.6.1 on sparc-sun-solaris2.11 in 32-bit mode. I've narrowed down the command line t= o: g++ -m32 -mcpu=3Dniagara4 -O3 -c -o /dev/null output_test_helper-preprocess= ed.cc - Building -m64, the ICE does not happen - Building without -mcpu=3Dniagara4, the ICE does not happen - Building with -O or -O2, the ICE does not happen - GCC 9.4.0 does not ICE - GCC 10.4.0 triggers ICE during RTL pass: expand - GCC 11.3.0 triggers ICE during GIMPLE pass: isel - GCC 12.1.0 does not ICE In GCC 10.4.0, the ICE occurs here: during RTL pass: expand In file included from /usr/lib/gcc-10.4/include/c++/10.4.0/random:51, from output_test_helper.cc:7: /usr/lib/gcc-10.4/include/c++/10.4.0/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 =3D unsig= ned int; unsigned int __w =3D 32; unsigned int __n =3D 624; unsigned int __m = =3D 397; unsigned int __r =3D 31; _UIntType __a =3D 2567483615; unsigned int __u =3D= 11; _UIntType __d =3D 4294967295; unsigned int __s =3D 7; _UIntType __b =3D 263= 6928640; unsigned int __t =3D 15; _UIntType __c =3D 4022730752; unsigned int __l =3D= 18; _UIntType __f =3D 1812433253]': /usr/lib/gcc-10.4/include/c++/10.4.0/bits/random.tcc:405:14: internal compiler error: Segmentation Fault 0x162a8cf crash_signal ../../gcc/toplev.c:328 0x103ce38 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10078 0x10353af expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:8366 0x102a24f store_expr(tree_node*, rtx_def*, int, bool, bool) ../../gcc/expr.c:5757 0x1029003 expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5516 0xe373f7 expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3784 0xe3791f expand_gimple_stmt ../../gcc/cfgexpand.c:3880 0xe40a17 expand_gimple_basic_block ../../gcc/cfgexpand.c:5929 0xe42a23 execute ../../gcc/cfgexpand.c:6584 Using the same command line with GCC 11.3.0, the ICE still occurs, but chan= ges to become: during GIMPLE pass: isel In file included from /usr/lib/gcc-11.3/include/c++/11.3.0/random:51, from output_test_helper.cc:7: /usr/lib/gcc-11.3/include/c++/11.3.0/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 =3D unsig= ned int; unsigned int __w =3D 32; unsigned int __n =3D 624; unsigned int __m = =3D 397; unsigned int __r =3D 31; _UIntType __a =3D 2567483615; unsigned int __u =3D= 11; _UIntType __d =3D 4294967295; unsigned int __s =3D 7; _UIntType __b =3D 263= 6928640; unsigned int __t =3D 15; _UIntType __c =3D 4022730752; unsigned int __l =3D= 18; _UIntType __f =3D 1812433253]': /usr/lib/gcc-11.3/include/c++/11.3.0/bits/random.tcc:394:5: internal compiler error: in gimple_expand_vec_cond_expr, at gimple-isel.cc:270 0x1be84ff gimple_expand_vec_cond_expr ../../gcc/gimple-isel.cc:267 0x1be8673 gimple_expand_vec_exprs ../../gcc/gimple-isel.cc:297 0x1be8937 execute ../../gcc/gimple-isel.cc:350 No ICE occurs with GCC 12.1.0. If the underlying issue was fixed (accidentally or not), are there patches = that can be applied to 10/11?=