public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* objc/7035: Wrong code in byte-swapping routine generated
@ 2002-06-14 21:56 marco
  0 siblings, 0 replies; 3+ messages in thread
From: marco @ 2002-06-14 21:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7035
>Category:       objc
>Synopsis:       Wrong code in byte-swapping routine generated
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 14 16:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     marco@technoboredom.net
>Release:        unknown-1.0
>Organization:
>Environment:
marco@gontscharow:~ > uname -a
Linux gontscharow 2.4.4-4GB #1 Sat Jun 23 05:26:59 GMT 2001 i686 unknown

marco@gontscharow:~ > gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc-3.1/configure --prefix=/usr --enable-shared --enable-threads=pthreads --enable-languages=ada,c,c++,f77,java,objc : (reconfigured) ../gcc-3.1/configure --prefix=/usr --enable-shared --enable-threads=pthreads --enable-languages=c,c++,f77,java,objc : (reconfigured) ../gcc-3.1/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,java,objc
Thread model: posix
gcc version 3.1
>Description:
The Objective-C compiler generates wrong code in GNUstep's byteswapping-routines with the -O2 switch. 

This is most likely a duplicate to #6834, however I have a shorter testcase (23 lines) here. 
>How-To-Repeat:
marco@gontscharow:~/tmp > gcc -O2 bla.m -o bla
marco@gontscharow:~/tmp > ./bla
GSU(0)=191
marco@gontscharow:~/tmp > gcc bla.m -o bla
marco@gontscharow:~/tmp > ./bla
GSU(0)=0

-- 
The result should be 0 (=byteswap of 0). Compiling this code as a C-programm also returns the correct value, no matter which optimization was selected.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bla.m"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bla.m"

I2luY2x1ZGUgPHN0ZGlvLmg+Cgp0eXBlZGVmIHVuc2lnbmVkIGludCBnc3UzMjsgCnR5cGVkZWYg
dW5zaWduZWQgY2hhciBnc3U4OyAKc3RhdGljIGlubGluZSBnc3UzMgpHU1N3YXBJMzIoZ3N1MzIg
aW4pCnsKICB1bmlvbiBzd2FwIHsKICAgIGdzdTMyCW51bTsKICAgIGdzdTgJYnl0WzRdOwogIH0g
ZHN0OwogIHVuaW9uIHN3YXAJKnNyYyA9ICh1bmlvbiBzd2FwKikmaW47CiAgZHN0LmJ5dFswXSA9
IHNyYy0+Ynl0WzNdOwogIGRzdC5ieXRbMV0gPSBzcmMtPmJ5dFsyXTsKICBkc3QuYnl0WzJdID0g
c3JjLT5ieXRbMV07CiAgZHN0LmJ5dFszXSA9IHNyYy0+Ynl0WzBdOwogIHJldHVybiBkc3QubnVt
Owp9CgppbnQgbWFpbigpIAp7CglwcmludGYoIkdTVSgwKT0lZFxuIixHU1N3YXBJMzIoMCkpOwp9
Cg==


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

* Re: objc/7035: Wrong code in byte-swapping routine generated
@ 2002-07-02  6:59 sayle
  0 siblings, 0 replies; 3+ messages in thread
From: sayle @ 2002-07-02  6:59 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, marco, nobody

Synopsis: Wrong code in byte-swapping routine generated

State-Changed-From-To: open->closed
State-Changed-By: sayle
State-Changed-When: Tue Jul  2 06:59:53 2002
State-Changed-Why:
    See Nicola Pero's post
    http://gcc.gnu.org/ml/gcc/2002-06/msg01712.html

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7035


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

* Re: objc/7035: Wrong code in byte-swapping routine generated
@ 2002-06-16  8:26 Nicola Pero
  0 siblings, 0 replies; 3+ messages in thread
From: Nicola Pero @ 2002-06-16  8:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR objc/7035; it has been noted by GNATS.

From: Nicola Pero <nicola@brainstorm.co.uk>
To: marco@technoboredom.net
Cc: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, gcc-prs@gcc.gnu.org,
   gcc-bugs@gcc.gnu.org
Subject: Re: objc/7035: Wrong code in byte-swapping routine generated
Date: Sun, 16 Jun 2002 15:06:46 +0100 (BST)

 > >Number:         7035
 > >Category:       objc
 > >Synopsis:       Wrong code in byte-swapping routine generated
 >
 > This is most likely a duplicate to #6834, however I have a shorter testcase 
 > (23 lines) here. 
 
 Thanks - as far as I know, #6834 has been fixed on CVS (and should be
 closed on GNATS).
 
 I tried your new shorter testcase with gcc 3.1 from CVS (not the latest
 CVS, but a very recent one) and I always get
 
 GSU(0)=0
 
 So I think this bug report can be closed too.
 
 Thanks for contributing anyway.
 


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

end of thread, other threads:[~2002-07-02 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 21:56 objc/7035: Wrong code in byte-swapping routine generated marco
2002-06-16  8:26 Nicola Pero
2002-07-02  6:59 sayle

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