PR c++/70029 - ICE with ref-qualifier and -flto
commit4edbdd46704b2796cc2221c0e70bc39d32170eb8
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Sep 2017 22:39:17 +0000 (8 22:39 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Sep 2017 22:39:17 +0000 (8 22:39 +0000)
treed4c20252428e4348fc569284133594067d73b3c8
parentca9fb91c636b1a212e711096c2e4d209b79a77f0
PR c++/70029 - ICE with ref-qualifier and -flto
gcc/
* langhooks.h (struct lang_hooks_for_types): Add
copy_lang_qualifiers.
* attribs.c (build_type_attribute_qual_variant): Use it.
* langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
NULL.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
* tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
gcc/cp/
* tree.c (cxx_copy_lang_qualifiers): New.
* cp-tree.h: Declare it.
* cp-objcp-common.h: Define LANG_HOOKS_COPY_LANG_QUALIFIERS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251911 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/attribs.c
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.h
gcc/cp/cp-tree.h
gcc/cp/tree.c
gcc/langhooks-def.h
gcc/langhooks.h
gcc/testsuite/g++.dg/lto/pr70029_0.C [new file with mode: 0644]
gcc/tree.c