[PATCH] rs6000: ICE when using an MMA type as a function param

Segher Boessenkool segher@kernel.crashing.org
Wed Aug 12 02:46:04 GMT 2020


On Tue, Aug 11, 2020 at 09:07:40PM -0500, Peter Bergner wrote:
> >> +  static struct function *fn = NULL;
> >> +
> >> +  /* We do not allow MMA types being used as return values.  Only report
> >> +     the invalid return value usage the first time we encounter it.  */
> >> +  if (for_return
> >> +      && fn != cfun
> >> +      && (mode == POImode || mode == PXImode))
> > 
> > "fn" is always zero here.
> > 
> >> +    {
> >> +      fn = cfun;
> > 
> > And what you set here is unused.
> 
> It's a static local variable, so how is it always zero and unused?

Oh, trickiness with it being called a second time.  Ouch!

This needs a H U G E comment then...  Or better, get rid of that?


Segher


More information about the Gcc-patches mailing list