PR c++/80265 - constexpr __builtin_mem*.
authorJason Merrill <jason@redhat.com>
Fri, 10 Jan 2020 20:38:34 +0000 (15:38 -0500)
committerJason Merrill <jason@redhat.com>
Mon, 13 Jan 2020 17:50:12 +0000 (12:50 -0500)
commit69dc042f91c70458ffb6e7b147f093799cee2100
tree35aa87883d243598c9f505525aff4f27c13d43b6
parent7c82dd6c02d44d9d2cd84dda137c00b1a3cd6c90
PR c++/80265 - constexpr __builtin_mem*.

The library has already worked around this issue, but I was curious about
why it wasn't working.  The answer: because we were passing &var to fold,
which doesn't know about the constexpr values hash table.  Fixed by passing
&"str" instead.

* constexpr.c (cxx_eval_builtin_function_call): Expose STRING_CST
to str/mem builtins.
gcc/cp/constexpr.c
gcc/testsuite/g++.dg/ext/constexpr-builtin1.C [new file with mode: 0644]