varasm.c (get_section): Use gcc_assert.

* varasm.c (get_section): Use gcc_assert.
cp:
	* method.c (make_thunk): Don't set comdat_linkage here.
	(use_thunk): Make thunk one only here, if thunk target is
	DECL_ONE_ONLY.
testsuite:
	* g++.dg/abi/thunk3.C: New.
	* g++.dg/abi/thunk4.C: New.

From-SVN: r109149
This commit is contained in:
Nathan Sidwell 2005-12-29 16:38:26 +00:00
parent 42b67c06ed
commit bf2f234e75
7 changed files with 62 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
* varasm.c (get_section): Use gcc_assert.
2005-12-29 Paul Brook <paul@codesourcery.com>
* config/m68k/m68k.h (RETURN_ADDR_RTX): Define.

View File

@ -1,3 +1,9 @@
2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
* method.c (make_thunk): Don't set comdat_linkage here.
(use_thunk): Make thunk one only here, if thunk target is
DECL_ONE_ONLY.
2005-12-26 Mark Mitchell <mark@codesourcery.com>
PR c++/25439

View File

@ -137,8 +137,6 @@ make_thunk (tree function, bool this_adjusting,
TREE_READONLY (thunk) = TREE_READONLY (function);
TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function);
TREE_PUBLIC (thunk) = TREE_PUBLIC (function);
if (flag_weak)
comdat_linkage (thunk);
SET_DECL_THUNK_P (thunk, this_adjusting);
THUNK_TARGET (thunk) = function;
THUNK_FIXED_OFFSET (thunk) = d;
@ -381,8 +379,8 @@ use_thunk (tree thunk_fndecl, bool emit_p)
DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function);
DECL_VISIBILITY_SPECIFIED (thunk_fndecl)
= DECL_VISIBILITY_SPECIFIED (function);
if (flag_weak && TREE_PUBLIC (thunk_fndecl))
comdat_linkage (thunk_fndecl);
if (DECL_ONE_ONLY (function))
make_decl_one_only (thunk_fndecl);
if (flag_syntax_only)
{

View File

@ -1,7 +1,12 @@
2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/abi/thunk3.C: New.
* g++.dg/abi/thunk4.C: New.
2005-12-29 Paul Thomas <pault@gcc.gnu.org>
PR fortran/25532
*gfortran.dg/host_used_types_1.f90: New test. Check that host
* gfortran.dg/host_used_types_1.f90: New test. Check that host
associated derived type components of derived types are
properly declared in contained procedures.

View File

@ -0,0 +1,20 @@
// { dg-final { scan-assembler-not ".weak\t_ZThn4_N7Derived3FooEv" } }
struct Base
{
virtual void Foo ();
};
struct Filler
{
virtual void Baz ();
};
struct Derived : Filler, Base
{
virtual void Foo ();
};
void Derived::Foo ()
{
}

View File

@ -0,0 +1,22 @@
// { dg-final { scan-assembler ".weak\t_ZThn4_N7Derived3FooEv" } }
struct Base
{
virtual void Foo ();
};
struct Filler
{
virtual void Baz ();
};
struct Derived : Filler, Base
{
virtual void Foo ();
};
inline void Derived::Foo ()
{
}
Derived f;

View File

@ -249,10 +249,8 @@ get_section (const char *name, unsigned int flags, tree decl)
/* Sanity check user variables for flag changes. */
if (decl == 0)
decl = sect->named.decl;
if (decl)
error ("%+D causes a section type conflict", decl);
else
gcc_unreachable ();
gcc_assert (decl);
error ("%+D causes a section type conflict", decl);
}
}
return sect;