public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zhangjie at magima dot com dot cn" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/16225] [3.5 regression] ICE: verify_ssa failed.
Date: Fri, 30 Jul 2004 06:50:00 -0000	[thread overview]
Message-ID: <20040730065038.13401.qmail@sourceware.org> (raw)
In-Reply-To: <20040627065304.16225.debian-gcc@lists.debian.org>


------- Additional Comments From zhangjie at magima dot com dot cn  2004-07-30 06:50 -------
I believe the bug is caused by a problem in alias analysis. At the end of
alias1, TMT.9 might alias x and bits:

    Variable: TMT.9, UID 13, is global, call clobbered, may aliases: { x bits }

and was call-clobbered. However, add_may_alias () failed to set x call-clobbered:

    Variable: x, UID 1, is an alias tag, default def: x_9

This inconsistency resulted in the bug. At the one hand, add_stmt_operand ()
added x as a V_MAY_DEF when renaming variables at the end of alias1 because x
wass an alias of TMT.9 and TMT.9 was call-clobbered. At the other hand, tailr1
pass failed to recognize that x was an alias of a call-clobbered variable. It
was executed.

This patch will make the call-clobbered information consistent and fix this bug.


2004-07-30  Jie Zhang  <zhangjie@magima.com.cn>

	PR tree-optimization/16225
	* tree-ssa-alias.c (add_may_alias): If 'alias' is call-clobbered, so
	are 'var' and its aliases.

*** tree-ssa-alias.c.old	2004-07-24 09:05:44.000000000 +0800
--- tree-ssa-alias.c	2004-07-30 13:13:06.000000000 +0800
*************** add_may_alias (tree var, tree alias)
*** 1678,1686 ****
    if (is_call_clobbered (var))
      mark_call_clobbered (alias);
  
!   /* Likewise.  If ALIAS is call-clobbered, so is VAR.  */
    else if (is_call_clobbered (alias))
!     mark_call_clobbered (var);
  
    VARRAY_PUSH_TREE (v_ann->may_aliases, alias);
    a_ann->is_alias_tag = 1;
--- 1678,1690 ----
    if (is_call_clobbered (var))
      mark_call_clobbered (alias);
  
!   /* Likewise.  If ALIAS is call-clobbered, so are VAR and its aliases.  */
    else if (is_call_clobbered (alias))
!     {
!       mark_call_clobbered (var);
!       for (i = 0; i < VARRAY_ACTIVE_SIZE (v_ann->may_aliases); i++)
!         mark_call_clobbered (VARRAY_TREE (v_ann->may_aliases, i));
!     }
  
    VARRAY_PUSH_TREE (v_ann->may_aliases, alias);
    a_ann->is_alias_tag = 1;


-- 


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


  parent reply	other threads:[~2004-07-30  6:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-27  6:53 [Bug tree-optimization/16225] New: " debian-gcc at lists dot debian dot org
2004-06-27  8:11 ` [Bug tree-optimization/16225] " debian-gcc at lists dot debian dot org
2004-06-27  8:25 ` pinskia at gcc dot gnu dot org
2004-06-27  9:37 ` pinskia at gcc dot gnu dot org
2004-07-20  8:52 ` pinskia at gcc dot gnu dot org
2004-07-20 16:17 ` rakdver at gcc dot gnu dot org
2004-07-30  6:50 ` zhangjie at magima dot com dot cn [this message]
2004-07-30 17:28 ` giovannibajo at libero dot it
2004-08-01 16:09 ` zhangjie at magima dot com dot cn
2004-08-01 21:33 ` giovannibajo at libero dot it
2004-08-11 15:59 ` dnovillo at gcc dot gnu dot org
2004-08-11 16:01 ` dnovillo at gcc dot gnu dot org
2004-08-12 17:34 ` dnovillo at gcc dot gnu dot org
2004-08-12 18:35 ` dnovillo at redhat dot com

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