diff options
author | Jason Merrill <jason@redhat.com> | 2010-02-12 17:27:14 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-02-12 17:27:14 -0500 |
commit | da7d88bfc2d587bd1c5f670faf7832238a42ddba (patch) | |
tree | f90c444fe8095edc867c415fee70e50e53238783 | |
parent | 8150eadf308e5957e03e8285b968d45038405fed (diff) | |
download | gcc-da7d88bfc2d587bd1c5f670faf7832238a42ddba.zip gcc-da7d88bfc2d587bd1c5f670faf7832238a42ddba.tar.gz gcc-da7d88bfc2d587bd1c5f670faf7832238a42ddba.tar.bz2 |
re PR c++/43024 (ICE on template code with -O2 or -O3, regression from 4.4.2)
PR c++/43024
* name-lookup.h (current_binding_level): Check for null
cp_function_chain.
From-SVN: r156741
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/name-lookup.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 036b25f..7e37b69 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2010-02-12 Jason Merrill <jason@redhat.com> + PR c++/43024 + * name-lookup.h (current_binding_level): Check for null + cp_function_chain. + +2010-02-12 Jason Merrill <jason@redhat.com> + PR c++/43054 * tree.c (cp_tree_equal): Correct CALL_EXPR logic. diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h index 7a3625a..0851481 100644 --- a/gcc/cp/name-lookup.h +++ b/gcc/cp/name-lookup.h @@ -259,7 +259,7 @@ struct GTY(()) cp_binding_level { /* The binding level currently in effect. */ #define current_binding_level \ - (*(cfun && cp_function_chain->bindings \ + (*(cfun && cp_function_chain && cp_function_chain->bindings \ ? &cp_function_chain->bindings \ : &scope_chain->bindings)) |