public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/8794: optimization improperly eliminates certain expressions
Date: Tue, 03 Dec 2002 08:26:00 -0000	[thread overview]
Message-ID: <20021203162602.21623.qmail@sources.redhat.com> (raw)

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

From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: pageexec@freemail.hu
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org
Subject: Re: optimization/8794: optimization improperly eliminates certain expressions
Date: Tue, 3 Dec 2002 17:24:08 +0100

 On Tue, Dec 03, 2002 at 02:29:05PM -0000, pageexec@freemail.hu wrote:
 > >Number:         8794
 > >Category:       optimization
 > >Synopsis:       optimization improperly eliminates certain expressions
 > >Release:        gcc 3.2.1
 
 Confirmed on i686. The orignal example works ok on sparc but a slightly
 simplified example produces bad code on sparc with 3.2.1 and 3.3:
 
 ------------- cut ------------------
 unsigned int addr;
 void f (void)
 {
 	addr = (1024 & (1024UL - (addr & 1023UL)));
 }
 ------------- cut ------------------
 
 Is compiled into:
 
 ------------- cut ------------------
 	.file	"8794.c"
 	.section	".text"
 	.align 4
 	.global f
 	.type	f,#function
 	.proc	020
 f:
 	!#PROLOGUE# 0
 	!#PROLOGUE# 1
 	mov	1024, %o1
 	sethi	%hi(addr), %o0
 	retl
 	st	%o1, [%o0+%lo(addr)]
 .LLfe1:
 	.size	f,.LLfe1-f
 	.common	addr,4,4
 	.ident	"GCC: (GNU) 3.2.1 20021111 (prerelease)"
 ------------- cut ------------------
 
 Which is clearly wrong. The necessary instructions are elimiated by
 between 8794.c.15.life and 8794.c.16.combine.
 
       regards   Christian
 
 -- 
 THAT'S ALL FOLKS!


             reply	other threads:[~2002-12-03 16:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-03  8:26 Christian Ehrhardt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-03  6:36 pageexec

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=20021203162602.21623.qmail@sources.redhat.com \
    --to=ehrhardt@mathematik.uni-ulm.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: link
Be 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).