[PATCH] Fix PR middle-end/26306

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Mon Nov 6 18:53:00 GMT 2006


> My beef with AGGREGATE_TYPE_P is that I can't see any reason that an 
> SImode "struct S { int i; }" should be treated differently from plain 
> "int i".  Even accepting the arguments about hardware registers, etc., I 
> would still have a hard time explaining why the struct should behave 
> differently from the scalar.

But that's not the only way to make an SImode struct!  What about a struct
of four chars with an alignment of 32 specified.  That's also often SImode.
Should a volatile reference to it produce one SImode reference or four
QImode references?  More importantly, do we really want to be in the business
of answering that question?

> Even under that argument, AGGREGATE_TYPE_P still isn't the right thing, 
> since, IIUC, what we tested before was BLKmode.  Shouldn't the test be 
> using that instead, if our goal is to replicate the old semantics?

We did test BLKmode previously and I agree that would be the ideal test for
that reason even given my comment above.  The question is whether it would be
enough to fix the ICE in question, specifically if there's a GIMPLE-level
distinction between aggregates and scalars.  Eric: does just a BLKmode test
work?



More information about the Gcc-patches mailing list