Hi,
this is the patch I commited after testing on x86_64-linux.

Honza

Index: ChangeLog
===================================================================
*** ChangeLog   (revision 202271)
--- ChangeLog   (working copy)
***************
*** 1,3 ****
--- 1,9 ----
+ 2013-09-04  Jan Hubicka  <j...@suse.cz>
+ 
+       PR middle-end/58201
+       * cgraphunit.c (analyze_functions): Clear AUX fields
+       after processing; initialize assembler name has.
+ 
  2013-09-04  Dodji Seketeli  <do...@redhat.com>
  
        * tree.h (DECL_BUILT_IN): Fix typo in comment.
Index: cgraphunit.c
===================================================================
*** cgraphunit.c        (revision 202271)
--- cgraphunit.c        (working copy)
*************** analyze_functions (void)
*** 1064,1069 ****
--- 1064,1071 ----
        }
        node->symbol.aux = NULL;
      }
+   for (;node; node = node->symbol.next)
+     node->symbol.aux = NULL;
    first_analyzed = cgraph_first_function ();
    first_analyzed_var = varpool_first_variable ();
    if (cgraph_dump_file)
*************** analyze_functions (void)
*** 1074,1079 ****
--- 1076,1086 ----
    bitmap_obstack_release (NULL);
    pointer_set_destroy (reachable_call_targets);
    ggc_collect ();
+   /* Initialize assembler name hash, in particular we want to trigger C++
+      mangling and same body alias creation before we free DECL_ARGUMENTS
+      used by it.  */
+   if (!seen_error ())
+   symtab_initialize_asm_name_hash ();
  }
  
  /* Translate the ugly representation of aliases as alias pairs into nice
Index: testsuite/ChangeLog
===================================================================
*** testsuite/ChangeLog (revision 202297)
--- testsuite/ChangeLog (working copy)
***************
*** 1,3 ****
--- 1,10 ----
+ 2013-09-04  Jan Hubicka  <j...@suse.cz>
+ 
+       PR middle-end/58201
+       * g++.dg/torture/pr58201_0.C: New testcase.
+       * g++.dg/torture/pr58201_1.C: New testcase.
+       * g++.dg/torture/pr58201.h: New testcase.
+ 
  2013-09-05  Jan Hubicka  <j...@suse.cz>
  
        * gcc.dg/autopar/pr49960.c: Disable partial inlining
Index: testsuite/g++.dg/torture/pr58201_0.C
===================================================================
*** testsuite/g++.dg/torture/pr58201_0.C        (revision 0)
--- testsuite/g++.dg/torture/pr58201_0.C        (revision 0)
***************
*** 0 ****
--- 1,9 ----
+ #include "pr58201.h"    
+                     
+ C::C2::C2(){ }      
+ C::C2::~C2() { }    
+                     
+ int main ()         
+ {                   
+     return 0;       
+ }  
Index: testsuite/g++.dg/torture/pr58201_1.C
===================================================================
*** testsuite/g++.dg/torture/pr58201_1.C        (revision 0)
--- testsuite/g++.dg/torture/pr58201_1.C        (revision 0)
***************
*** 0 ****
--- 1,10 ----
+ /* { dg-do link } */
+ /* { dg-options "-O2" } */
+ /* { dg-additional-sources "pr58201_0.C" } */
+ #include "pr58201.h"
+ 
+ A::A() { }
+ A::~A() { }
+ B::B() { }
+ B::~B() { }
+ 
Index: testsuite/g++.dg/torture/pr58201.h
===================================================================
*** testsuite/g++.dg/torture/pr58201.h  (revision 0)
--- testsuite/g++.dg/torture/pr58201.h  (revision 0)
***************
*** 0 ****
--- 1,24 ----
+ class A
+ {
+  protected:
+   A();
+   virtual ~A();
+ };
+ 
+ class B : virtual public A
+ {
+  public:
+   B();
+   virtual ~B();
+ };
+ 
+ class C
+ {
+  private:
+   class C2 : public B
+    {
+    public:
+      C2();
+      virtual ~C2();
+    };
+ };

Reply via email to