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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-08-01
                 CC|                            |ppalka at gcc dot gnu.org
           Keywords|accepts-invalid,            |ice-checking,
                   |ice-on-invalid-code         |ice-on-valid-code

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Jiang An from comment #3)
> This example is valid (or should be) for libstdc++.
Thanks, I adjusted the PR to reflect this.

This seems to be a checking-only ICE and not a regression.  Reduced:

void __ostream_insert(const char*);
struct basic_string {
  const char* _M_p;
  char _M_local_buf[16] = {};
  constexpr basic_string() : _M_p(_M_local_buf) {}
  const char *data() const { return _M_p; }
};
constexpr basic_string f() { return {}; }
constexpr basic_string text = f();
int main() {
  __ostream_insert(text._M_p);
}

Reply via email to