public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94861] New: Don't make undefined values 0
@ 2020-04-29 20:57 gabravier at gmail dot com
2020-04-29 21:47 ` [Bug rtl-optimization/94861] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: gabravier at gmail dot com @ 2020-04-29 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94861
Bug ID: 94861
Summary: Don't make undefined values 0
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: gabravier at gmail dot com
Target Milestone: ---
int f()
{
int x = x;
return x;
}
LLVM compiles this to a return instruction, not bothering to initialize the
result register as its value is undefined. GCC instead does `return 0` for
this.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug rtl-optimization/94861] Don't make undefined values 0
2020-04-29 20:57 [Bug tree-optimization/94861] New: Don't make undefined values 0 gabravier at gmail dot com
@ 2020-04-29 21:47 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-04-29 21:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94861
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Component|tree-optimization |rtl-optimization
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC does this at the RTL level to make dataflow easy to process; RTL is not a
SSA.
This has been since at least GCC 4.3.0.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-29 21:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-29 20:57 [Bug tree-optimization/94861] New: Don't make undefined values 0 gabravier at gmail dot com
2020-04-29 21:47 ` [Bug rtl-optimization/94861] " 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).