Commit df9ee5c8 by Paolo Carlini Committed by Paolo Carlini

re PR c++/50858 (segfault at ../../gcc/libiberty/hashtab.c:981)

/cp
2011-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50858
	* typeck.c (composite_pointer_type_r): Check return value of
	composite_pointer_type_r for error_mark_node.

/testsuite
2011-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50858
	* g++.dg/overload/operator5.C: New.

/cp
2011-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50861
	* pt.c (tsubst_copy_and_build): Check return value of
	tsubst_copy_and_build for error_mark_node.

/testsuite
2011-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/50861
	* g++.dg/template/crash108.C: New.

From-SVN: r180430
parent 4bc51432
2011-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50858
* typeck.c (composite_pointer_type_r): Check return value of
composite_pointer_type_r for error_mark_node.
2011-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50861
* pt.c (tsubst_copy_and_build): Check return value of
tsubst_copy_and_build for error_mark_node.
2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50841
......
......@@ -13511,6 +13511,9 @@ tsubst_copy_and_build (tree t,
tree unq = (tsubst_copy_and_build
(function, args, complain, in_decl, true,
integral_constant_expression_p));
if (unq == error_mark_node)
return error_mark_node;
if (unq != function)
{
tree fn = unq;
......
......@@ -510,8 +510,12 @@ composite_pointer_type_r (tree t1, tree t2,
&& TREE_CODE (pointee2) == POINTER_TYPE)
|| (TYPE_PTR_TO_MEMBER_P (pointee1)
&& TYPE_PTR_TO_MEMBER_P (pointee2)))
result_type = composite_pointer_type_r (pointee1, pointee2, operation,
complain);
{
result_type = composite_pointer_type_r (pointee1, pointee2, operation,
complain);
if (result_type == error_mark_node)
return error_mark_node;
}
else
{
if (complain & tf_error)
......
2011-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50858
* g++.dg/overload/operator5.C: New.
2011-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/50861
* g++.dg/template/crash108.C: New.
2011-10-25 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/50596
......
// PR c++/50858
class String {
typedef struct ImplicitConversionFromWTFStringToBoolDisallowedA*
(String::*UnspecifiedBoolTypeA);
typedef struct ImplicitConversionFromWTFStringToBoolDisallowedB*
(String::*UnspecifiedBoolTypeB);
operator UnspecifiedBoolTypeA() const;
operator UnspecifiedBoolTypeB() const;
};
inline bool equalIgnoringCase(const String& a, const String& b) { }
inline bool equalPossiblyIgnoringCase(const String& a,
const String& b,
bool ignoreCase) {
return ignoreCase ? equalIgnoringCase(a, b) : (a == b); } // { dg-error "ambiguous" }
// { dg-message "note" { target *-*-* } 15 }
// PR c++/50861
template<class T> struct A {A(int b=k(0));}; // { dg-error "arguments" }
void f(int k){A<int> a;} // // { dg-error "parameter|declared" }
// { dg-message "note" { target *-*-* } 3 }
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