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

--- Comment #3 from Anders Kaseorg <andersk at mit dot edu> ---
(In reply to Richard Biener from comment #1)
> The testcase is violating strict-aliasing rules as you access a struct head
> as struct node here:

Agree with ghudson here: n->prev points to &heads[2], not &heads[0].

Although assigning a casted struct head * to a struct node * is arguably
sloppy, the standard does not prohibit it, as long as it is never dereferenced
in that form.

Reply via email to