eval_annotations_of throws if the passed in reflection handle is not
eval_is_function (and various others). Now, eval_is_function uses
maybe_get_first_fn to look through BASELINK/OVERLOAD etc., but
eval_annotations_of wasn't doing that and ICEd on
else if (TYPE_P (r))
r = TYPE_ATTRIBUTES (r);
else if (DECL_P (r))
r = DECL_ATTRIBUTES (r);
else
gcc_unreachable ();
because r isn't a decl nor type (nor REFLECT_BASE earlier).
2026-01-29 Jakub Jelinek <jakub@redhat.com>
PR c++/123866
* reflect.cc (eval_annotations_of): Use maybe_get_first_fn.