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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
            Summary|ICE in convert_like_real on |[8/9 Regression] ICE in
                   |decltype expression         |convert_like_real on
                   |involving string conversion |decltype expression
                   |to char*                    |involving string conversion
                   |                            |to char*
      Known to fail|                            |8.3.0, 9.0

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Bisection points to r254437:

r254437 | marxin | 2017-11-06 04:02:15 -0500 (Mon, 06 Nov 2017) | 25 lines

Instrument function exit with __builtin_unreachable in C++


Prior to that change GCC would reject the test case with a slightly better for
of an ICE:

t.C: In substitution of ‘template<class T> decltype (f(T(), "")) g(T) [with T =
int]’:
t.C:7:17:   required from here
t.C:5:13: warning: ISO C++ forbids converting a string constant to ‘char*’
[-Wwrite-strings]
 decltype (f (T (), "")) g (T) { }
           ~~^~~~~~~~~~
t.C: In instantiation of ‘decltype (f(T(), "")) g(T) [with T = int]’:
t.C:5:25: sorry, unimplemented: string literal in function template signature
 decltype (f (T (), "")) g (T) { }
                         ^

Reply via email to