[Bug c++/71828] [6/7 regression] ICE on valid C++11 code with constexpr __Complex int variable declaration: in operand_equal_p, at fold-const.c:2790

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 19 08:44:00 GMT 2016


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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Jul 19 08:44:04 2016
New Revision: 238460

URL: https://gcc.gnu.org/viewcvs?rev=238460&root=gcc&view=rev
Log:
        Backported from mainline
        2016-07-18  Jakub Jelinek  <jakub@redhat.com>

        PR c++/71828
        * constexpr.c (cxx_eval_constant_expression) <case REALPART_EXPR>:
        For lval don't use cxx_eval_unary_expression and instead recurse
        and if needed rebuild the reference.

        * g++.dg/cpp0x/constexpr-71828.C: New test.

Added:
    branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-71828.C
Modified:
    branches/gcc-6-branch/gcc/cp/ChangeLog
    branches/gcc-6-branch/gcc/cp/constexpr.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list