https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116768
Alisa Sireneva changed:
What|Removed |Added
Known to work|11.4.0 |11.1.0
--- Comment #4 from Alisa Siren
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: imachug at gmail dot com
Target Milestone: ---
This returns 0 (wrong) with strict aliasing enabled and 1 (correct) with strict
aliasing disabled. Looks like a bug to me (no casts, sanitizers are silent
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103696
--- Comment #1 from Ivan Machugovskiy ---
Obligatory info dump. I managed to reproduce this on G++ 9.3.0 and G++ 10.3.0
locally, and on G++ trunk on Godbolt (see https://godbolt.org/z/Y5Kr3KfjW).
This is probably a longstanding bug.
$ g++ -v
U
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: imachug at gmail dot com
Target Milestone: ---
This seems like a very weird bug to me and I'm not even sure how to label it,
so please fix the component if needed.
Testca
: target
Assignee: unassigned at gcc dot gnu.org
Reporter: imachug at gmail dot com
Target Milestone: ---
Consider the following code:
struct {
unsigned long a, b;
} structure;
void calc() {
unsigned long x = structure.a;
unsigned long y = structure.b