re PR c++/40834 (Revision 149750 failed 483.xalancbmk in SPEC CPU 2006)
2009-07-29 Richard Guenther <rguenther@suse.de> PR c++/40834 * cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR vars. * g++.dg/torture/pr40834.C: New testcase. From-SVN: r150222
This commit is contained in:
parent
2958f4a215
commit
9e34da8b07
@ -1,3 +1,9 @@
|
||||
2009-07-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c++/40834
|
||||
* cp-gimplify.c (cp_genericize_r): Properly walk the BIND_EXPR
|
||||
vars.
|
||||
|
||||
2009-07-26 Simon Martin <simartin@users.sourceforge.net>
|
||||
|
||||
PR c++/40749
|
||||
|
@ -810,7 +810,6 @@ cp_genericize_r (tree *stmt_p, int *walk_subtrees, void *data)
|
||||
cp_walk_tree (&BIND_EXPR_BODY (stmt),
|
||||
cp_genericize_r, data, NULL);
|
||||
VEC_pop (tree, wtd->bind_expr_stack);
|
||||
*walk_subtrees = 0;
|
||||
}
|
||||
|
||||
else if (TREE_CODE (stmt) == USING_STMT)
|
||||
|
@ -1,3 +1,8 @@
|
||||
2009-07-29 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c++/40834
|
||||
* g++.dg/torture/pr40834.C: New testcase.
|
||||
|
||||
2009-07-29 Michael Matz <matz@suse.de>
|
||||
|
||||
PR middle-end/40830
|
||||
|
52
gcc/testsuite/g++.dg/torture/pr40834.C
Normal file
52
gcc/testsuite/g++.dg/torture/pr40834.C
Normal file
@ -0,0 +1,52 @@
|
||||
/* { dg-do run } */
|
||||
|
||||
extern "C" void abort (void);
|
||||
class XalanDOMString
|
||||
{
|
||||
public:
|
||||
int y;
|
||||
};
|
||||
|
||||
class XObject
|
||||
{
|
||||
public:
|
||||
const XalanDOMString& str() const { return x; }
|
||||
XalanDOMString x;
|
||||
};
|
||||
|
||||
class XObjectPtr
|
||||
{
|
||||
public:
|
||||
XObjectPtr(const XObjectPtr& theSource)
|
||||
{
|
||||
m_xobjectPtr = theSource.m_xobjectPtr;
|
||||
}
|
||||
const XObject* operator->() const
|
||||
{
|
||||
return m_xobjectPtr;
|
||||
};
|
||||
XObjectPtr(XObject *p) { m_xobjectPtr = p; }
|
||||
XObject* m_xobjectPtr;
|
||||
};
|
||||
|
||||
class FunctionSubstringBefore
|
||||
{
|
||||
public:
|
||||
int execute( const XObjectPtr arg1) const
|
||||
{
|
||||
const XalanDOMString& theFirstString = arg1->str();
|
||||
return theFirstString.y;
|
||||
}
|
||||
};
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
XObject x;
|
||||
XObjectPtr y (&x);
|
||||
x.x.y = -1;
|
||||
FunctionSubstringBefore z;
|
||||
if (z.execute (y) != -1)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user