https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88554

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> Started to ICE (rather than give a -Wreturn-type diagnostic) with r263298
> 
>     Add fix-it hint for missing return statement in assignment operators (PR
> c++/85523)

Hmm, apparently this commit has my name on it too.

It fails in contains_struct_check because __t is null:

#0  0x00000000008d37a5 in contains_struct_check (__t=0x0, __s=TS_TYPED,
__f=0x18dc780 "/home/jwakely/src/gcc/gcc/gcc/cp/decl.c", __l=16096,
__g=0x18e5640 <finish_function(bool)::__FUNCTION__> "finish_function") at
/home/jwakely/src/gcc/gcc/gcc/tree.h:3270
#1  0x00000000008ce6f7 in finish_function (inline_p=true) at
/home/jwakely/src/gcc/gcc/gcc/cp/decl.c:16096
#2  0x000000000097260a in cp_parser_function_definition_after_declarator
(parser=parser@entry=0x7ffff7ff6ab0, inline_p=inline_p@entry=true) at
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:27498
#3  0x000000000097382d in cp_parser_late_parsing_for_member(cp_parser*,
tree_node*) () at /home/jwakely/src/gcc/gcc/gcc/cp/parser.c:28379
#4  0x0000000000953f62 in cp_parser_class_specifier_1(cp_parser*) () at
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:23384
#5  0x00000000009552fa in cp_parser_class_specifier (parser=0x7ffff7ff6ab0) at
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:23410
#6  cp_parser_type_specifier(cp_parser*, int, cp_decl_specifier_seq*, bool,
int*, bool*) () at /home/jwakely/src/gcc/gcc/gcc/cp/parser.c:17266
#7  0x00000000009562cc in cp_parser_decl_specifier_seq(cp_parser*, int,
cp_decl_specifier_seq*, int*) () at
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:27347
#8  0x00000000009569d1 in cp_parser_simple_declaration(cp_parser*, bool,
tree_node**) () at /home/jwakely/src/gcc/gcc/gcc/cp/parser.c:13292
#9  0x0000000000979c93 in cp_parser_declaration(cp_parser*) () at
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:13111
#10 0x000000000097a43d in cp_parser_translation_unit (parser=0x7ffff7ff6ab0) at
/home/jwakely/src/gcc/gcc/gcc/cp/parser.c:4688
#11 c_parse_file() () at /home/jwakely/src/gcc/gcc/gcc/cp/parser.c:40855
#12 0x0000000000a83f21 in c_common_parse_file () at
/home/jwakely/src/gcc/gcc/gcc/c-family/c-opts.c:1151
#13 0x0000000000f1decf in compile_file () at
/home/jwakely/src/gcc/gcc/gcc/toplev.c:456
#14 0x00000000008184aa in do_compile () at
/home/jwakely/src/gcc/gcc/gcc/toplev.c:2176
#15 toplev::main(int, char**) () at /home/jwakely/src/gcc/gcc/gcc/toplev.c:2311
#16 0x000000000081ba9b in main (argc=20, argv=0x7fffffffd848) at
/home/jwakely/src/gcc/gcc/gcc/main.c:39

That comes from TREE_TYPE (current_class_ref) where current_class_ref is null.

Reply via email to