gimplify_parameters

Richard Henderson rth@redhat.com
Tue Dec 21 19:19:00 GMT 2004


On Tue, Dec 21, 2004 at 01:05:38PM -0500, Richard Kenner wrote:
>     Then explain the failure in PR 18067.
> 
> Well it doesn't fail now, so I can't look at it...

Of course you can.  Revert the patch that was applied.  Duh.

> The problem is that we have a variably-sized type and so have gimplified
> each of the variable parts of the type into variables.  Some of those start
> out being used in the code, so they are taken into SSA form.
> 
> But then they are found to be dead, so it gets left as an SSA_NAME.

I think you'll find that explanation is false.

If it were true that we were gimplifying the size to a variable,
then the type size and dimensions should be a VAR_DECL.  We don't
modify VAR_DECLs in place, we substitute them in complete statements.
So how would an SSA_NAME replace a VAR_DECL in a TYPE_SIZE?

If it were true that we were gimplifying the size to a variable,
then how would the dimension wind up as

	<nop_expr <type unsigned int>
	  <minus_expr
	    <mult_expr <ssa_name j 3> <ssa_name j 3>>
	    <integer_cst 1>>>

But you can debug this yourself to verify.

There are really only two reasonable stances on this.

  (1) You are correct and sharing should be allowed, in which case the
      patch for 18067 is papering over some other problem.

  (2) You are wrong and sharing cannot be allowed, in which case you
      are wrong about gimplification of types.


r~



More information about the Gcc mailing list