https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433
Martin Sebor changed:
What|Removed |Added
CC||dank at kegel dot com
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433
--- Comment #4 from Andrew Pinski ---
>IMO we should look into why this optimization doesn't happen before PRE (why
>not FRE for instance?).
Because the reads from s are only partially redundant (PRE) and not fully (vs
FRE). :)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433
--- Comment #3 from Marc Glisse ---
f3: the inliner silently removes s (and the assignment to it) as write-only.
You need to add a function that reads s (we don't warn in that case either, of
course, but that's a first step).
f2: the (atomic)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433
Eric Gallager changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433
--- Comment #1 from Andrew Pinski ---
Hmm, I don't know how GCC can detect this except with optimizations because the
assignment to s happens at runtime.