diff options
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/crash51.C | 9 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash9.C | 6 |
5 files changed, 25 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 876cb7f..ff63c61 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2009-01-27 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/37554 + * call.c (build_over_call): If convert_for_arg_passing returns + error_mark_node unconditionally return it. + 2009-01-22 Adam Nemet <anemet@caviumnetworks.com> * class.c (check_field_decls): Also inherit packed for bitfields diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 09dc57d..f13e3bd 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -5276,7 +5276,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) (conv, TREE_VALUE (arg), fn, i - is_method, complain); val = convert_for_arg_passing (type, val); - if ((complain == tf_none) && val == error_mark_node) + if (val == error_mark_node) return error_mark_node; else argarray[j++] = val; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e1c767a..8f1ceb8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-01-27 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/37554 + * g++.dg/parse/crash51.C: New. + * g++.old-deja/g++.pt/crash9.C: Adjust. + 2009-01-27 Daniel Kraft <d@domob.eu> PR fortran/38883 diff --git a/gcc/testsuite/g++.dg/parse/crash51.C b/gcc/testsuite/g++.dg/parse/crash51.C new file mode 100644 index 0000000..03fcd36 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash51.C @@ -0,0 +1,9 @@ +// PR c++/37554 + +struct A {}; +class B : A {}; + +void foo(B b) +{ + (A)b; // { dg-error "inaccessible base" } +} diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash9.C b/gcc/testsuite/g++.old-deja/g++.pt/crash9.C index dab0e4c..20bd758 100644 --- a/gcc/testsuite/g++.old-deja/g++.pt/crash9.C +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash9.C @@ -1,11 +1,11 @@ // { dg-do assemble } template <class T> -void f(T) {} // { dg-error "" } parameter has incomplete type +void f(T) {} -class C; // { dg-error "" } forward declaration +class C; // { dg-error "forward declaration" } void g(const C& c) { - f(c); // { dg-error "" } invalid use of undefined type + f(c); // { dg-error "invalid use of incomplete type|initializing argument" } } |