From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 409E43858D3C; Thu, 5 Oct 2023 05:19:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 409E43858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696483174; bh=HboR1OlxSJSKrdc7x+QkTwrpNdJ/uJlB75ybwruUBVA=; h=From:To:Subject:Date:From; b=Mxk2f+9DcilASfGxraiQxf0dqC3TDNbnGurvJougRvgJew3E7Y+VTlrTl2zhfLYXY QMOUWQJWlcOnHYFu/kO6Xf8IM4rbatlgkKyXSDr73mfi826uTDBIv1htjX8gsiKS+Y QKIngyEE8JB65k+fKUBrOsAkxYSkKNazB+p26WOQ= From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111699] New: [14 Regression] ICE: SIGSEGV: infinite recursion in fold_build3_loc/fold_ternary_loc/generic_simplify_VEC_COND_EXPR Date: Thu, 05 Oct 2023 05:19:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz 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 keywords bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget 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=3D111699 Bug ID: 111699 Summary: [14 Regression] ICE: SIGSEGV: infinite recursion in fold_build3_loc/fold_ternary_loc/generic_simplify_VEC_ COND_EXPR Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: aarch64-unknown-linux-gnu Created attachment 56054 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56054&action=3Dedit reduced testcase Compiler output: $ aarch64-unknown-linux-gnu-gcc testcase.c -wrapper gdb,-q,--args Reading symbols from /repo/gcc-trunk/binary-trunk-20231005001818-gbf2e66e3ee2-checking-yes-rtl-d= f-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/14.0.0/cc1... (gdb) r Starting program: /repo/gcc-trunk/binary-trunk-20231005001818-gbf2e66e3ee2-checking-yes-rtl-d= f-extra-aarch64/libexec/gcc/aarch64-unknown-linux-gnu/14.0.0/cc1 -quiet -iprefix /repo/gcc-trunk/binary-trunk-20231005001818-gbf2e66e3ee2-checking-yes-rtl-d= f-extra-aarch64/bin/../lib/gcc/aarch64-unknown-linux-gnu/14.0.0/ testcase.c -quiet -dumpdir a- -dumpbase testcase.c -dumpbase-ext .c -mlittle-endian -mabi=3Dlp64 -o /tmp/cc6LuKcc.s [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. const_binop (code=3DBIT_AND_EXPR, arg1=3D0x7ffff756a7c8, arg2=3D0x7ffff756a= 870) at /repo/gcc-trunk/gcc/fold-const.cc:1358 1358 STRIP_NOPS (arg1); (gdb) bt #0 const_binop (code=3DBIT_AND_EXPR, arg1=3D0x7ffff756a7c8, arg2=3D0x7ffff= 756a870) at /repo/gcc-trunk/gcc/fold-const.cc:1358 #1 0x0000000000ea0ee6 in const_binop (code=3DBIT_AND_EXPR, arg1=3D0x7ffff7= 212b70, arg2=3D0x7ffff7213360) at /repo/gcc-trunk/gcc/fold-const.cc:1688 #2 0x0000000000e94ff1 in fold_binary_loc (loc=3D2147483651, code=3D, type=3D0x7ffff7556498, op0=3D0x7ffff7212b70, op1=3D0x7ffff7213360) at /repo/gcc-trunk/gcc/fold-const.cc:11129 #3 0x0000000000e9c7fb in fold_build2_loc (loc=3D2147483651, code=3DBIT_AND= _EXPR, type=3D0x7ffff7556498, op0=3D0x7ffff7212b70, op1=3D0x7ffff7213360) at /repo/gcc-trunk/gcc/fold-const.cc:14040 #4 0x0000000000eae86d in fold_binary_op_with_conditional_arg (loc=3D214748= 3651, code=3DBIT_AND_EXPR, type=3D0x7ffff7556498, op0=3D, op1=3D, cond=3D, arg=3D,=20 cond_first_p=3D1) at /repo/gcc-trunk/gcc/fold-const.cc:7336 #5 0x0000000000e95062 in fold_binary_loc (loc=3D2147483651, code=3D, type=3D0x7ffff7556498, op0=3D0x7ffff7557640, op1=3D0x7ffff7213360) at /repo/gcc-trunk/gcc/fold-const.cc:11219 #6 0x0000000000e9c7fb in fold_build2_loc (loc=3Dloc@entry=3D2147483651, code=3Dcode@entry=3DBIT_AND_EXPR, type=3D0x7ffff7556498, op0=3Dop0@entry=3D0x7ffff7557640, op1=3Dop1@entry=3D0x7ffff7213360) at /repo/gcc-trunk/gcc/fold-const.cc:14040 #7 0x00000000021f9843 in generic_simplify_VEC_COND_EXPR (loc=3D2147483651, code=3D, type=3D0x7ffff7556348, _p0=3D0x7ffff7211bd0, _p1=3D0x7ffff756a7e0, _p2=3D0x7ffff756a7f8) at generic-match-2.cc:8731 #8 0x0000000000eabf3b in fold_ternary_loc (loc=3D2147483651, code=3DVEC_CO= ND_EXPR, type=3D0x7ffff7556348, op0=3D0x7ffff7211bd0, op1=3D0x7ffff756a7e0, op2=3D0x7ffff756a7f8) at /repo/gcc-trunk/gcc/fold-const.cc:13028 #9 0x0000000000eadeb8 in fold_build3_loc (loc=3Dloc@entry=3D2147483651, code=3Dcode@entry=3DVEC_COND_EXPR, type=3Dtype@entry=3D0x7ffff7556348, op0=3D0x7ffff7211bd0, op1=3Dop1@entry=3D0x7ffff756a7e0,=20 op2=3Dop2@entry=3D0x7ffff756a7f8) at /repo/gcc-trunk/gcc/fold-const.cc:= 14100 #10 0x00000000021f985e in generic_simplify_VEC_COND_EXPR (loc=3D2147483651, code=3D, type=3D0x7ffff7556348, _p0=3D0x7ffff7211ba0, _p1=3D0x7ffff756a7e0, _p2=3D0x7ffff756a7f8) at generic-match-2.cc:8739 #11 0x0000000000eabf3b in fold_ternary_loc (loc=3D2147483651, code=3DVEC_CO= ND_EXPR, type=3D0x7ffff7556348, op0=3D0x7ffff7211ba0, op1=3D0x7ffff756a7e0, op2=3D0x7ffff756a7f8) at /repo/gcc-trunk/gcc/fold-const.cc:13028 #12 0x0000000000eadeb8 in fold_build3_loc (loc=3Dloc@entry=3D2147483651, code=3Dcode@entry=3DVEC_COND_EXPR, type=3Dtype@entry=3D0x7ffff7556348, op0=3D0x7ffff7211ba0, op1=3Dop1@entry=3D0x7ffff756a7e0,=20 op2=3Dop2@entry=3D0x7ffff756a7f8) at /repo/gcc-trunk/gcc/fold-const.cc:= 14100 ... $ aarch64-unknown-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/repo/gcc-13-branch/binary-latest-aarch64/bin/aarch64-unknown= -linux-gnu-gcc COLLECT_LTO_WRAPPER=3D/repo/gcc-13-branch/binary-13-branch-20231001002158-g= f8353d6a7cd-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-un= known-linux-gnu/13.2.1/lto-wrapper Target: aarch64-unknown-linux-gnu Configured with: /repo/gcc-13-branch//configure --enable-languages=3Dc,c++ --enable-valgrind-annotations --disable-nls --enable-checking=3Dyes,rtl,df,= extra --with-cloog --with-ppl --with-isl --with-sysroot=3D/usr/aarch64-unknown-linux-gnu --build=3Dx86_64-pc-linux-g= nu --host=3Dx86_64-pc-linux-gnu --target=3Daarch64-unknown-linux-gnu --with-ld=3D/usr/bin/aarch64-unknown-linux-gnu-ld --with-as=3D/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch --prefix=3D/repo/gcc-13-branch//binary-13-branch-20231001002158-gf8353d6a7c= d-checking-yes-rtl-df-extra-aarch64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.2.1 20231001 (GCC)=