public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Carsten Haustein <chaus@rz.uni-potsdam.de> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/8746: gcc-3 miscompiles Linux kernel ppa driver on x86 Date: Fri, 28 Feb 2003 16:36:00 -0000 [thread overview] Message-ID: <20030228163600.5906.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/8746; it has been noted by GNATS. From: Carsten Haustein <chaus@rz.uni-potsdam.de> To: <ebotcazou@gcc.gnu.org>, <chaus@rz.uni-potsdam.de>, <gcc-bugs@gcc.gnu.org>, <gcc-prs@gcc.gnu.org>, <nobody@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org> Cc: Subject: Re: optimization/8746: gcc-3 miscompiles Linux kernel ppa driver on x86 Date: Fri, 28 Feb 2003 17:26:26 +0100 (MET) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-1804928587-1046449586=:26411 Content-Type: TEXT/PLAIN; charset=US-ASCII Compile the testcase with: gcc -O -march=i{345}86 -o check check.c Run the test with: check <number>, where <number> is an integer between 0 and 255 (without angle brackets). The program will "prove" that any number in this range is less than 128, which is obviously wrong. Some notes: 1. It is important to select one of the shown -march arguments. Only code generated for i{345}86 and K6 family is affected. Code generated for i686 family, Pentium 4 and Athlon family works fine. This code uses the al register for applying the bit-mask instead of eax and a different representation of the immediate 0xf0. 2. There must not be a statement between the "and" operation and the if-expression. Otherwise code is generated for both the "and" operation and for testing the MSB, since the extra statement may affect the cpu-flags. Such code works fine. 3. The value assigned to r must be examined in one or the other way. Otherwise code for the "and" operation will be omitted and code for testing the MSB will be generated, which leads to working code too. -- Carsten Haustein ---559023410-1804928587-1046449586=:26411 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="check.c" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.GSO.4.30.0302281726260.26411@persius.rz.uni-potsdam.de> Content-Description: Content-Disposition: attachment; filename="check.c" I2luY2x1ZGUgPHN0ZGlvLmg+DQppbnQgbWFpbihpbnQgYXJnYywgY2hhciAq YXJndltdKSB7DQogICB1bnNpZ25lZCBjaGFyIHIgPSAoYXRvaShhcmd2WzFd KSkgJiAweGYwOw0KICAgaWYgKCEociAmIDB4ODApKSBwcmludGYoIiV1IDwg MTI4XG4iLCByKTsNCiAgICAgICAgICAgICAgIGVsc2UgcHJpbnRmKCIldSA+ PSAxMjhcbiIsIHIpOw0KICAgcmV0dXJuIDA7DQp9DQo= ---559023410-1804928587-1046449586=:26411--
next reply other threads:[~2003-02-28 16:36 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-02-28 16:36 Carsten Haustein [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-02-18 13:51 ebotcazou
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=20030228163600.5906.qmail@sources.redhat.com \ --to=chaus@rz.uni-potsdam.de \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).