From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF3633858C2D; Mon, 9 Oct 2023 09:17:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF3633858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696843044; bh=7pYPgcXpzTb0SdT3k/VlzZZh10zzs/M0ock4HDT9KHo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LldxEJJeE+3swT0RYX/s1KrwjKGcAVpPpBMI05VRMK5wQVuVZKDN4eMPaRJbcTUIT /oEDQZFudveCY5MGqVLYWM8nqM6I5PtjI86uOEPtKdCXz/tIdC1DGuMOUMKl9bOqrt DdZYYD6e8Pt3LdzWQJD7Vm/63aJMkM//TQo9MyyI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/78685] -Og generates too many ""s Date: Mon, 09 Oct 2023 09:17:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 6.2.1 X-Bugzilla-Keywords: wrong-debug X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 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=3D78685 --- Comment #22 from Richard Biener --- extern void abort (void); int __attribute__((noipa)) foo () { return 1; }=20 int main() { int res =3D foo (); if (res !=3D 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).=