From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 405A83857BB1; Mon, 27 Nov 2023 19:12:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 405A83857BB1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701112374; bh=SInS/PIeMbHRx4RiEV/0SCqT68wBkVrh7dmvGwq2nUA=; h=From:To:Subject:Date:From; b=gI1TEdFbW2d9c8lNey405ilqmQ2PWcTRXE2rWaqTTgHmgPZtYfjHOD4F4xlhKTuB7 kgACBAzbu3Rk1Y12L9gY9SHYPA9F+OitMfztHYOsQ1M57C62ca2AZj1O7koTD3U7cB rA6+DbyObVP+H/jv4Ff5jdj9BEkIyQgjDVamdsbA= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/112733] New: [14 Regression] ICE: Segmentation fault in wide-int.cc during GIMPLE pass: sccp Date: Mon, 27 Nov 2023 19:12:53 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick at rivosinc 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 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=3D112733 Bug ID: 112733 Summary: [14 Regression] ICE: Segmentation fault in wide-int.cc during GIMPLE pass: sccp Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Reconfirmed using r14-5889-gc9d691a7daa. This has not been bisected. Using godbolt to check - this is broken on trunk x86, arm, riscv. Regression from 13.2 where this compiles on x86, arm, riscv. > cat red.c char a, c; short b; void d() { signed char *e =3D &a; c =3D 0 !=3D d; *e &=3D c; for (; b; --b) *e &=3D 128; } > /scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv/bin/riscv64-unknown-lin= ux-gnu-gcc red.c -S -O2 -freport-bug during GIMPLE pass: sccp red.c: In function 'd': red.c:3:6: internal compiler error: Segmentation fault 3 | void d() { | ^ 0x12884a3 crash_signal ../../../gcc/gcc/toplev.cc:316 0x7fb10de4251f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x163ac0e wi_pack ../../../gcc/gcc/wide-int.cc:1303 0x1642d17 wi::divmod_internal(long*, unsigned int*, long*, long const*, unsigned int, unsigned int, long const*, unsigned int, unsigned int, signop, wi::overflow_type*) ../../../gcc/gcc/wide-int.cc:1988 0xecaf5c wi::binary_traits >, generic_wide_int >, wi::int_traits > >::precision_ty= pe, wi::int_traits > >::precision_type>::result_type wi::mod_trunc >, generic_wide_int > >(generic_wide_int > const&, generic_wide_int > const&, signop, wi::overflow_type*) ../../../gcc/gcc/wide-int.h:3382 0xeac199 bool wi::multiple_of_p = >, generic_wide_int > >(generic_wide_int > const&, generic_wide_int > const&, signop) ../../../gcc/gcc/wide-int.h:3549 0xeac199 multiple_of_p(tree_node*, tree_node const*, tree_node const*, bool) ../../../gcc/gcc/fold-const.cc:14554 riscv64-unknown-linux-gnu-gcc: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source. See for instructions. -freport bug does not seem to be working for me so here's the -v output: > /scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv/bin/riscv64-unknown-lin= ux-gnu-gcc -v Using built-in specs. COLLECT_GCC=3D/scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv/bin/riscv64= -unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=3D/scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv/lib= exec/gcc/riscv64-unknown-linux-gnu/14.0.0/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv/../gcc/configure --target=3Driscv64-unknown-linux-gnu --prefix=3D/scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv --with-sysroot=3D/scratch/tc-testing/tc-nov-27-trunk/build-rv64gcv/sysroot --with-pkgversion=3Dgc9d691a7daa --with-system-zlib --enable-shared --enabl= e-tls --enable-languages=3Dc,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootst= rap --src=3D../../gcc --enable-multilib --with-abi=3Dlp64d --with-arch=3Drv64im= afdc --with-tune=3Drocket --with-isa-spec=3D20191213 'CFLAGS_FOR_TARGET=3D-O2=20= =20=20 -mcmodel=3Dmedlow' 'CXXFLAGS_FOR_TARGET=3D-O2 -mcmodel=3Dmedlow' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20231127 (experimental) (gc9d691a7daa)=