diff options
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 8a264d7afa9..5194638a767 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -33,6 +33,8 @@ Boston, MA 02111-1307, USA. */ #include "insn-config.h" #include "integrate.h" #include "tree-inline.h" +/* APPLE LOCAL Objective-C++ */ +#include "debug.h" #include "target.h" static tree bot_manip (tree *, int *, void *); @@ -111,6 +113,8 @@ lvalue_p_1 (tree ref, case STRING_CST: return clk_ordinary; + /* APPLE LOCAL Objective-C++ */ + case CONST_DECL: case VAR_DECL: if (TREE_READONLY (ref) && ! TREE_STATIC (ref) && DECL_LANG_SPECIFIC (ref) @@ -499,11 +503,10 @@ cp_build_qualified_type_real (tree type, return build_ptrmemfunc_type (t); } - /* A reference, function or method type shall not be cv qualified. + /* A reference or method type shall not be cv qualified. [dcl.ref], [dct.fct] */ if (type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE) && (TREE_CODE (type) == REFERENCE_TYPE - || TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE)) { bad_quals |= type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); @@ -511,10 +514,11 @@ cp_build_qualified_type_real (tree type, } /* A restrict-qualified type must be a pointer (or reference) - to object or incomplete type. */ + to object or incomplete type, or a function type. */ if ((type_quals & TYPE_QUAL_RESTRICT) && TREE_CODE (type) != TEMPLATE_TYPE_PARM && TREE_CODE (type) != TYPENAME_TYPE + && TREE_CODE (type) != FUNCTION_TYPE && !POINTER_TYPE_P (type)) { bad_quals |= TYPE_QUAL_RESTRICT; @@ -1459,6 +1463,7 @@ cp_tree_equal (tree t1, tree t2) case FUNCTION_DECL: case TEMPLATE_DECL: case IDENTIFIER_NODE: + case SSA_NAME: return false; case BASELINK: @@ -1850,17 +1855,6 @@ handle_init_priority_attribute (tree* node, } } -/* Return a new TINST_LEVEL for DECL at location locus. */ -tree -make_tinst_level (tree decl, location_t locus) -{ - tree tinst_level = make_node (TINST_LEVEL); - TREE_CHAIN (tinst_level) = NULL_TREE; - TINST_DECL (tinst_level) = decl; - TINST_LOCATION (tinst_level) = locus; - return tinst_level; -} - /* Return a new PTRMEM_CST of the indicated TYPE. The MEMBER is the thing pointed to by the constant. */ @@ -2256,7 +2250,10 @@ stabilize_init (tree init, tree *initp) if (TREE_CODE (t) == COND_EXPR) return false; - stabilize_call (t, initp); + /* The TARGET_EXPR might be initializing via bitwise copy from + another variable; leave that alone. */ + if (TREE_SIDE_EFFECTS (t)) + stabilize_call (t, initp); } return true; |