This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/41085] [4.5 Regression]: cris-elf gcc.dg/pr28796-2.c
- From: "hp at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Aug 2009 03:44:46 -0000
- Subject: [Bug rtl-optimization/41085] [4.5 Regression]: cris-elf gcc.dg/pr28796-2.c
- References: <bug-41085-507@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from hp at gcc dot gnu dot org 2009-08-17 03:44 -------
Created an attachment (id=18376)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18376&action=view)
Simplified gcc.dg/pr28796-2.c
It's the fourth call to foo that has its "d" parameter (passed in r10 and r11)
munged to 0, where r11 should have held 0x100000, just like r13 (parameter
"ld", passed in r12 and r13 and long double === double for this target).
If you look at the generated code, there's a little song-and-dance storing the
variables temporarily to stack because of the "volatile" qualifier, but which
seemingly improved with r149962. To wit, the lines
d = ((double)2.2250738585072014e-308L); ld = 2.2250738585072014e-308L;
foo(d, ld, 0, 1);
are compiled as:
d = 0; ld = 2.2250738585072014e-308L;
foo(d, ld, 0, 1);
Deleting further individual statements or parameters or the volatile qualifiers
(any combination I tried) hid the bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41085