Commit 6d912664 by Jan Hubicka Committed by Jan Hubicka

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
parent 444cda74
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> 2018-11-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87826 PR tree-optimization/87826
......
...@@ -3,7 +3,7 @@ public: ...@@ -3,7 +3,7 @@ public:
virtual ~XclRoot(); virtual ~XclRoot();
}; };
class XclImpRoot : XclRoot {}; class XclImpRoot : XclRoot {};
struct RootData { // { dg-lto-warning "8: type 'struct RootData' violates the C\\+\\+ One Definition Rule" } struct RootData {
XclImpRoot pIR; XclImpRoot pIR;
}; };
class ExcRoot { class ExcRoot {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// { dg-require-effective-target fpic } // { dg-require-effective-target fpic }
// { dg-lto-options {{-fPIC -shared -flto}} } // { 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 mnRefCnt;
bool mbDisposed : 1; bool mbDisposed : 1;
virtual ~VclReferenceBase(); virtual ~VclReferenceBase();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
// { dg-require-effective-target fpic } // { dg-require-effective-target fpic }
// { dg-lto-options {{-fPIC -shared -flto}} } // { 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 mnRefCnt;
int mbDisposed : 3; int mbDisposed : 3;
virtual ~VclReferenceBase(); virtual ~VclReferenceBase();
......
class VclReferenceBase { class VclReferenceBase {
int mnRefCnt; 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: protected:
virtual ~VclReferenceBase(); virtual ~VclReferenceBase();
......
...@@ -5510,6 +5510,8 @@ free_lang_data_in_decl (tree decl, struct free_lang_data_d *fld) ...@@ -5510,6 +5510,8 @@ free_lang_data_in_decl (tree decl, struct free_lang_data_d *fld)
DECL_VISIBILITY_SPECIFIED (decl) = 0; DECL_VISIBILITY_SPECIFIED (decl) = 0;
DECL_INITIAL (decl) = NULL_TREE; DECL_INITIAL (decl) = NULL_TREE;
DECL_ORIGINAL_TYPE (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) else if (TREE_CODE (decl) == FIELD_DECL)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment