public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/78685] -Og generates too many "<optimized out>"s Date: Mon, 09 Oct 2023 09:17:23 +0000 [thread overview] Message-ID: <bug-78685-4-nHKd1cJgky@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-78685-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78685 --- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> --- extern void abort (void); int __attribute__((noipa)) foo () { return 1; } int main() { int res = foo (); if (res != 0) abort (); } Asks for call clobbered registers associated with user variables to be preserved around calls. In this case the value of 'res' ($eax on x86) is no longer available when receiving SIGABRT, instead it's quickly clobbered. The more aggressive variant would be to force all user variables to the stack (but then we still have to put saves around calls, in this case it's similar to what Jakub says with uses after the call).
next prev parent reply other threads:[~2023-10-09 9:17 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-78685-4@http.gcc.gnu.org/bugzilla/> 2021-05-18 13:36 ` egallager at gcc dot gnu.org 2021-05-18 15:35 ` rsandifo at gcc dot gnu.org 2021-12-13 13:38 ` mark at hotpy dot org 2023-10-09 9:17 ` rguenth at gcc dot gnu.org [this message] 2024-02-28 7:47 ` 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-78685-4-nHKd1cJgky@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).