public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48782] New: unused-but-set static variables are not optimized out
@ 2011-04-26 23:38 flameeyes at gentoo dot org
2013-11-10 5:25 ` [Bug middle-end/48782] " pinskia at gcc dot gnu.org
2021-12-11 19:03 ` [Bug ipa/48782] " pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: flameeyes at gentoo dot org @ 2011-04-26 23:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48782
Summary: unused-but-set static variables are not optimized out
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: flameeyes@gentoo.org
int main() {
static unsigned char done = 0;
done = 1;
return 1;
}
The done variable is properly reported as unused-but-set by gcc but both the
"done = 1" store and the memory area itself is kept in the produced code up to
-O3.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug middle-end/48782] unused-but-set static variables are not optimized out
2011-04-26 23:38 [Bug c/48782] New: unused-but-set static variables are not optimized out flameeyes at gentoo dot org
@ 2013-11-10 5:25 ` pinskia at gcc dot gnu.org
2021-12-11 19:03 ` [Bug ipa/48782] " pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2013-11-10 5:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48782
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-11-10
Component|c |middle-end
Ever confirmed|0 |1
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ipa/48782] unused-but-set static variables are not optimized out
2011-04-26 23:38 [Bug c/48782] New: unused-but-set static variables are not optimized out flameeyes at gentoo dot org
2013-11-10 5:25 ` [Bug middle-end/48782] " pinskia at gcc dot gnu.org
@ 2021-12-11 19:03 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-11 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48782
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
Component|middle-end |ipa
Status|NEW |RESOLVED
Known to work| |12.0, 5.1.0
Known to fail| |4.9.4
Resolution|--- |FIXED
Target Milestone|--- |5.0
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 5 by r5-657-g6de88c6a1c7fb017720c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-12-11 19:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 23:38 [Bug c/48782] New: unused-but-set static variables are not optimized out flameeyes at gentoo dot org
2013-11-10 5:25 ` [Bug middle-end/48782] " pinskia at gcc dot gnu.org
2021-12-11 19:03 ` [Bug ipa/48782] " pinskia at gcc dot gnu.org
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).