Commit 7c663eb0 by Martin Jambor Committed by Martin Jambor

re PR c++/45562 (ICE: SIGSEGV in cp_build_unary_op (typeck.c:5083) with…

re PR c++/45562 (ICE: SIGSEGV in cp_build_unary_op (typeck.c:5083) with -std=gnu++0x -fipa-cp-clone -fcompare-debug)

2010-10-11  Martin Jambor  <mjambor@suse.cz>

	PR c++/45562
	* cp/cp-tree.h (current_class_ref): Check that cp_function_chain is
	non-NULL.
	* cp/call.c (build_cxx_call): Likewise.

From-SVN: r165330
parent 579c1bf3
2010-10-11 Martin Jambor <mjambor@suse.cz>
PR c++/45562
* cp-tree.h (current_class_ref): Check that cp_function_chain is
non-NULL.
* call.c (build_cxx_call): Likewise.
2010-10-10 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
......
......@@ -6082,7 +6082,8 @@ build_cxx_call (tree fn, int nargs, tree *argarray)
fndecl = get_callee_fndecl (fn);
if ((!fndecl || !TREE_NOTHROW (fndecl))
&& at_function_scope_p ()
&& cfun)
&& cfun
&& cp_function_chain)
cp_function_chain->can_throw = 1;
/* Check that arguments to builtin functions match the expectations. */
......
......@@ -1055,7 +1055,8 @@ struct GTY(()) language_function {
(cfun && cp_function_chain \
? cp_function_chain->x_current_class_ptr : NULL_TREE)
#define current_class_ref \
(cfun ? cp_function_chain->x_current_class_ref : NULL_TREE)
((cfun && cp_function_chain) \
? cp_function_chain->x_current_class_ref : NULL_TREE)
/* The EH_SPEC_BLOCK for the exception-specifiers for the current
function, if any. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment