public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vincent-gcc at vinc17 dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/14319] incorrect optimization of union of structs with common initial sequences
Date: Wed, 21 Oct 2020 09:45:02 +0000 [thread overview]
Message-ID: <bug-14319-4-SAVWkmLgMN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-14319-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14319
Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vincent-gcc at vinc17 dot net
--- Comment #17 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Tim Rentsch from comment #10)
> Four: Despite the last observation, the "one special guarantee" clause
> (and hence also DR 257) is clearly not germane to this problem. The
> reason for this is that the "one special guarantee" clause is concerned
> with read access ("inspect" is the word used in the Standard),
[...]
In any case, the aliasing rule is only about read access: "An object shall have
its stored value accessed only by [...]" (6.5#7). If you are accessing a stored
value, this means that you are reading it. Thus the "yp->y = 1;" does not imply
undefined behavior, in case this is what you were thinking about.
Note: Forbidding write accesses with a different effective type would make "for
subsequent accesses that do not modify the value" from 6.5#6 pointless.
next prev parent reply other threads:[~2020-10-21 9:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-14319-4@http.gcc.gnu.org/bugzilla/>
2015-04-26 0:15 ` pinskia at gcc dot gnu.org
2020-08-31 18:26 ` pinskia at gcc dot gnu.org
2020-08-31 18:49 ` fxcoudert at gcc dot gnu.org
2020-10-21 9:45 ` vincent-gcc at vinc17 dot net [this message]
2020-10-21 13:45 ` jameskuyper at alumni dot caltech.edu
2021-07-29 18:55 ` pinskia at gcc dot gnu.org
[not found] <bug-14319-1165@http.gcc.gnu.org/bugzilla/>
2009-12-19 3:45 ` pinskia at gcc dot gnu dot org
2009-12-19 14:41 ` dvilleneuve at kronos dot com
2004-02-27 5:29 [Bug c/14319] New: " jsturm at gcc dot gnu dot org
2004-05-27 5:21 ` [Bug rtl-optimization/14319] " pinskia at gcc dot gnu dot org
2005-09-26 15:42 ` pinskia at gcc dot gnu dot 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-14319-4-SAVWkmLgMN@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).