re PR c++/58201 (Undefined reference to `B::B(void const**)')

PR middle-end/58201
	* cgraphunit.c (analyze_functions): Clear AUX fields
	after processing; initialize assembler name has.

	* g++.dg/torture/pr58201_0.C: New testcase.
	* g++.dg/torture/pr58201_1.C: New testcase.
	* g++.dg/torture/pr58201.h: New testcase.

From-SVN: r202298
This commit is contained in:
Jan Hubicka 2013-09-06 01:04:11 +02:00 committed by Jan Hubicka
parent 17796c434d
commit d352b2459f
6 changed files with 63 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-09-04 Jan Hubicka <jh@suse.cz>
PR middle-end/58201
* cgraphunit.c (analyze_functions): Clear AUX fields
after processing; initialize assembler name has.
2013-09-05 Jeff Law <law@redhat.com>
* tree-ssa-threadedge.c (thread_around_empty_blocks): Renamed

View File

@ -1064,6 +1064,8 @@ analyze_functions (void)
}
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)
@ -1074,6 +1076,11 @@ analyze_functions (void)
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

View File

@ -1,3 +1,10 @@
2013-09-04 Jan Hubicka <jh@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 <jh@suse.cz>
* gcc.dg/autopar/pr49960.c: Disable partial inlining

View File

@ -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();
};
};

View File

@ -0,0 +1,9 @@
#include "pr58201.h"
C::C2::C2(){ }
C::C2::~C2() { }
int main ()
{
return 0;
}

View File

@ -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() { }