Summary: | [7 Regression] ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: in cp_build_addr_expr_1, at cp/typeck.c:5708) | ||
---|---|---|---|
Product: | gcc | Reporter: | Chengnian Sun <chengniansun> |
Component: | c++ | Assignee: | Nathan Sidwell <nathan> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jakub, jason, nathan, webrown.cpp |
Priority: | P4 | Keywords: | error-recovery |
Version: | 7.0 | ||
Target Milestone: | 7.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2016-12-10 00:00:00 |
Description
Chengnian Sun
2016-12-10 20:11:09 UTC
The new code in cp_build_addr_expr_1 says CASE_CONVERT: case FLOAT_EXPR: case FIX_TRUNC_EXPR: /* We should have handled this above in the lvalue_kind check. */ we arrived here with NOP_EXPR, but we hadn't issued an error in this block: /* Anything not already handled and not a true memory reference is an error. */ if (TREE_CODE (argtype) != FUNCTION_TYPE && TREE_CODE (argtype) != METHOD_TYPE) because strict_lvalue is false. ARG is (const struct ValueType) doubleval. Author: nathan Date: Thu Jan 5 12:30:26 2017 New Revision: 244101 URL: https://gcc.gnu.org/viewcvs?rev=244101&root=gcc&view=rev Log: cp/ PR c++/78765 * pt.c (convert_nontype_argument): Don't try and see if integral or enum expressions are constants prematurely. testsuite/ PR c++/78765 * g++.dg/cpp0x/pr78765.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/pr78765.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog |