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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |11.4.0, 12.3.0, 13.1.0
      Known to work|                            |11.3.0, 12.1.0, 12.2.0
            Summary|ICE with constexpr if and   |[11/12/13/14 Regression]
                   |static_assert accessing     |ICE with constexpr if and
                   |captures across nested      |static_assert accessing
                   |generic lambdas             |captures across nested
                   |                            |generic lambdas
   Target Milestone|---                         |11.5
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-03-11

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
```
struct a
{
  static constexpr int value = 1;
};

int main() {
    [](auto level1) {
        return [&](auto ) {
            return [&](auto level3) {
                if constexpr (decltype(level3)::value) {
                    static_assert(decltype(level1)::value, "");
                }
                return 0;
            }(a{});
        }(0);
    }(a{});
}
```

Reply via email to