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 c++/111019] [12/13/14 Regression] Optimizer incorrectly assumes variable is not changed while change happens through another pointer
Date: Tue, 15 Aug 2023 08:55:31 +0000	[thread overview]
Message-ID: <bug-111019-4-JS89luIoYN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-111019-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.4
     Ever confirmed|0                           |1
            Summary|Optimizer incorrectly       |[12/13/14 Regression]
                   |assumes variable is not     |Optimizer incorrectly
                   |changed while change        |assumes variable is not
                   |happens through another     |changed while change
                   |pointer                     |happens through another
                   |                            |pointer
           Keywords|                            |alias, needs-bisection,
                   |                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-08-15

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can confirm this with -O3 (but not -O2), even when adding
-fno-tree-loop-optimize.  -fno-strict-aliasing avoids the issue (but I can't
see anything
obviously wrong in the sources).  The requirement for the bug to show up
is inlining Target::~Target, marking it always_inline makes the bug
appear at -O2 or -O1 -fstrict-aliasing as well.  The bug is we endlessly
loop in the Target::~Target loop.

Needs further analysis, bisection might help.

  reply	other threads:[~2023-08-15  8:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 22:00 [Bug c++/111019] New: " boskidialer at gmail dot com
2023-08-15  8:55 ` rguenth at gcc dot gnu.org [this message]
2023-08-15 12:59 ` [Bug c++/111019] [12/13/14 Regression] " ppalka at gcc dot gnu.org
2023-08-15 13:39 ` rguenther at suse dot de
2023-08-15 16:15 ` boskidialer at gmail dot com
2023-08-17  6:49 ` rguenth at gcc dot gnu.org
2023-08-17 12:08 ` rguenth at gcc dot gnu.org
2023-08-17 12:53 ` rguenth at gcc dot gnu.org
2023-08-17 13:00 ` rguenth at gcc dot gnu.org
2023-08-17 13:24 ` rguenth at gcc dot gnu.org
2023-08-18 13:05 ` cvs-commit at gcc dot gnu.org
2023-08-18 13:11 ` [Bug c++/111019] [12/13 " rguenth at gcc dot gnu.org
2023-08-21 11:27 ` boskidialer at gmail dot com
2023-08-24 10:56 ` cvs-commit at gcc dot gnu.org
2023-11-27 11:35 ` [Bug tree-optimization/111019] [12 " cvs-commit at gcc dot gnu.org
2023-11-27 11:37 ` rguenth 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-111019-4-JS89luIoYN@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).