aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-02-20 21:24:40 -0500
committerJason Merrill <jason@gcc.gnu.org>2019-02-20 21:24:40 -0500
commit752620bec6bd8c5139bdd8fccba471c5e7f27e19 (patch)
tree1eae758075f42772117bea1e986e6e41bb507cd4 /gcc/fortran/dump-parse-tree.c
parent556bef7efc20fd95c79303c055059a24dcb72a5b (diff)
downloadgcc-752620bec6bd8c5139bdd8fccba471c5e7f27e19.zip
gcc-752620bec6bd8c5139bdd8fccba471c5e7f27e19.tar.gz
gcc-752620bec6bd8c5139bdd8fccba471c5e7f27e19.tar.bz2
PR c++/87921 - wrong error with inline static data member.
c_parse_final_cleanups checks DECL_IN_AGGR_P to avoid trying to emit a static data member that has not been defined. The inline variable patch changed that to exempt inline variables. But in this case we haven't instantiated the variable yet, so we really don't have a definition. This patch changes inline variable handling such that DECL_IN_AGGR_P is not set for a defined inline variable, so we can remove all the checks of DECL_INLINE_VAR_P after DECL_IN_AGGR_P. With that change we were failing on a static data member that had been instantiated due to a use before we got around to processing it in instantiate_class_template; we should detect that and avoid all the finish_static_data_member_decl processing, which assumes that it is the first time we're seeing the variable. * decl2.c (finish_static_data_member_decl): Don't set DECL_IN_AGGR_P for a non-template inline variable. Do nothing for an already-instantiated variable. (c_parse_final_cleanups): Check DECL_IN_AGGR_P without DECL_INLINE_VAR_P. * decl.c (check_initializer): Likewise. (make_rtl_for_nonlocal_decl): Likewise. * pt.c (instantiate_decl): Likewise. * typeck2.c (store_init_value): Likewise. From-SVN: r269064
Diffstat (limited to 'gcc/fortran/dump-parse-tree.c')
0 files changed, 0 insertions, 0 deletions