[Bug c++/69509] [5/6 regression] infinite loop compiling a VLA in a recursive constexpr function
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 27 17:06:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69509
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Summary|infinite loop compiling a |[5/6 regression] infinite
|VLA in a recursive |loop compiling a VLA in a
|constexpr function |recursive constexpr
| |function
Known to fail| |5.3.0, 6.0
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Marking this a 5/6 regression since ICE 4.9.3 rejects the code with the error
below because it doesn't allow contexpr functions to have more than one
(return) statement.
t.c: In function ‘constexpr int foo(int)’:
t.c:8:1: error: body of constexpr function ‘constexpr int foo(int)’ not a
return-statement
}
^
t.c: At global scope:
t.c:10:25: error: ‘constexpr int foo(int)’ called in a constant expression
constexpr int i = foo (3);
^
More information about the Gcc-bugs
mailing list