diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-12-15 16:13:08 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-12-15 16:13:08 +0100 |
commit | 3efd49f9dfe125830c71d8f52a65ced5180dad88 (patch) | |
tree | 92e30d493eab99316735e2576348cdc30ab3d769 /gcc/cp | |
parent | bb194134aca9e09bc1d35c35f87a369e994e616f (diff) | |
download | gcc-3efd49f9dfe125830c71d8f52a65ced5180dad88.zip gcc-3efd49f9dfe125830c71d8f52a65ced5180dad88.tar.gz gcc-3efd49f9dfe125830c71d8f52a65ced5180dad88.tar.bz2 |
re PR c++/41183 (ICE compiling chromium)
PR c++/41183
* cp-tree.h (current_class_ptr): Give NULL even when cfun
has NULL cfun->language.
* g++.dg/torture/pr41183.C: New test.
From-SVN: r155254
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index fbfed9f..d9d758f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2009-12-15 Jakub Jelinek <jakub@redhat.com> + + PR c++/41183 + * cp-tree.h (current_class_ptr): Give NULL even when cfun + has NULL cfun->language. + 2009-12-14 Jason Merrill <jason@redhat.com> PR c++/42364 diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index eb7f06d..4e32f9b 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -1026,7 +1026,8 @@ struct GTY(()) language_function { expression for `*this'. */ #define current_class_ptr \ - (cfun ? cp_function_chain->x_current_class_ptr : NULL_TREE) + (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) |