https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106736

--- Comment #7 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #5)
> (In reply to Kewen Lin from comment #4)
> > Thanks for the comments! One patch guarding these types is attached, it can
> > fix the ICE.
> 
> That won't work, because that's what we used to do! :-)   In PR96125, the
> test case there is compiled with -mcpu=power8, but uses a pragma/target
> attribute to compile a function with -mcpu=power10/-mmma.  The problem is
> that built-in and target type initialization is only done once, so we can't
> tell from the explicit options being used, whether there will be a function
> later that uses a pragma/target attribute, so we have to assume there will
> be.
> 

aha, good point! Yeah, then the patch is wrong.

> Therefore, we have to always initialize them as we do now, but somehow later
> catch any illegal usage.  Ideas on how to do that welcome! :-)

> ...and we actually do catch the illegal usage, but how we can fail
> gracefully instead of an ICE is what we need to figure out.  Maybe similar
> to your PR103353, we just need the mov[xo]o patterns to succeed temporarily
> so we can fail gracefully later?

Good idea! Btw if changing the current unreachable to FAIL, it will expand as
multiple words without errors, but it's unexpected as we don't want the types
to be used like that. Maybe we can use an "error" for this kind of usage
instead of the current unreachable, will have a further look.

Reply via email to