From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E2D973858286; Sun, 11 Sep 2022 10:19:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E2D973858286 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662891583; bh=q8qsM5rusn3VJptBBXCBU05eM5hEpO2PnWvIXRdLGA8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gyBD5Ni5WPcITFSMCRamyfsNGxCLBZ1IpEPa5rpwZUYdaFnsGle4DdH6ziQZe32GG 8Jpqh2do50LJFrZct4Wx4taF9bybVUYI5iOQLPTvKjrxhmqiY6/U8z9OQM03Nl1Gkg qznkqSktuTykgfBhe4/HDYPrnMKmsXr+cK1T9lOQ= From: "triffid.hunter at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105753] [avr] ICE: in add_clobbers, at config/avr/avr-dimode.md:2705 Date: Sun, 11 Sep 2022 10:19:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: triffid.hunter at gmail 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: cc attachments.created Message-ID: In-Reply-To: References: 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=3D105753 Triffid Hunter changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |triffid.hunter at gmail do= t com --- Comment #5 from Triffid Hunter --- Created attachment 53561 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53561&action=3Dedit patch based on comment 1 I ran into this issue yesterday (with gcc-13.0.0-20220904). I made the attached patch based on Comment 1, and it does seem to solve the issue. I had some odd lto-related crashes afterwards, but wasn't able to reproduce them after a clean rebuild of my project - so I suspect there was some odd interaction with stale/cached object files. lto crash backtrace in case it's relevant: avr-gcc -Wall -Wextra -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=3Datmega2560 -fno-stack-protector -o /tmp/arduino_build_820599/sketch_sep10a.ino.elf /tmp/arduino_build_820599/sketch/sketch_sep10a.ino.cpp.o /tmp/arduino_build_820599/libraries/SD/File.cpp.o /tmp/arduino_build_820599/libraries/SD/SD.cpp.o /tmp/arduino_build_820599/libraries/SD/utility/Sd2Card.cpp.o /tmp/arduino_build_820599/libraries/SD/utility/SdFile.cpp.o /tmp/arduino_build_820599/libraries/SD/utility/SdVolume.cpp.o /tmp/arduino_build_820599/libraries/SPI/SPI.cpp.o /tmp/arduino_build_820599/../arduino_cache_495395/core/core_arduino_avr_meg= a_cpu_atmega2560_0535ac2d4e0500949a67f524c7f20d71.a -L/tmp/arduino_build_820599 -lm lto1: internal compiler error: Segmentation fault 0x135b2a8 internal_error(char const*, ...) ???:0 0x675125 bp_unpack_string(data_in*, bitpack_d*) ???:0 0x986c9e cl_optimization_stream_in(data_in*, bitpack_d*, cl_optimization*) ???:0 0xc3bf60 streamer_read_tree_bitfields(lto_input_block*, data_in*, tree_node= *) ???:0 0x904fad lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned in= t) ???:0 0x9053d7 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned int*, bool) ???:0 0x5e9fc8 read_cgraph_and_symbols(unsigned int, char const**) ???:0 0x5d7222 lto_main() ???:0 Note: stopped happening after clean project rebuild, but ideally it should throw a proper error rather than a segfault?=