This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] Handle error_mark_node returned by build_special_member_call in finish_omp_clauses (PR c++/26690)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Mar 2006 10:38:02 -0800
- Subject: Re: [gomp] Handle error_mark_node returned by build_special_member_call in finish_omp_clauses (PR c++/26690)
- References: <20060320152647.GR20301@devserv.devel.redhat.com>
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