From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26286 invoked by alias); 16 Feb 2015 13:56:54 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26241 invoked by uid 48); 16 Feb 2015 13:56:50 -0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/65075] [5 Regression] constexpr regression Date: Mon, 16 Feb 2015 13:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg01752.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65075 --- Comment #1 from Paolo Carlini --- Hi Jakub. Something like the below passes testing and works for the testcase: Index: constexpr.c =================================================================== --- constexpr.c (revision 220731) +++ constexpr.c (working copy) @@ -415,8 +415,8 @@ check_constexpr_bind_expr_vars (tree t) gcc_assert (TREE_CODE (t) == BIND_EXPR); for (tree var = BIND_EXPR_VARS (t); var; var = DECL_CHAIN (var)) - if (TREE_CODE (var) == TYPE_DECL - && DECL_IMPLICIT_TYPEDEF_P (var)) + if (DECL_IMPLICIT_TYPEDEF_P (var) + && !LAMBDA_TYPE_P (TREE_TYPE (var))) return false; return true; } Note that I will be traveling for a week or so, thus I'm not be able to fully handle the issue. If we rather resolve the regression immediately, please feel free to pick up the above / double check if it makes sense to Jason.