diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 66b4e5194f9b12b990cbeaf52ce0275ca6914166..2199d83c475d6d69c237f18916e24122143fa5b5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
 2011-11-07  Jason Merrill  <jason@redhat.com>
 
+	PR c++/33255
+	* decl.c (save_function_data): Clear local_typedefs.
+
 	* decl.c (cp_finish_decl): Only make_tree_vector if we're calling
 	check_initializer.
 
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 3b283d83d2686016d419304e57889d0b1b7bf637..63da51d79d96850044143a5d801713ce537a0eaf 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -13021,6 +13021,7 @@ save_function_data (tree decl)
   f->base.x_stmt_tree.x_cur_stmt_list = NULL;
   f->bindings = NULL;
   f->x_local_names = NULL;
+  f->base.local_typedefs = NULL;
 }