This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28403] New: [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
- From: "rsandifo 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 Jul 2006 08:20:27 -0000
- Subject: [Bug middle-end/28403] New: [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
On sh, the following code:
---------------------------------------------------------------------
typedef unsigned long long ull;
int __attribute__((noinline))
foo (int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8)
{
return x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8;
}
ull __attribute__((noinline))
bar (ull x)
{
return x << foo (1, 2, 1, 3, 1, 4, 1, 5);
}
int
main (void)
{
if (bar (0x123456789ULL) != (0x123456789ULL << 18))
abort ();
exit (0);
}
---------------------------------------------------------------------
is miscompiled; we do not pop the arguments from the call to foo().
The problem is that the pop was done by an aborted attempt to do
the shift using OPTAB_DIRECT.
3.4 did not have this problem; it's a 4.x regression
introduced by my 2004-09-04 patch.
--
Summary: [4.0/4.1/4.2 Regression] Missed argument pop after
doubleword shift
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rsandifo at gcc dot gnu dot org
GCC target triplet: sh-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403