public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel
@ 2005-02-24 19:58 jakub at gcc dot gnu dot org
  2005-02-24 21:21 ` [Bug target/20196] " jakub at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-24 19:58 UTC (permalink / raw)
  To: gcc-bugs

/* Origin: Mikael Pettersson <mikpe@csd.uu.se> and the Linux kernel.  */

extern void abort (void);
unsigned long a = 0xc0000000, b = 0xd0000000;
unsigned long c = 0xc01bb958, d = 0xc0264000;
unsigned long e = 0xc0288000, f = 0xc02d4378;

void
foo (int x, int y, int z)
{
  if (x != 245 || y != 36 || z != 444)
    abort ();
}

int
main (void)
{
  unsigned long g;
  int h = 0, i = 0, j = 0;

  for (g = a; g < b; g += 0x1000)
    if (g < c)
      h++;
    else if (g >= d && g < e)
      j++;
    else if (g < f)
      i++;
  foo (i, j, h);
  return 0;
}

is miscompiled on ppc at -O{1,2,3,s} -m32.  Works with -O0 or -m64 at any
optimization level.

-- 
           Summary: Miscompilation of mem_init in 32-bit ppc linux kernel
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: jakub at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: powerpc64-redhat-linux


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


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

* [Bug target/20196] Miscompilation of mem_init in 32-bit ppc linux kernel
  2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
@ 2005-02-24 21:21 ` jakub at gcc dot gnu dot org
  2005-02-24 21:28 ` [Bug target/20196] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-24 21:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-24 17:03 -------
The problem is that with the
http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00672.html
patch the earlyclobbers got lost.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-24 17:03:04
               date|                            |


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


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

* [Bug target/20196] [4.0 Regression] Miscompilation of mem_init in 32-bit ppc linux kernel
  2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
  2005-02-24 21:21 ` [Bug target/20196] " jakub at gcc dot gnu dot org
@ 2005-02-24 21:28 ` pinskia at gcc dot gnu dot org
  2005-02-24 21:48 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-24 21:28 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |wrong-code
            Summary|Miscompilation of mem_init  |[4.0 Regression]
                   |in 32-bit ppc linux kernel  |Miscompilation of mem_init
                   |                            |in 32-bit ppc linux kernel
   Target Milestone|---                         |4.0.0


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


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

* [Bug target/20196] [4.0 Regression] Miscompilation of mem_init in 32-bit ppc linux kernel
  2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
  2005-02-24 21:21 ` [Bug target/20196] " jakub at gcc dot gnu dot org
  2005-02-24 21:28 ` [Bug target/20196] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-02-24 21:48 ` pinskia at gcc dot gnu dot org
  2005-02-24 22:26 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-24 21:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-24 17:11 -------
*** Bug 20194 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikpe at csd dot uu dot se


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


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

* [Bug target/20196] [4.0 Regression] Miscompilation of mem_init in 32-bit ppc linux kernel
  2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-02-24 21:48 ` pinskia at gcc dot gnu dot org
@ 2005-02-24 22:26 ` jakub at gcc dot gnu dot org
  2005-02-25  1:50 ` cvs-commit at gcc dot gnu dot org
  2005-02-25  1:51 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-24 22:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-24 17:54 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01521.html>

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug target/20196] [4.0 Regression] Miscompilation of mem_init in 32-bit ppc linux kernel
  2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-02-24 22:26 ` jakub at gcc dot gnu dot org
@ 2005-02-25  1:50 ` cvs-commit at gcc dot gnu dot org
  2005-02-25  1:51 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-25  1:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-24 21:23 -------
Subject: Bug 20196

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2005-02-24 21:23:15

Modified files:
	gcc            : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/config/rs6000: rs6000.md 
Added files:
	gcc/testsuite/gcc.c-torture/execute: 20050224-1.c 

Log message:
	PR target/20196
	* config/rs6000/rs6000.md (LTU, GTU sCC splitters): Add earlyclobber,
	allow splitting only if operands 0 and 3 don't overlap.
	
	* gcc.c-torture/execute/20050224-1.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7582&r2=2.7583
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5083&r2=1.5084
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&r1=1.348&r2=1.349
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/20050224-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug target/20196] [4.0 Regression] Miscompilation of mem_init in 32-bit ppc linux kernel
  2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-02-25  1:50 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-25  1:51 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-25  1:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-24 21:24 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-02-24 21:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 19:58 [Bug target/20196] New: Miscompilation of mem_init in 32-bit ppc linux kernel jakub at gcc dot gnu dot org
2005-02-24 21:21 ` [Bug target/20196] " jakub at gcc dot gnu dot org
2005-02-24 21:28 ` [Bug target/20196] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-24 21:48 ` pinskia at gcc dot gnu dot org
2005-02-24 22:26 ` jakub at gcc dot gnu dot org
2005-02-25  1:50 ` cvs-commit at gcc dot gnu dot org
2005-02-25  1:51 ` jakub 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).