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 ipa/111873] [12/13/14 Regression] runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-loop-optimize -fno-tree-pre'
Date: Thu, 19 Oct 2023 18:40:19 +0000	[thread overview]
Message-ID: <bug-111873-4-86BTv6Xj5y@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111873-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111873

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|runtime Segmentation fault  |[12/13/14 Regression]
                   |with '-O3                   |runtime Segmentation fault
                   |-fno-code-hoisting          |with '-O3
                   |-fno-early-inlining         |-fno-code-hoisting
                   |-fno-tree-fre               |-fno-early-inlining
                   |-fno-tree-loop-optimize     |-fno-tree-fre
                   |-fno-tree-pre'              |-fno-tree-loop-optimize
                   |                            |-fno-tree-pre'
   Target Milestone|---                         |12.4
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-10-19
          Component|middle-end                  |ipa

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
It is the inliner which messes up and introduces the store to a const variable.
We go from:
```
int main ()
{
  <bb 2> [local count: 1073741824]:
  h (c);
  return 0;

}


void h (const struct a i)
{
  const short int i$b;
  int _1;

  <bb 2> [local count: 1073741824]:
  i$b_5 = i.b;
  i.b = i$b_5;
```

To:
```
int main ()
{
  int D.2031;
  const short int i$b;
  int _4;
  int _6;

  <bb 2> [local count: 1073741824]:
  i$b_3 = 0;
  c.b = i$b_3;
```

Which is totally wrong.

  parent reply	other threads:[~2023-10-19 18:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19  7:26 [Bug c/111873] New: " 19373742 at buaa dot edu.cn
2023-10-19  7:26 ` [Bug c/111873] " 19373742 at buaa dot edu.cn
2023-10-19  8:06 ` [Bug middle-end/111873] " 19373742 at buaa dot edu.cn
2023-10-19 18:40 ` pinskia at gcc dot gnu.org [this message]
2023-10-23  9:20 ` [Bug ipa/111873] [12/13/14 Regression] runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-loop-optimize -fno-tree-pre' since r12-434-g93f8cb4965cebe sjames at gcc dot gnu.org
2023-10-23  9:50 ` ebotcazou at gcc dot gnu.org
2023-10-23  9:57 ` ebotcazou at gcc dot gnu.org
2023-10-23 10:19 ` [Bug ipa/111873] [12/13/14 Regression] runtime Segmentation fault with '-O3 -fno-code-hoisting -fno-early-inlining -fno-tree-fre -fno-tree-pre' ebotcazou at gcc dot gnu.org
2023-10-23 10:38 ` ebotcazou at gcc dot gnu.org
2023-10-23 10:44 ` [Bug tree-optimization/111873] " ebotcazou at gcc dot gnu.org
2024-03-07 21:04 ` law at gcc dot gnu.org
2024-03-12 13:23 ` 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-111873-4-86BTv6Xj5y@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: link
Be 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).