diff options
author | Richard Guenther <rguenther@suse.de> | 2010-10-15 15:17:06 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-10-15 15:17:06 +0000 |
commit | 638fd1e51375689b89a78f64bc23d029ae2bafc5 (patch) | |
tree | 1eeb48475652f9d1a9f8c8400efc73a75c8937a3 /gcc | |
parent | fbdaa0b24c010cd9f380ae6bf3843be87f124f4b (diff) | |
download | gcc-638fd1e51375689b89a78f64bc23d029ae2bafc5.zip gcc-638fd1e51375689b89a78f64bc23d029ae2bafc5.tar.gz gcc-638fd1e51375689b89a78f64bc23d029ae2bafc5.tar.bz2 |
tree.c (free_lang_data_in_decl): Clear DECL_INITIAL for automatic variables again.
2010-10-15 Richard Guenther <rguenther@suse.de>
* tree.c (free_lang_data_in_decl): Clear DECL_INITIAL
for automatic variables again.
* g++.dg/lto/20101015-1_0.C: New testcase.
From-SVN: r165511
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/lto/20101015-1_0.C | 31 | ||||
-rw-r--r-- | gcc/tree.c | 5 |
4 files changed, 43 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c634624..2ef1461 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-15 Richard Guenther <rguenther@suse.de> + + * tree.c (free_lang_data_in_decl): Clear DECL_INITIAL + for automatic variables again. + 2010-10-15 Joseph Myers <joseph@codesourcery.com> * doc/extend.texi (Variable Length): Don't refer to VLAs not diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 208041a..2804670 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,9 @@ 2010-10-15 Richard Guenther <rguenther@suse.de> + * g++.dg/lto/20101015-1_0.C: New testcase. + +2010-10-15 Richard Guenther <rguenther@suse.de> + PR testsuite/46021 * gcc.dg/tree-ssa/20031106-3.c: Remove XFAIL. * gcc.dg/tree-ssa/fre-vce-1.c: Likewise. diff --git a/gcc/testsuite/g++.dg/lto/20101015-1_0.C b/gcc/testsuite/g++.dg/lto/20101015-1_0.C new file mode 100644 index 0000000..a3b296e --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/20101015-1_0.C @@ -0,0 +1,31 @@ +// { dg-lto-do assemble } + +class DOMString { }; +class DocumentImpl; +class NodeImpl { +public: + static const DOMString& + mapPrefix(const DOMString &prefix, const DOMString &namespaceURI, short nType); + static DOMString getXmlnsURIString(); +}; +class DOM_Node { +public: + enum NodeType { ATTRIBUTE_NODE = 2 }; +}; +class AttrImpl: public NodeImpl { +public: + AttrImpl(DocumentImpl *ownerDocument, const DOMString &aName); +}; +class AttrNSImpl: public AttrImpl { + AttrNSImpl(DocumentImpl *ownerDoc, const DOMString &namespaceURI, const DOMString &qualifiedName); +}; +AttrNSImpl::AttrNSImpl(DocumentImpl *ownerDoc, + const DOMString &fNamespaceURI, + const DOMString &qualifiedName) + : AttrImpl(ownerDoc, qualifiedName) +{ + DOMString xmlnsURI = NodeImpl::getXmlnsURIString(); + DOMString prefix; + bool xmlnsAlone = false; + const DOMString& URI = xmlnsAlone ? xmlnsURI : mapPrefix(prefix, fNamespaceURI, DOM_Node::ATTRIBUTE_NODE); +} @@ -4513,8 +4513,9 @@ free_lang_data_in_decl (tree decl) } else if (TREE_CODE (decl) == VAR_DECL) { - if (DECL_EXTERNAL (decl) - && (!TREE_STATIC (decl) || !TREE_READONLY (decl))) + if ((DECL_EXTERNAL (decl) + && (!TREE_STATIC (decl) || !TREE_READONLY (decl))) + || (decl_function_context (decl) && !TREE_STATIC (decl))) DECL_INITIAL (decl) = NULL_TREE; } else if (TREE_CODE (decl) == TYPE_DECL) |