public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "k.even-mendoza at imperial dot ac.uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/105910] New: ICE: with -O1 optimization level and code calling __builtin_return_address Date: Thu, 09 Jun 2022 17:16:51 +0000 [thread overview] Message-ID: <bug-105910-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105910 Bug ID: 105910 Summary: ICE: with -O1 optimization level and code calling __builtin_return_address Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: k.even-mendoza at imperial dot ac.uk Target Milestone: --- This code (reduced): === int a; void b() { a = ((long)__builtin_return_address(0) ^ (long)__builtin_return_address(0)) * (long)__builtin_return_address(524288); } int main(void) { return 0;} === crashed the compiler with -O1: gcc -O1 test4.c gcc: internal compiler error: Segmentation fault signal terminated program cc1 Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://gcc.gnu.org/bugs/> for instructions. ==== It works fine with other optimization levels including -O0. It happens with gcc-11, gcc-12 and gcc-13 (tested with 20220606); with gcc-10 and below it seems to work fine also with -O1.
next reply other threads:[~2022-06-09 17:16 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-09 17:16 k.even-mendoza at imperial dot ac.uk [this message] 2022-06-09 17:24 ` [Bug middle-end/105910] " pinskia at gcc dot gnu.org 2022-06-09 17:31 ` k.even-mendoza at imperial dot ac.uk 2022-06-21 5:39 ` [Bug rtl-optimization/105910] " pinskia at gcc dot gnu.org 2023-05-17 23:36 ` [Bug middle-end/105910] __builtin_return_address expansion with a large # causes a compile time issues and even ICEs sometimes pinskia at gcc dot gnu.org 2023-05-17 23:36 ` pinskia at gcc dot gnu.org 2023-05-17 23:39 ` [Bug middle-end/105910] [11/12/13/14 Regression] " pinskia at gcc dot gnu.org 2023-07-19 11:03 ` rguenth at gcc dot gnu.org 2023-10-16 14:00 ` pinskia at gcc dot gnu.org 2024-04-11 2:24 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105910-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).