re PR c++/86738 (gcc 8.2: Internal compiler error memcpy)
authorJakub Jelinek <jakub@redhat.com>
Wed, 8 Aug 2018 08:31:40 +0000 (10:31 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 8 Aug 2018 08:31:40 +0000 (10:31 +0200)
commitbf533db8059e25668db76845390786e7fa5f3a76
treef6a530fb390a2247b815a755871606b62181913b
parente75bc10e68f2c154eea18b87486e9da5cad0efaa
re PR c++/86738 (gcc 8.2: Internal compiler error memcpy)

PR c++/86738
* constexpr.c (cxx_eval_binary_expression): For arithmetics involving
NULL pointer set *non_constant_p to true.
(cxx_eval_component_reference): For dereferencing of a NULL pointer,
set *non_constant_p to true and return t.

* g++.dg/opt/pr86738.C: New test.

From-SVN: r263390
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/pr86738.C [new file with mode: 0644]