public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114846] New: powerpc: epilogue in _Unwind_RaiseException corrupts return value due to __builtin_eh_return Date: Thu, 25 Apr 2024 07:34:49 +0000 [thread overview] Message-ID: <bug-114846-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114846 Bug ID: 114846 Summary: powerpc: epilogue in _Unwind_RaiseException corrupts return value due to __builtin_eh_return Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Target: powerpc64-linux-gnu powerpc-linux-gnu I reduced an miscompile for aarch64 inside _Unwind_RaiseException and I noticed the same issue can be reproduced on powerpc64-linux-gnu and powerpc-linux-gnu. Reduced testcase: ``` __attribute__((noipa,noinline)) int f(int *a, long offset, void *handler) { if (*a == 5) return 5; __builtin_eh_return (offset, handler); } int main() { int t = 5; if (f(&t, 0, 0) != 5) __builtin_abort(); } ``` This produces a load in the epilogue part for the `return 5` path (which is reduced from the end of stack path inside _Unwind_RaiseException). ``` li 3,5 li 10,0 .L4: ld 2,40(1) ld 4,-24(1) ld 5,-16(1) ld 6,-8(1) ld 3,-32(1) add 1,1,10 blr ```
next reply other threads:[~2024-04-25 7:34 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-25 7:34 pinskia at gcc dot gnu.org [this message] 2024-04-25 9:23 ` [Bug target/114846] " linkw at gcc dot gnu.org 2024-04-25 9:25 ` linkw at gcc dot gnu.org 2024-04-25 21:37 ` pinskia at gcc dot gnu.org 2024-04-29 5:20 ` linkw at gcc dot gnu.org 2024-04-29 9:04 ` linkw at gcc dot gnu.org 2024-05-14 8:49 ` linkw at gcc dot gnu.org 2024-05-29 2:15 ` cvs-commit at gcc dot gnu.org 2024-05-29 2:33 ` linkw at gcc dot gnu.org 2024-05-29 12:30 ` bergner at gcc dot gnu.org 2024-05-29 12:50 ` linkw at gcc dot gnu.org 2024-06-21 19:53 ` bergner at gcc dot gnu.org 2024-06-23 19:42 ` segher at gcc dot gnu.org 2024-06-24 1:43 ` cvs-commit at gcc dot gnu.org 2024-06-24 1:45 ` cvs-commit at gcc dot gnu.org 2024-06-24 1:46 ` cvs-commit at gcc dot gnu.org 2024-06-24 1:49 ` cvs-commit at gcc dot gnu.org 2024-06-24 3:46 ` linkw at gcc dot gnu.org 2024-06-24 3:50 ` linkw 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-114846-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).