public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/28403]  New: [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
@ 2006-07-17  8:20 rsandifo at gcc dot gnu dot org
  2006-07-17  8:21 ` [Bug middle-end/28403] " rsandifo at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-17  8:20 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-07-26 13:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-17  8:20 [Bug middle-end/28403] New: [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift rsandifo at gcc dot gnu dot org
2006-07-17  8:21 ` [Bug middle-end/28403] " rsandifo at gcc dot gnu dot org
2006-07-17 15:31 ` rsandifo at gcc dot gnu dot org
2006-07-17 15:34 ` rsandifo at gcc dot gnu dot org
2006-07-20  8:32 ` rsandifo at gcc dot gnu dot org
2006-07-22 14:25 ` [Bug middle-end/28403] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-07-22 14:25 ` pinskia at gcc dot gnu dot org
2006-07-26 13:32 ` rsandifo at gcc dot gnu dot org
2006-07-26 13:35 ` rsandifo at gcc dot gnu dot org
2006-07-26 13:39 ` rsandifo at gcc dot gnu dot 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).