On Mon, Aug 9, 2021 at 10:31 PM Andrew MacLeod via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > The user has overridden the function name "toupper" . Its marked as a > builtin function, presumably because it matches the name. In range > folding, we were assuming the LHS and the parameter were compatible > types... but they are not in this case.. > > I don't know if we should be marking such a thing as a builtin function, > but regardless.. we shouldn't be trapping. If the type of the argument > is not compatible with the LHS, then we'll simply assume nothing about > the function. > > Bootstraps with no regression on x86_64-pc-linux-gnu. pushed.
I wonder why the gimple_call_combined_fn verification using gimple_builtin_call_types_compatible_p isn't enough here? Yes, it's matching is a bit lazy, but only with respect to promotion of arguments to 'int'. Richard. > Andrew > > >