public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/80794] constant objects can be assumed to be immutable
       [not found] <bug-80794-4@http.gcc.gnu.org/bugzilla/>
@ 2020-09-14 15:18 ` msebor at gcc dot gnu.org
  2020-09-14 15:57 ` msebor at gcc dot gnu.org
  2020-09-14 16:18 ` matthijs at stdin dot nl
  2 siblings, 0 replies; 3+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-09-14 15:18 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matthijs at stdin dot nl

--- Comment #8 from Martin Sebor <msebor at gcc dot gnu.org> ---
*** Bug 96996 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/80794] constant objects can be assumed to be immutable
       [not found] <bug-80794-4@http.gcc.gnu.org/bugzilla/>
  2020-09-14 15:18 ` [Bug tree-optimization/80794] constant objects can be assumed to be immutable msebor at gcc dot gnu.org
@ 2020-09-14 15:57 ` msebor at gcc dot gnu.org
  2020-09-14 16:18 ` matthijs at stdin dot nl
  2 siblings, 0 replies; 3+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-09-14 15:57 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=90404,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=86318

--- Comment #9 from Martin Sebor <msebor at gcc dot gnu.org> ---
See also pr86318 and especially pr90404.  As noted in c#2 on the former,
issuing a warning when an attempt is detected to modify a const object (or
subobject) as requested in pr90404 should help detect changes, resulting from
the optimization, to the behavior of code that deliberately violates the
restriction to modify constant subobjects.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug tree-optimization/80794] constant objects can be assumed to be immutable
       [not found] <bug-80794-4@http.gcc.gnu.org/bugzilla/>
  2020-09-14 15:18 ` [Bug tree-optimization/80794] constant objects can be assumed to be immutable msebor at gcc dot gnu.org
  2020-09-14 15:57 ` msebor at gcc dot gnu.org
@ 2020-09-14 16:18 ` matthijs at stdin dot nl
  2 siblings, 0 replies; 3+ messages in thread
From: matthijs at stdin dot nl @ 2020-09-14 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Matthijs Kooijman <matthijs at stdin dot nl> ---
Also note that pr96996, that was marked as a duplicate of this report, talks
about a notable subcase of the case presented in this report. While this report
talks about constant complete objects (e.g. a variable marked const), pr96996
talks about const subobjects (e.g. a const member of a variable that might not
be const itself).

That pr has some motivation to argue that such const subobjects can be
optimized in the same way as const complete objects. Maybe this is obvious for
seasoned gcc devs, but I wanted to point it out regardless, since the cases
seem distinct enough to me that one might end up fixing this for objects and
forgetting about subobjects :-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-14 16:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-80794-4@http.gcc.gnu.org/bugzilla/>
2020-09-14 15:18 ` [Bug tree-optimization/80794] constant objects can be assumed to be immutable msebor at gcc dot gnu.org
2020-09-14 15:57 ` msebor at gcc dot gnu.org
2020-09-14 16:18 ` matthijs at stdin dot nl

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).