Commit 3fc20697 by Richard Guenther Committed by Richard Biener

re PR c++/43611 (ICE: SIGSEGV with -fipa-cp-clone -fkeep-inline-functions)

2010-04-12  Richard Guenther  <rguenther@suse.de>

	PR c++/43611
	* semantics.c (expand_or_defer_fn_1): Do not keep extern
	template inline functions.

	* g++.dg/torture/pr43611.C: New testcase.

From-SVN: r158218
parent c34f3839
2010-04-12 Richard Guenther <rguenther@suse.de>
PR c++/43611
* semantics.c (expand_or_defer_fn_1): Do not keep extern
template inline functions.
2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c++/28584
......
......@@ -3446,7 +3446,9 @@ expand_or_defer_fn_1 (tree fn)
this function as needed so that finish_file will make sure to
output it later. Similarly, all dllexport'd functions must
be emitted; there may be callers in other DLLs. */
if ((flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn))
if ((flag_keep_inline_functions
&& DECL_DECLARED_INLINE_P (fn)
&& !DECL_REALLY_EXTERN (fn))
|| lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn)))
mark_needed (fn);
}
......
2010-04-12 Richard Guenther <rguenther@suse.de>
PR c++/43611
* g++.dg/torture/pr43611.C: New testcase.
2010-04-12 Shujing Zhao <pearly.zhao@oracle.com>
PR c/36774
......
// { dg-do compile }
// { dg-options "-fkeep-inline-functions" }
template < typename >
struct A {
void init (int);
A ()
{
this->init (0);
}
};
template < typename >
struct B : A < int > {
A < int > a;
B () {}
};
extern template struct A < int >;
extern template struct B < int >;
B < int > b;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment