From: Jan Hubicka <hubicka@ucw.cz>
To: Richard Guenther <rguenther@suse.de>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc-patches@gcc.gnu.org
Subject: Re: PR middle-end/44813 (ICE in Mozilla build in ptr_deref_may_alias_decl_p)
Date: Mon, 05 Jul 2010 10:28:00 -0000 [thread overview]
Message-ID: <20100705102818.GD29130@kam.mff.cuni.cz> (raw)
In-Reply-To: <alpine.LNX.2.00.1007051133160.1429@zhemvz.fhfr.qr>
> > Index: tree-inline.c
> > ===================================================================
> > --- tree-inline.c (revision 161774)
> > +++ tree-inline.c (working copy)
> > @@ -1236,7 +1237,11 @@ remap_gimple_stmt (gimple stmt, copy_bod
> > If RETVAL is just the result decl, the result decl has
> > already been set (e.g. a recent "foo (&result_decl, ...)");
> > just toss the entire GIMPLE_RETURN. */
> > - if (retval && TREE_CODE (retval) != RESULT_DECL)
> > + if (retval
> > + && (TREE_CODE (retval) != RESULT_DECL
> > + && (TREE_CODE (retval) != SSA_NAME
> > + || !SSA_NAME_IS_DEFAULT_DEF (retval)
> > + || TREE_CODE (SSA_NAME_VAR (retval)) != RESULT_DECL)))
>
> We should never see a defintion of a RESULT_DECL SSA name for
> DECL_BY_REFERENCE RESULT_DECLs (that would
> be a bug - we should add verification to the SSA verifier, can you
> do add that?). So the || !SSA_NAME_IS_DEFAULT_DEF (retval) can be
> dropped here.
OK. I just wanted to play safe.
>
> This patch is ok with that change together with an addition to the
> SSA verifier.
>
> > {
> > copy = gimple_build_assign (id->retvar, retval);
> > /* id->retvar is already substituted. Skip it on later remapping. */
> > Index: tree-ssa-structalias.c
> > ===================================================================
> > --- tree-ssa-structalias.c (revision 161774)
> > +++ tree-ssa-structalias.c (working copy)
> > @@ -5751,7 +5751,8 @@ find_what_p_points_to (tree p)
> > /* For parameters, get at the points-to set for the actual parm
> > decl. */
> > if (TREE_CODE (p) == SSA_NAME
> > - && TREE_CODE (SSA_NAME_VAR (p)) == PARM_DECL
> > + && (TREE_CODE (SSA_NAME_VAR (p)) == PARM_DECL
> > + || TREE_CODE (SSA_NAME_VAR (p)) == RESULT_DECL)
> > && SSA_NAME_IS_DEFAULT_DEF (p))
> > lookup_p = SSA_NAME_VAR (p);
>
> That doesn't look correct on its own. In fact get_constraint_for_ssa_var
> needs a similar adjustment, likewise for consistency (probably doesn't
> happen here though) get_fi_for_callee.
Will try, thanks!
Honza
next prev parent reply other threads:[~2010-07-05 10:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-04 22:42 Jan Hubicka
2010-07-05 9:43 ` Richard Guenther
2010-07-05 10:28 ` Jan Hubicka [this message]
2010-07-05 16:18 ` Jan Hubicka
2010-07-06 9:20 ` Richard Guenther
2011-01-16 20:09 ` H.J. Lu
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=20100705102818.GD29130@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).