https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109886
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> --- (In reply to Aldy Hernandez from comment #4) > (In reply to Andrew Pinski from comment #3) > > (In reply to Aldy Hernandez from comment #2) > > > If irange::supports_p (TREE_TYPE (arg)) is true, we're talking about an > > > integer/pointer, but if range_cast is being called on a parm_type of > > > RECORD_TYPE, someone's trying to cast a structure to an integer. Is that > > > the intent here, because that will not work with ranges?? > > > > That is correct. The generated code has a VIEW_CONVERT_EXR from an integer > > type to a RECORD_TYPE. > > Eeeech. In that case, then what you suggest is reasonable. Bail if > param_type is not supported by the underlying range. Maybe the IPA experts > could opine? With LTOed type mismateches or with K&R style code, IPA has to be prepared to deal with such cases, unfortunately. So a check like that indeed looks reasonable.