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

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
It works when f is a template:

```
#if 1  // change to '0' to fix
#define TYPE auto
#else
#define TYPE decltype(^^::)
#endif

template<typename T>
consteval void f() {
  template for (constexpr TYPE dm : {^^int}) {
    (void) [dm] {
      (void) dm;
    };
  }
}

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

so it could be a missing in_expansion_stmt_p somewhere.

Reply via email to