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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Aug  8 08:31:40 2018
New Revision: 263390

URL: https://gcc.gnu.org/viewcvs?rev=263390&root=gcc&view=rev
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/opt/pr86738.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/constexpr.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to