This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]