[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-bugs
Subject:    [Bug c++/107938] [11/12/13 Regression] ICE directly returning `this` of `extern` variable in templat
From:       "pinskia at gcc dot gnu.org via Gcc-bugs" <gcc-bugs () gcc ! gnu ! org>
Date:       2022-11-30 19:30:16
Message-ID: bug-107938-4-ZlQmGxZBv3 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Hmm, the following slightly modified testcase works in GCC 8.5.0 but started to
ICE in GCC 9.1.0:
```
struct Q {
  int n;
  constexpr const Q* operator()(int) const { return this; }
};

constexpr Q q{};

template<int>
constexpr const Q* p = q(0);
```

It is still a regression though.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic