https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71226
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-05-23 Summary|ICE in fold_binary_loc, at |[C++14] ICE in |fold-const.c:9252, from |fold_binary_loc, at |constexpr function |fold-const.c:9252, from | |constexpr function Ever confirmed|0 |1 Known to fail| |5.3.0, 6.1.0, 7.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. GCC 4.9 complains: t.C: In function ‘constexpr zero foo(zero)’: t.C:10:1: error: body of constexpr function ‘constexpr zero foo(zero)’ not a return-statement } ^ t.C: In function ‘int main()’: t.C:14:30: error: ‘constexpr zero foo(zero)’ called in a constant expression constexpr zero y = foo(x); ^ #3 0x0000000000a45d96 in cxx_eval_binary_expression (ctx=0x7fffffffc710, t=0x7ffff69daf00, non_constant_p=0x7fffffffd177, overflow_p=0x7fffffffd176) at /space/rguenther/src/svn/gcc-6-branch/gcc/cp/constexpr.c:1756 1756 r = fold_binary_loc (loc, code, type, lhs, rhs); (gdb) p code $1 = PLUS_EXPR (gdb) p type $2 = (tree) 0x7ffff688b7e0 (gdb) p lhs $3 = (tree) 0x0 (gdb) p rhs $4 = (tree) 0x0