public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: marco@technoboredom.net To: gcc-gnats@gcc.gnu.org Subject: objc/7035: Wrong code in byte-swapping routine generated Date: Fri, 14 Jun 2002 21:56:00 -0000 [thread overview] Message-ID: <20020614233230.3631.qmail@sources.redhat.com> (raw) >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==
next reply other threads:[~2002-06-14 23:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-14 21:56 marco [this message] 2002-06-16 8:26 Nicola Pero 2002-07-02 6:59 sayle
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020614233230.3631.qmail@sources.redhat.com \ --to=marco@technoboredom.net \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).