diff options
author | Martin Jambor <mjambor@suse.cz> | 2010-10-11 22:23:04 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2010-10-11 22:23:04 +0200 |
commit | 7c663eb02206a552e72c555e10270ecb2d7e5ac8 (patch) | |
tree | d47e835201f3ad092d15e204bbace52b7e8b3655 /gcc | |
parent | 579c1bf3497bbf3ad2b1a6c3da25dcb0234925b1 (diff) | |
download | gcc-7c663eb02206a552e72c555e10270ecb2d7e5ac8.zip gcc-7c663eb02206a552e72c555e10270ecb2d7e5ac8.tar.gz gcc-7c663eb02206a552e72c555e10270ecb2d7e5ac8.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/call.c | 3 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 3 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6d4095c..5b08906 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index e0911ac..d323191 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -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. */ diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index e4f2412..bfc6fd3 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -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. */ |