public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "law at redhat dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/22321] [4.0/4.1 Regression] &volatile_var != &volatile_var is always true
Date: Sat, 09 Jul 2005 22:59:00 -0000	[thread overview]
Message-ID: <20050709215827.11389.qmail@sourceware.org> (raw)
In-Reply-To: <20050706093241.22321.paul.woegerer@nsc.com>


------- Additional Comments From law at redhat dot com  2005-07-09 21:58 -------
Subject: Re:  [4.0/4.1 Regression] &volatile_var !=
	&volatile_var is always true

On Sat, 2005-07-09 at 17:58 +0000, pinskia at gcc dot gnu dot org wrote:
> ------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-09 17:58 -------
> This fails also at -O0:
> volatile int x;
> 
> int main()
> {
>   if (&x != &x)
>    abort ();
>   return 0;
> }
> 
> And this testcase worked in 3.4.x too so this is defintely a fold bug.
It's a bug in how the folder uses operand_equal_p.  operand_equal_p is
not equivalent to a C equality test, but fold_binary is using it to
evaluate a C equality test and thus getting the wrong results.

I've got a patch ready to go, but won't get it checked in until Monday
or possibly even Tuesday depending on some personal commitments.

jeff




-- 


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


  parent reply	other threads:[~2005-07-09 21:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-06  9:32 [Bug c++/22321] New: [4.1 Regression] Wrong code with SSA dominator optimizations paul dot woegerer at nsc dot com
2005-07-06  9:39 ` [Bug c++/22321] " paul dot woegerer at nsc dot com
2005-07-06  9:54 ` falk at debian dot org
2005-07-06 10:55 ` paul dot woegerer at nsc dot com
2005-07-06 12:11 ` falk at debian dot org
2005-07-06 13:10 ` pinskia at gcc dot gnu dot org
2005-07-06 13:14 ` [Bug c++/22321] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-07-06 13:31 ` [Bug tree-optimization/22321] " pinskia at gcc dot gnu dot org
2005-07-06 13:38 ` paul dot woegerer at nsc dot com
2005-07-06 13:41 ` pinskia at gcc dot gnu dot org
2005-07-06 13:48 ` paul dot woegerer at nsc dot com
2005-07-06 17:04 ` mmitchel at gcc dot gnu dot org
2005-07-07  7:34 ` law at redhat dot com
2005-07-09 18:01 ` [Bug middle-end/22321] [4.0/4.1 Regression] &volatile_var != &volatile_var is always true pinskia at gcc dot gnu dot org
2005-07-09 22:59 ` law at redhat dot com [this message]
2005-07-13 17:38 ` pinskia at gcc dot gnu dot org

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=20050709215827.11389.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).