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

* [Bug middle-end/28403] [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
  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 ` rsandifo at gcc dot gnu dot org
  2006-07-17 15:31 ` rsandifo at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-17  8:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rsandifo at gcc dot gnu dot org  2006-07-17 08:21 -------
I'm testing a patch.


-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rsandifo at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
      Known to fail|                            |4.0.4 4.1.2 4.2.0
      Known to work|                            |3.4.4
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-17 08:21:04
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
  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
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-17 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rsandifo at gcc dot gnu dot org  2006-07-17 15:31 -------
Subject: Bug 28403

Author: rsandifo
Date: Mon Jul 17 15:31:12 2006
New Revision: 115525

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115525
Log:
gcc/
        PR middle-end/28403
        * optabs.c (expand_doubleword_shift): Wrap the call to
        do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP.

gcc/testsuite/
        PR middle-end/28403
        * gcc.c-torture/execute/pr28403.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr28403.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/optabs.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
  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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-17 15:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rsandifo at gcc dot gnu dot org  2006-07-17 15:34 -------
Patch committed to mainline.  Will commit to branches in a few
days if nothing goes awry.


-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0.4 4.1.2 4.2.0           |4.0.4 4.1.2
      Known to work|3.4.4                       |3.4.4 4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1/4.2 Regression] Missed argument pop after doubleword shift
  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
                   ` (2 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-20  8:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rsandifo at gcc dot gnu dot org  2006-07-20 08:32 -------
Subject: Bug 28403

Author: rsandifo
Date: Thu Jul 20 08:31:59 2006
New Revision: 115611

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115611
Log:
        Backport from mainline:

        2006-07-17  Richard Sandiford  <richard@codesourcery.com>

        PR middle-end/28403
        * optabs.c (expand_doubleword_shift): Wrap the call to
        do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP.

Added:
    branches/csl/sourcerygxx-4_1/gcc/testsuite/gcc.c-torture/execute/pr28403.c
Modified:
    branches/csl/sourcerygxx-4_1/ChangeLog.csl
    branches/csl/sourcerygxx-4_1/gcc/optabs.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1 Regression] Missed argument pop after doubleword shift
  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
                   ` (4 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-22 14:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.5                       |4.0.4


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1 Regression] Missed argument pop after doubleword shift
  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
                   ` (3 preceding siblings ...)
  2006-07-20  8:32 ` rsandifo at gcc dot gnu dot org
@ 2006-07-22 14:25 ` pinskia at gcc dot gnu dot org
  2006-07-22 14:25 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-22 14:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 Regression]    |[4.0/4.1 Regression] Missed
                   |Missed argument pop after   |argument pop after
                   |doubleword shift            |doubleword shift
   Target Milestone|---                         |4.0.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1 Regression] Missed argument pop after doubleword shift
  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
                   ` (5 preceding siblings ...)
  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
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-26 13:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rsandifo at gcc dot gnu dot org  2006-07-26 13:32 -------
Subject: Bug 28403

Author: rsandifo
Date: Wed Jul 26 13:32:01 2006
New Revision: 115756

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115756
Log:
gcc/
        PR middle-end/28403
        * optabs.c (expand_doubleword_shift): Wrap the call to
        do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP.

gcc/testsuite/
        PR middle-end/28403
        * gcc.c-torture/execute/pr28403.c: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/execute/pr28403.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/optabs.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1 Regression] Missed argument pop after doubleword shift
  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
                   ` (6 preceding siblings ...)
  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
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-26 13:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rsandifo at gcc dot gnu dot org  2006-07-26 13:35 -------
Subject: Bug 28403

Author: rsandifo
Date: Wed Jul 26 13:35:34 2006
New Revision: 115758

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115758
Log:
gcc/
        PR middle-end/28403
        * optabs.c (expand_doubleword_shift): Wrap the call to
        do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP.

gcc/testsuite/
        PR middle-end/28403
        * gcc.c-torture/execute/pr28403.c: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/gcc.c-torture/execute/pr28403.c
Modified:
    branches/gcc-4_0-branch/gcc/ChangeLog
    branches/gcc-4_0-branch/gcc/optabs.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28403


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

* [Bug middle-end/28403] [4.0/4.1 Regression] Missed argument pop after doubleword shift
  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
                   ` (7 preceding siblings ...)
  2006-07-26 13:35 ` rsandifo at gcc dot gnu dot org
@ 2006-07-26 13:39 ` rsandifo at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at gcc dot gnu dot org @ 2006-07-26 13:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rsandifo at gcc dot gnu dot org  2006-07-26 13:39 -------
Patch applied to branches


-- 

rsandifo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|4.0.4 4.1.2                 |
      Known to work|3.4.4 4.2.0                 |3.4.4 4.0.4 4.1.2 4.2.0
         Resolution|                            |FIXED


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).