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: r156740
This commit is contained in:
Jason Merrill 2010-02-12 17:27:04 -05:00 committed by Jason Merrill
parent 16013fea58
commit 1c8d9a1ff4
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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 Jakub Jelinek <jakub@redhat.com>
PR c++/43033

View File

@ -263,7 +263,7 @@ struct cp_binding_level GTY(())
/* 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))