Commit 3f3fd87d by Paolo Carlini Committed by Paolo Carlini

re PR c++/58457 (ICE when placement new operator is used with using keyword and custom constructor)

/cp
2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58457
	* class.c (instantiate_type): Loosen a bit the gcc_assert.

/testsuite
2013-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58457
	* g++.dg/parse/using4.C: New.

From-SVN: r202711
parent b21abcee
2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58457
* class.c (instantiate_type): Loosen a bit the gcc_assert.
2013-09-18 Marek Polacek <polacek@redhat.com>
PR sanitize/58443
......
......@@ -7627,7 +7627,7 @@ instantiate_type (tree lhstype, tree rhs, tsubst_flags_t flags)
dependent on overload resolution. */
gcc_assert (TREE_CODE (rhs) == ADDR_EXPR
|| TREE_CODE (rhs) == COMPONENT_REF
|| really_overloaded_fn (rhs)
|| is_overloaded_fn (rhs)
|| (flag_ms_extensions && TREE_CODE (rhs) == FUNCTION_DECL));
/* This should really only be used when attempting to distinguish
......
2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58457
* g++.dg/parse/using4.C: New.
2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.c-torture/execute/pr58419.c (b): Change type to signed char.
......
// PR c++/58457
struct allocator
{
void operator delete (void*);
void* operator new (__SIZE_TYPE__, void*);
};
struct type : public allocator
{
type() {}
using allocator::operator new;
using allocator::operator delete;
};
int main()
{
new (0) type;
return 0;
}
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