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 middle-end/114552] [13/14 Regression] wrong code at -O1 and above on x86_64-linux-gnu Date: Mon, 01 Apr 2024 20:36:09 +0000 [thread overview] Message-ID: <bug-114552-4-9vJiDdH69Y@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114552-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114552 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |13.3 Last reconfirmed| |2024-04-01 Summary|wrong code at -O1 and above |[13/14 Regression] wrong |on x86_64-linux-gnu |code at -O1 and above on | |x86_64-linux-gnu Component|tree-optimization |middle-end Status|UNCONFIRMED |NEW Target| |x86_64-linux-gnu Keywords| |needs-bisection, wrong-code Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Better reduced testcase, removing the pragma and putting the packed on the struct that is causing the issue: ``` struct a { short b; int c; }__attribute__((packed)); struct d { struct a b; int e; }; static const struct d k = {{1,0},0}; [[gnu::noinline]] void p() { asm("":::"memory"); } [[gnu::noinline]] void q(struct a n) { p(); } int main() { q(k.b); return 0; } ``` The bug is in the middle-end expanding the call `q(k.b);` such that k.b is on the stack but it messes up and uses the wrong size or something.
next prev parent reply other threads:[~2024-04-01 20:36 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-01 19:34 [Bug tree-optimization/114552] New: " zhendong.su at inf dot ethz.ch 2024-04-01 19:38 ` [Bug tree-optimization/114552] " pinskia at gcc dot gnu.org 2024-04-01 20:36 ` pinskia at gcc dot gnu.org [this message] 2024-04-02 11:33 ` [Bug middle-end/114552] [13/14 Regression] " rguenth at gcc dot gnu.org 2024-04-02 13:29 ` [Bug middle-end/114552] [13/14 Regression] wrong code at -O1 and above on x86_64-linux-gnu since r13-990 jakub at gcc dot gnu.org 2024-04-02 13:46 ` jakub at gcc dot gnu.org 2024-04-02 14:18 ` jakub at gcc dot gnu.org 2024-04-02 14:49 ` roger at nextmovesoftware dot com 2024-04-03 8:01 ` cvs-commit at gcc dot gnu.org 2024-04-03 14:32 ` [Bug middle-end/114552] [13 " jakub at gcc dot gnu.org 2024-04-21 4:08 ` cvs-commit at gcc dot gnu.org 2024-04-23 6:45 ` jakub 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-114552-4-9vJiDdH69Y@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).