From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D47533882130; Fri, 14 Jun 2024 19:07:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D47533882130 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718392051; bh=y6zJ+HPVGuIG9JaVOXS2tm1RMTWInToDbkPd+qhHKBc=; h=From:To:Subject:Date:From; b=ZLuymLX5Bu2BVliNmspw7cyZXDdAymjgUAIEaM7RXcjKUjKpwo/sbGaq7ioNpEZ3P W4gzx+TCfoh3h4uECdnPqY4Yl62xTkCAVB8qwx0irh8Jxq6iukMdRPH3DyOaNM4e78 +izJDcvzO8iI52vnfqtIuhhS/2ezbNpDv+T03jOA= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/115495] New: [15 Regression] ICE in smallest_mode_for_size, at stor-layout.cc:356 during combine on RISC-V rv64gcv_zvl256b at -O3 Date: Fri, 14 Jun 2024 19:07:31 +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: 15.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=3D115495 Bug ID: 115495 Summary: [15 Regression] ICE in smallest_mode_for_size, at stor-layout.cc:356 during combine on RISC-V rv64gcv_zvl256b at -O3 Product: gcc Version: 15.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: --- Testcase: extern short a[]; short b; int main() { for (char c =3D 0; c < 18; c +=3D 1) a[c + 0] =3D b; } Backtrace: > /scratch/tc-testing/tc-jun-14/build-rv64gcv/bin/riscv64-unknown-linux-gnu= -gcc -march=3Drv64gcv_zvl256b -O3 red.c -o red.out during RTL pass: combine ./red.c: In function 'main': ./red.c:6:1: internal compiler error: in smallest_mode_for_size, at stor-layout.cc:356 6 | } | ^ 0x134a8f7 smallest_mode_for_size(poly_int<2u, unsigned long>, mode_class) ../../../gcc/gcc/stor-layout.cc:356 0x11fa32a smallest_int_mode_for_size(poly_int<2u, unsigned long>) ../../../gcc/gcc/machmode.h:916 0x11fa32a get_best_extraction_insn ../../../gcc/gcc/optabs-query.cc:208 0x25f7d54 make_extraction ../../../gcc/gcc/combine.cc:7779 0x25f903f make_compound_operation_int ../../../gcc/gcc/combine.cc:8186 0x25fa07f make_compound_operation(rtx_def*, rtx_code) ../../../gcc/gcc/combine.cc:8471 0x25fddce simplify_set ../../../gcc/gcc/combine.cc:6975 0x25fddce combine_simplify_rtx ../../../gcc/gcc/combine.cc:6374 0x260006f subst ../../../gcc/gcc/combine.cc:5630 0x2604101 try_combine ../../../gcc/gcc/combine.cc:3312 0x2609351 combine_instructions ../../../gcc/gcc/combine.cc:1264 0x2609351 rest_of_handle_combine ../../../gcc/gcc/combine.cc:15127 0x2609351 execute ../../../gcc/gcc/combine.cc:15171 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. Godbolt: https://godbolt.org/z/zTf5nWz48 Found via fuzzer. The fuzzer first detected this on 2024-06-07 and many times since so it was likely caused by a patch committed a day or two before 2024-06-07.=