public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "georgmueller at gmx dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/108439] incorrect optimization with -O2, -O3, -Os
Date: Tue, 17 Jan 2023 21:44:36 +0000 [thread overview]
Message-ID: <bug-108439-4-tOU2MQ8o3u@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108439-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108439
--- Comment #5 from Georg Müller <georgmueller at gmx dot net> ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Georg Müller from comment #1)
> > Also, this compiler warning and execution error is removed by compiling with
> > -fno-strict-aliasing, but again, this does not look right.
>
> Why do you think that is not correct? The aliasing violation causing
> undefined behavior is obvious from the stores and loads that happen from the
> source.
main() only works with its own lb_key array. It is only modified before giving
it to crap8() - it does not handle the internals of the hashing function.
crap8() takes the key as a void pointer - no assumptions about what it gets and
only converts void* to uint32_t*, what should be fine, or?
Why is there a warning of lb_key not being initialized in the second example,
even though its only member gets initialized twice? Via the same reference...
next prev parent reply other threads:[~2023-01-17 21:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 21:17 [Bug c/108439] New: " georgmueller at gmx dot net
2023-01-17 21:22 ` [Bug c/108439] " georgmueller at gmx dot net
2023-01-17 21:25 ` georgmueller at gmx dot net
2023-01-17 21:32 ` pinskia at gcc dot gnu.org
2023-01-17 21:33 ` pinskia at gcc dot gnu.org
2023-01-17 21:44 ` georgmueller at gmx dot net [this message]
2023-01-17 21:51 ` pinskia at gcc dot gnu.org
2023-01-18 9:01 ` georgmueller at gmx dot net
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-108439-4-tOU2MQ8o3u@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).