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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is one which is a little more complex for templated function too:
```
template<typename T>
[[gnu::returns_nonnull]]
auto f() {
  return new T(42);
}

auto g(void)
{
   return f<int>();
}
```

Reply via email to