https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99349
--- Comment #6 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Thu, Sep 01, 2022 at 07:57:56PM +0000, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99349 > > --- Comment #5 from anlauf at gcc dot gnu.org --- > (In reply to Steve Kargl from comment #4) > > The function is match_data_constant(), so we're looking for a > > constant. My patch simply removes the type checking as it is > > unimportant here, and a type mismatch between a data-object and > > data-value is checked elsewhere. I suspect my original code was > > being too cautious with type checks. > > There's nothing wrong with being cautious. Currently, the only valid > parameter inquiries are %kind, %len, %re, %im. So checking for integer > or real makes sense. > Ah, that rings a bell. 'git blame' shows that I added the integer check and pault added the real check. I suspect only %kind and %len were available when I added the original code, and pault added the real check when he implemented %im and %re. Keeping the checks is ok with me and your patch does the job.