tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of TYPE_DECL.

* tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
	TYPE_DECL.

	* g++.dg/lto/pr84805_1.C: Update template.
	* g++.dg/lto/pr84805_0.C: Update template.
	* g++.dg/lto/pr84805_1b.C: Update template.
	* g++.dg/lto/pr84805_0b.C: Update template.

From-SVN: r265722
This commit is contained in:
Jan Hubicka 2018-11-01 14:03:28 +01:00 committed by Jan Hubicka
parent 444cda7470
commit 6d912664f4
6 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2018-11-30 Jan Hubicka <jh@suse.cz>
* g++.dg/lto/pr84805_1.C: Update template.
* g++.dg/lto/pr84805_0.C: Update template.
* g++.dg/lto/pr84805_1b.C: Update template.
* g++.dg/lto/pr84805_0b.C: Update template.
2018-11-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87826

View file

@ -3,7 +3,7 @@ public:
virtual ~XclRoot();
};
class XclImpRoot : XclRoot {};
struct RootData { // { dg-lto-warning "8: type 'struct RootData' violates the C\\+\\+ One Definition Rule" }
struct RootData {
XclImpRoot pIR;
};
class ExcRoot {

View file

@ -3,7 +3,7 @@
// { dg-require-effective-target fpic }
// { dg-lto-options {{-fPIC -shared -flto}} }
class VclReferenceBase { // { dg-lto-warning "7: type 'struct VclReferenceBase' violates the C\\+\\+ One Definition Rule" }
class VclReferenceBase {
int mnRefCnt;
bool mbDisposed : 1;
virtual ~VclReferenceBase();

View file

@ -3,7 +3,7 @@
// { dg-require-effective-target fpic }
// { dg-lto-options {{-fPIC -shared -flto}} }
class VclReferenceBase { // { dg-lto-warning "7: type 'struct VclReferenceBase' violates the C\\+\\+ One Definition Rule" }
class VclReferenceBase {
int mnRefCnt;
int mbDisposed : 3;
virtual ~VclReferenceBase();

View file

@ -1,6 +1,6 @@
class VclReferenceBase {
int mnRefCnt;
int mbDisposed: 7; // { dg-lto-message "19: a field of same name but different type is defined in another translation unit" }
int mbDisposed: 7;
protected:
virtual ~VclReferenceBase();

View file

@ -5510,6 +5510,8 @@ free_lang_data_in_decl (tree decl, struct free_lang_data_d *fld)
DECL_VISIBILITY_SPECIFIED (decl) = 0;
DECL_INITIAL (decl) = NULL_TREE;
DECL_ORIGINAL_TYPE (decl) = NULL_TREE;
TREE_TYPE (decl) = void_type_node;
SET_DECL_ALIGN (decl, 0);
}
else if (TREE_CODE (decl) == FIELD_DECL)
{