From: Jason Merrill Date: Fri, 18 Mar 2011 15:07:13 +0000 (-0400) Subject: re PR c++/48162 (447.dealII in SPEC CPU 2006 failed to build) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3f1cee49f3f9c59cfb7e05a7dc7a2b6e480305a;p=gcc.git re PR c++/48162 (447.dealII in SPEC CPU 2006 failed to build) PR c++/48162 * semantics.c (finish_call_expr): Allow TARGET_EXPR for now. From-SVN: r171148 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9578f1abf36..e187dee2230 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-03-18 Jason Merrill + PR c++/48162 + * semantics.c (finish_call_expr): Allow TARGET_EXPR for now. + PR c++/48118 * call.c (build_over_call): Don't skip ck_rvalue. diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index b6d1008b490..41ab8589dad 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2155,6 +2155,9 @@ finish_call_expr (tree fn, VEC(tree,gc) **args, bool disallow_virtual, if (TREE_CODE (result) == INDIRECT_REF) result = TREE_OPERAND (result, 0); gcc_assert (TREE_CODE (result) == CALL_EXPR + /* FIXME cp_build_function_call_vec should avoid argument + and return transformations like build_over_call does. */ + || TREE_CODE (result) == TARGET_EXPR || TREE_CODE (fn) == PSEUDO_DTOR_EXPR || errorcount); result = build_call_vec (TREE_TYPE (result), orig_fn, orig_args); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b0f4f53566d..c362faf5333 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2011-03-18 Jason Merrill + * g++.dg/template/fn-ptr1.C: New. + * g++.dg/overload/volatile1.C: New. * g++.dg/opt/pr23372.C: New. diff --git a/gcc/testsuite/g++.dg/template/fn-ptr1.C b/gcc/testsuite/g++.dg/template/fn-ptr1.C new file mode 100644 index 00000000000..c0e7d988524 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/fn-ptr1.C @@ -0,0 +1,5 @@ +// PR c++/48162 + +struct A { }; +A (*f)(); +template void g() { f(); }