This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15454] miscompilation of __print_fp from stdio
- From: "belyshev at lubercy dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 May 2004 09:01:39 -0000
- Subject: [Bug c/15454] miscompilation of __print_fp from stdio
- References: <20040515052940.15454.belyshev@lubercy.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From belyshev at lubercy dot com 2004-05-15 09:01 -------
Created an attachment (id=6299)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6299&action=view)
minimized testcase (276 bytes)
void abort ();
int main () {
int foo;
int bar (void)
{
int baz = 0;
if (foo)
baz = foo;
return baz;
}
foo = 1;
if (!bar ())
abort ();
return 0;
}
Before CCP:
;; Function bar (bar.0)
bar ()
{
int baz;
int foo.1;
<bb 0>:
foo.1_4 = CHAIN.3_3->foo;
if (foo.1_4 != 0) goto <L0>; else goto <L1>;
<L0>:;
# baz_1 = PHI <0(0), foo.1_4(1)>;
<L1>:;
return baz_1;
}
After:
;; Function bar (bar.0)
bar ()
{
int baz;
int foo.1;
<bb 0>:
foo.1_4 = CHAIN.3_3->foo;
if (foo.1_4 != 0) goto <L0>; else goto <L1>;
<L0>:;
# baz_1 = PHI <0(0), foo.1_4(1)>;
<L1>:;
return 0;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Attachment #6298 is|0 |1
obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15454