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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.4
   Last reconfirmed|                            |2022-11-30
            Summary|ICE directly returning      |[11/12/13 Regression] ICE
                   |`this` of `extern` variable |directly returning `this`
                   |in template                 |of `extern` variable in
                   |                            |template
      Known to work|                            |10.4.0
     Ever confirmed|0                           |1
           Keywords|                            |needs-bisection
             Status|UNCONFIRMED                 |NEW
      Known to fail|                            |11.1.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. A regression from GCC 10.4.0.

A C++14 testcase (removing the auto from the operator()):
```
struct Q {
  int n;
  constexpr const Q* operator()(int) const { return this; }
};

extern const Q q;

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

Reply via email to