On Fri, Mar 23, 2018 at 4:55 PM, Jason Merrill <ja...@redhat.com> wrote: > On Fri, Mar 23, 2018 at 12:44 PM, Jason Merrill <ja...@redhat.com> wrote: >> Seems like cp_fold should update CALL_EXPR_FN with "callee" if non-null. > > Did you try this? That should avoid it being ADDR_EXPR of a decl.
Oh, I was assuming the ICE was in the middle-end, but it's in build_call_a. And it looks like the problem isn't that it's an ADDR_EXPR of a decl, but that the function isn't marked TREE_USED. Jason