public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RFC: allowing fold to change location of args (PR/41451)
@ 2009-10-26 16:13 Aldy Hernandez
  2009-10-26 16:40 ` Richard Guenther
  0 siblings, 1 reply; 10+ messages in thread
From: Aldy Hernandez @ 2009-10-26 16:13 UTC (permalink / raw)
  To: gcc

Hi folks.

In this PR the problem is that a call to fold_build2_loc() returns one
of the original arguments unchanged.  In the code below we take this
result and change its location before returning it.

      tem = fold_build2_loc (loc, code, type,
                             fold_convert_loc (loc, TREE_TYPE (op0),
                                               TREE_OPERAND (arg0, 1)), op1);
      protected_set_expr_location (tem, loc);

When --enable-checking=fold, fold verifies that none of the arguments
changed, which in this case it obviously does.

Would be ok to allow a TREE_EXP's location to change within fold?  That is,
add locus (for TREE_EXP's) to the list of allowed changeable fields in
fold_checksum_tree()?

Aldy

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-10-27 20:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-26 16:13 RFC: allowing fold to change location of args (PR/41451) Aldy Hernandez
2009-10-26 16:40 ` Richard Guenther
2009-10-26 16:41   ` Aldy Hernandez
2009-10-26 17:29     ` Andrew Pinski
2009-10-27 20:19       ` Jakub Jelinek
2009-10-26 17:31     ` Richard Guenther
2009-10-26 19:57       ` Aldy Hernandez
2009-10-26 21:44         ` Richard Guenther
2009-10-26 22:10           ` Aldy Hernandez
2009-10-26 23:07             ` Richard Guenther

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