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 ipa/109318] [12/13 Regression] csmith: -fipa-cp seems to cause trouble since r12-2523-g13586172d0b70c Date: Wed, 29 Mar 2023 08:32:28 +0000 [thread overview] Message-ID: <bug-109318-4-gTFQC0IQ5O@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109318-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109318 --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- With -O2 -fno-early-inlining it can be simplified: #pragma pack(1) struct S { signed : 31; unsigned f4 : 20; }; static struct S global; static struct S func_16(struct S *ptr) { return *ptr; } int main() { struct S *local = &global; *local = func_16(local); return 0; } assembly: main: .LFB1: .cfi_startproc movl global(%rip), %eax movl %eax, -7(%rsp) movl global+3(%rip), %eax movl %eax, -4(%rsp) movl -7(%rsp), %edx movl %edx, -14(%rsp) movl %eax, -11(%rsp) movl -14(%rsp), %eax movl %eax, global(%rip) <--- this faults, global was promoted R/O xorl %eax, %eax ret note the #pragma pack is required to avoid optimizing everything away.
next prev parent reply other threads:[~2023-03-29 8:32 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-03-28 16:54 [Bug c/109318] New: csmith: -fipa-cp seems to cause trouble dcb314 at hotmail dot com 2023-03-28 17:39 ` [Bug tree-optimization/109318] " dcb314 at hotmail dot com 2023-03-28 18:37 ` dcb314 at hotmail dot com 2023-03-28 19:15 ` dcb314 at hotmail dot com 2023-03-28 22:15 ` dcb314 at hotmail dot com 2023-03-29 7:46 ` [Bug ipa/109318] csmith: -fipa-cp seems to cause trouble since r12-2523-g13586172d0b70c marxin at gcc dot gnu.org 2023-03-29 8:10 ` [Bug ipa/109318] [12/13 Regression] " marxin at gcc dot gnu.org 2023-03-29 8:13 ` rguenth at gcc dot gnu.org 2023-03-29 8:32 ` rguenth at gcc dot gnu.org [this message] 2023-03-29 8:37 ` jamborm at gcc dot gnu.org 2023-03-31 11:18 ` jamborm at gcc dot gnu.org 2023-04-06 17:01 ` jamborm at gcc dot gnu.org 2023-04-17 11:06 ` cvs-commit at gcc dot gnu.org 2023-04-17 14:16 ` [Bug ipa/109318] [12 " jamborm at gcc dot gnu.org 2023-04-26 16:45 ` cvs-commit at gcc dot gnu.org 2023-04-26 16:45 ` jamborm 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-109318-4-gTFQC0IQ5O@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).