[gomp] Handle error_mark_node returned by build_special_member_call in finish_omp_clauses (PR c++/26690)

Mark Mitchell mark@codesourcery.com
Mon Mar 20 18:38:00 GMT 2006


Jakub Jelinek wrote:
> Hi!
> 
> If an overloaded ctor etc. is ambiguous and in other cases
> build_special_member_call returns error_mark_node after issuing error.
> get_callee_fndecl doesn't allow that as an argument, so we ICE on it.
> Just avoiding the get_callee_fndecl is enough, as in that case
>           if (errorcount != save_errorcount)
>             remove = true;
> ...
>       if (remove)
>         *pc = OMP_CLAUSE_CHAIN (c);
>       else
>         pc = &OMP_CLAUSE_CHAIN (c);
> and so the result is forgotten anyway.
> 
> Ok for trunk?

I'd rather change get_callee_fndecl to return error_mark_node for
error_mark_node.  In general, having functions accept error_mark_node as
input, and immediately return it, makes it easier to avoid crashes.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list