public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15434] New: -mcpu=601 -O2 optimization problems
@ 2004-05-14 19:03 stefaan dot simoens at tiscali dot be
  2004-05-14 19:14 ` [Bug c/15434] " stefaan dot simoens at tiscali dot be
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-14 19:03 UTC (permalink / raw)
  To: gcc-bugs

When I compile pcretest.c with the optimization-options -mcpu=601 -O2, I get a 
bus error on exectution.
Compiled with -mcpu=601 -O2 -fno-strength-reduce, -mcpu=601 -fstrenght-reduce, 
or -O2 (without the -mcpu=601) creates a good executable.

-- 
           Summary: -mcpu=601 -O2 optimization problems
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stefaan dot simoens at tiscali dot be
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: ppc-unknown-linux


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
@ 2004-05-14 19:14 ` stefaan dot simoens at tiscali dot be
  2004-05-25 15:11 ` stefaan dot simoens at tiscali dot be
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-14 19:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-14 14:07 -------
Created an attachment (id=6285)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6285&action=view)
Precompiled pcretest.c


-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
  2004-05-14 19:14 ` [Bug c/15434] " stefaan dot simoens at tiscali dot be
@ 2004-05-25 15:11 ` stefaan dot simoens at tiscali dot be
  2004-05-25 15:14 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-25 15:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-24 19:41 -------
Further investigation showed that optimization errors also occur in other 
files.

/bin/ps compiled with -mcpu=601 -O2 gave me a broken executable. I tried to 
pin-point the problem and I found some very strange things:
* /bin/ps compiled with -mcpu=601 -O1 was broken, too
* /bin/ps compiled with -mcpu=601 works fine
* /bin/ps compiled with -mcpu=601 -fdefer-pop -fmerge-constants -fthread-
jumps -floop-optimize -fif-conversion -fif-conversion2 -fguess-branch-
probability -fcprop-registers -fomit-frame-pointer works fine, too
* (adding -fdelayed-branch to the latter gives a warning and a working 
executable)

According to the man-page, all those f-options should give the same 
functionality as -O1 does. Compiling whith -fverbose-asm confirms this (equal 
options enabled), but the assembler code differs a lot.

I'm going to look if I can find ONE (1) file where 'wrong-code' gets 
generated. I'm curious, however, why there is different assembler code beween -
O1 and the -f-options ... Has this anything to do with PR7257 ?

-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
  2004-05-14 19:14 ` [Bug c/15434] " stefaan dot simoens at tiscali dot be
  2004-05-25 15:11 ` stefaan dot simoens at tiscali dot be
@ 2004-05-25 15:14 ` pinskia at gcc dot gnu dot org
  2004-05-25 15:50 ` stefaan dot simoens at tiscali dot be
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-25 15:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-24 19:43 -------
-O1 turns on more than just those flags.

-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
                   ` (2 preceding siblings ...)
  2004-05-25 15:14 ` pinskia at gcc dot gnu dot org
@ 2004-05-25 15:50 ` stefaan dot simoens at tiscali dot be
  2004-05-25 17:07 ` stefaan dot simoens at tiscali dot be
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-25 15:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-24 20:49 -------
Okay, but which other flags? Those were the flags I found in the man-page. 

-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
                   ` (3 preceding siblings ...)
  2004-05-25 15:50 ` stefaan dot simoens at tiscali dot be
@ 2004-05-25 17:07 ` stefaan dot simoens at tiscali dot be
  2004-05-25 18:42 ` stefaan dot simoens at tiscali dot be
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-25 17:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-24 21:31 -------
Created an attachment (id=6374)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6374&action=view)
Preprocessed readproc.c

readproc.c is badly compiled when I use -O1 instead of the optimization flags.
(both using -mcpu=601, gcc 3.4.0)

The .s - files differ a lot

-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
                   ` (4 preceding siblings ...)
  2004-05-25 17:07 ` stefaan dot simoens at tiscali dot be
@ 2004-05-25 18:42 ` stefaan dot simoens at tiscali dot be
  2004-05-27 19:01 ` stefaan dot simoens at tiscali dot be
  2004-05-27 20:22 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-25 18:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-24 23:29 -------
status2proc gets badly compiled

-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
                   ` (5 preceding siblings ...)
  2004-05-25 18:42 ` stefaan dot simoens at tiscali dot be
@ 2004-05-27 19:01 ` stefaan dot simoens at tiscali dot be
  2004-05-27 20:22 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: stefaan dot simoens at tiscali dot be @ 2004-05-27 19:01 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From stefaan dot simoens at tiscali dot be  2004-05-27 08:55 -------
Correction of previous message:
It's the ' stswi ' instruction that doesn't give the excpected results.
(I get a 'Bus error' after execution of stswi)

It doesn't happen always (most of the time, it executes just fine); but it 
always happens in the same point of the program:
eg: in readproc.i it always occurs in 
     case_SigBlk:
->       memcpy(P->blocked, S, 16);
         P->blocked[16] = '\0';

and it happens only when I run 'ps axf', in the 44th invocation of status2proc

When I change 'stswi 5,9,16'
with 'stw 5,0(9)
      stw 6,4(9)
      stw 7,8(9)
      stw 8,12(9)' (which would be equivalent, I think), I don't get the error 
at all...

What could be wrong?

-- 


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


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

* [Bug c/15434] -mcpu=601 -O2 optimization problems
  2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
                   ` (6 preceding siblings ...)
  2004-05-27 19:01 ` stefaan dot simoens at tiscali dot be
@ 2004-05-27 20:22 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-27 20:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-27 11:22 -------
It is a bug in the kernel when the source is unaligned (aka there is an unaligned trap), report this to the 
PPC Linux kernel people. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2004-05-27 11:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-14 19:03 [Bug c/15434] New: -mcpu=601 -O2 optimization problems stefaan dot simoens at tiscali dot be
2004-05-14 19:14 ` [Bug c/15434] " stefaan dot simoens at tiscali dot be
2004-05-25 15:11 ` stefaan dot simoens at tiscali dot be
2004-05-25 15:14 ` pinskia at gcc dot gnu dot org
2004-05-25 15:50 ` stefaan dot simoens at tiscali dot be
2004-05-25 17:07 ` stefaan dot simoens at tiscali dot be
2004-05-25 18:42 ` stefaan dot simoens at tiscali dot be
2004-05-27 19:01 ` stefaan dot simoens at tiscali dot be
2004-05-27 20:22 ` pinskia 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).