http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52841
--- Comment #8 from fabien at gcc dot gnu.org 2012-04-17 21:08:13 UTC --- It is related to alias declarations. It seems that we do not recover properly from a failure in cp_parser_alias_declaration, in the block introduced by this check: "if (!(flags & CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES))", around here: #0 cp_parser_simple_type_specifier (parser=0x7ffff571b738, decl_specs=0x7fffffffdd00, flags=1) at ../../gcc/gcc/cp/parser.c:13651 #1 0x00000000006be5e0 in cp_parser_type_specifier (parser=0x7ffff571b738, flags=1, decl_specs=0x7fffffffdd00, is_declaration=0 '\000', declares_class_or_enum=0x0, is_cv_qualifier=0x7fffffffdcde "") at ../../gcc/gcc/cp/parser.c:13434 #2 0x00000000006c5c96 in cp_parser_type_specifier_seq (parser=0x7ffff571b738, is_declaration=0 '\000', is_trailing_return=0 '\000', type_specifier_seq=0x7fffffffdd00) at ../../gcc/gcc/cp/parser.c:16887 #3 0x00000000006c5a63 in cp_parser_type_id_1 (parser=0x7ffff571b738, is_template_arg=0 '\000', is_trailing_return=0 '\000') at ../../gcc/gcc/cp/parser.c:16771 #4 0x00000000006c5b57 in cp_parser_type_id (parser=0x7ffff571b738) at ../../gcc/gcc/cp/parser.c:16810 #5 0x00000000006c1987 in cp_parser_alias_declaration (parser=0x7ffff571b738) at ../../gcc/gcc/cp/parser.c:15101 I can't find what goes wrong there. The good news is that it seems to work if we return earlier in cp_parser_alias_declaration -- which I think is better --, like in the attached patch. Perhaps Dodji (or Jason) can take a closer look ?