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>
PR tree-optimization/87826
......
......@@ -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 {
......
......@@ -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();
......
......@@ -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();
......
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();
......
......@@ -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)
{
......
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