This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fold_stmt returns non-gimple


On Wed, 27 Apr 2005, Diego Novillo wrote:

> On Wed, Apr 27, 2005 at 04:34:46PM +0200, Richard Guenther wrote:
> >
> > fold_stmt (and its helper set_rhs) happily accept non-gimple
> > from fold of the form
> >
> >  x = ADDR_EXPR (ARRAY_REF (a, NOP_EXPR(unsigned int, i)));
> >
> Where is this NOP_EXPR coming from?  Looks like a bug upstream
> from fold_stmt.  Is this generated by an optimizer?

This is generated by fold.  The original tree looks like

  char *a, *x;
  int i;
  x = &a[0] + (char *)i;

and get's folded to

  x = &a[(unsigned int)i];

that unsigned is because of pointers are unsigned.

>
> Aren't we failing a verification test with this?  We should be.

Sure - we'll ICE in verify_stmts for this.

Richard.

> > 	* tree-ssa-propagate.c (set_rhs): Check operand of
> > 	ADDR_EXPR for gimpliness, too.
> >
> Regardless of the upstream problem, this is OK.
>
> Hmm, do we really want to make GIMPLE and adjective too?

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]