https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96008

--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> ---
msebor:
the warning is working correctly but the IL the C++ front end
emits doesn't look right: AFAICS, it creates a function object
for the lambda and calls its operator() with a null this pointer:

; Function static decltype (((const main()::<lambda(auto:1
...)>*)0)->operator()<auto:1
...>(static_cast<auto:1&&>(main::._anon_0::_FUN::<unnamed>) ...))
main()::<lambda(auto:1 ...)>::_FUN(auto:1 ...) [with auto:1 = {int};
decltype (((const main()::<lambda(auto:1 ...)>*)0)->operator()<auto:1
...>(static_cast<auto:1&&>(main::._anon_0::_FUN::<unnamed>) ...)) =
void] (null)
;; enabled by -tree-original


<<cleanup_point <<< Unknown tree: expr_stmt
   main()::<lambda(auto:1 ...)>::operator()<int> (0B, D.2440) >>>>>;
return;


The ICE is PR95984

Reply via email to