re PR debug/46241 (ice in dwarf2out.c)

2010-11-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/46241
	* dwarf2out.c (scope_die_for): Properly detect global scope.

	* g++.dg/debug/pr46241.C: New testcase.

From-SVN: r166245
This commit is contained in:
Richard Guenther 2010-11-03 13:31:40 +00:00 committed by Richard Biener
parent 8b8bba2dd9
commit 68a22980da
4 changed files with 30 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-11-03 Richard Guenther <rguenther@suse.de>
PR middle-end/46241
* dwarf2out.c (scope_die_for): Properly detect global scope.
2010-11-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46190

View File

@ -17739,7 +17739,7 @@ scope_die_for (tree t, dw_die_ref context_die)
if (containing_scope && TREE_CODE (containing_scope) == FUNCTION_TYPE)
containing_scope = NULL_TREE;
if (containing_scope == NULL_TREE)
if (SCOPE_FILE_SCOPE_P (containing_scope))
scope_die = comp_unit_die ();
else if (TYPE_P (containing_scope))
{

View File

@ -1,3 +1,8 @@
2010-11-03 Richard Guenther <rguenther@suse.de>
PR middle-end/46241
* g++.dg/debug/pr46241.C: New testcase.
2010-11-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/46190

View File

@ -0,0 +1,19 @@
class btIDebugDraw;
class btCollisionWorld {
virtual btIDebugDraw* getDebugDrawer() { };
static void rayTestSingle();
};
class btTriangleCallback {
public:
virtual ~btTriangleCallback();
};
class btTriangleRaycastCallback: public btTriangleCallback {
public:
btTriangleRaycastCallback();
};
void btCollisionWorld::rayTestSingle()
{
struct BridgeTriangleRaycastCallback : public btTriangleRaycastCallback {
BridgeTriangleRaycastCallback() : btTriangleRaycastCallback() { }
};
}