diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-20 16:02:55 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@linaro.org> | 2017-11-20 16:02:55 +0000 |
commit | d58952aefb03632bbb5b441d5c0bd330711f0af1 (patch) | |
tree | d046e56bfbd6a40106ae6ab96fafc954f1dfc955 /gcc/cp/decl2.c | |
parent | 648f8fc59b2cc39abd24f4c22388b346cdebcc31 (diff) | |
parent | 50221fae802a10fafe95e61d40504a58da33e98f (diff) | |
download | gcc-linaro-dev/sve.tar.gz |
Merge trunk into svelinaro-dev/sve
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index a23b96c53e7..0b183085e0e 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -787,6 +787,15 @@ finish_static_data_member_decl (tree decl, && TYPE_DOMAIN (TREE_TYPE (decl)) == NULL_TREE) SET_VAR_HAD_UNKNOWN_BOUND (decl); + if (init) + { + /* Similarly to start_decl_1, we want to complete the type in order + to do the right thing in cp_apply_type_quals_to_decl, possibly + clear TYPE_QUAL_CONST (c++/65579). */ + tree type = TREE_TYPE (decl) = complete_type (TREE_TYPE (decl)); + cp_apply_type_quals_to_decl (cp_type_quals (type), decl); + } + cp_finish_decl (decl, init, init_const_expr_p, asmspec_tree, flags); } |