Commit e8902891 by Paolo Carlini Committed by Paolo Carlini

re PR c++/58846 (ICE redeclaring __dso_handle)

/cp
2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58846
	* decl.c (get_dso_handle_node): Don't crash if dso_handle_node
	== error_mark_node.

/testsuite
2014-01-29  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58846
	* g++.dg/init/dso_handle2.C: New.

From-SVN: r207276
parent e1e30986
2014-01-29 Paolo Carlini <paolo.carlini@oracle.com> 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58846
* decl.c (get_dso_handle_node): Don't crash if dso_handle_node
== error_mark_node.
2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58674 PR c++/58674
* pt.c (instantiate_template_1): Check for error_mark_node the second * pt.c (instantiate_template_1): Check for error_mark_node the second
argument too. argument too.
......
...@@ -6709,8 +6709,11 @@ get_dso_handle_node (void) ...@@ -6709,8 +6709,11 @@ get_dso_handle_node (void)
ptr_type_node); ptr_type_node);
#ifdef HAVE_GAS_HIDDEN #ifdef HAVE_GAS_HIDDEN
DECL_VISIBILITY (dso_handle_node) = VISIBILITY_HIDDEN; if (dso_handle_node != error_mark_node)
DECL_VISIBILITY_SPECIFIED (dso_handle_node) = 1; {
DECL_VISIBILITY (dso_handle_node) = VISIBILITY_HIDDEN;
DECL_VISIBILITY_SPECIFIED (dso_handle_node) = 1;
}
#endif #endif
return dso_handle_node; return dso_handle_node;
......
2014-01-29 Paolo Carlini <paolo.carlini@oracle.com> 2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58846
* g++.dg/init/dso_handle2.C: New.
2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58674 PR c++/58674
* g++.dg/cpp0x/pr58674.C: New. * g++.dg/cpp0x/pr58674.C: New.
......
// PR c++/58846
extern "C" { char* __dso_handle; }
struct A
{
~A();
};
A a; // { dg-error "conflicting declaration" }
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