OSDN Git Service

2010-10-09 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Oct 2010 15:59:50 +0000 (15:59 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 9 Oct 2010 15:59:50 +0000 (15:59 +0000)
PR lto/45947
* tree.c (free_lang_data_in_cgraph): Properly walk the varpool.

* g++.dg/lto/20101009-1_0.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165234 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/20101009-1_0.C [new file with mode: 0644]
gcc/tree.c

index ea7fced..5c4d210 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-09  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/45947
+       * tree.c (free_lang_data_in_cgraph): Properly walk the varpool.
+
 2010-10-09  Nathan Froyd  <froydnj@codesourcery.com>
 
        * config/mmix/mmix-protos.h (mmix_function_arg): Delete.
index 3641bf6..9c16eed 100644 (file)
@@ -1,5 +1,10 @@
 2010-10-09  Richard Guenther  <rguenther@suse.de>
 
+       PR lto/45947
+       * g++.dg/lto/20101009-1_0.C: New testcase.
+
+2010-10-09  Richard Guenther  <rguenther@suse.de>
+
        PR tree-optimization/45945
        * gcc.dg/lto/20101009-1_0.c: New testcase.
 
diff --git a/gcc/testsuite/g++.dg/lto/20101009-1_0.C b/gcc/testsuite/g++.dg/lto/20101009-1_0.C
new file mode 100644 (file)
index 0000000..b7cc5bc
--- /dev/null
@@ -0,0 +1,14 @@
+// { dg-lto-do link }
+
+template < typename > struct X
+{
+  template < typename > static int test ();
+  static const int i = sizeof (test < int >());
+};
+
+template struct X < int >;
+
+int main()
+{
+  return 0;
+}
index d068a7e..cf5881a 100644 (file)
@@ -4982,7 +4982,7 @@ free_lang_data_in_cgraph (void)
     find_decls_types (p->decl, &fld);
 
   /* Find decls and types in every varpool symbol.  */
-  for (v = varpool_nodes_queue; v; v = v->next_needed)
+  for (v = varpool_nodes; v; v = v->next)
     find_decls_types_in_var (v, &fld);
 
   /* Set the assembler name on every decl found.  We need to do this