C++ PATCH: PR c++/10446

Krzysztof Parzyszek kristof@swissmail.org
Thu Apr 24 02:21:00 GMT 2003


On Tue, Apr 22, 2003 at 04:02:08PM -0700, Mark Mitchell wrote:
> 
> This patch fixes PR c++/10446, fall-out from one of the patches to
> speed up name lookup, IIRC.
> 
> Tested on i686-pc-linux-gnu, applied on the mainline and on the
> branch.

Doesn't work on FreeBSD:

(gdb) run
Starting program: /u/gcc-20030423/lib/gcc-lib/i386-unknown-freebsd4.8/3.4/cc1plus gcc-ice3.cc

Program received signal SIGSEGV, Segmentation fault.
0x080838fa in check_explicit_specialization (declarator=0x2857f180, decl=0x2857cb64, template_count=0, flags=195) at ../../gcc/gcc/cp/pt.c:1632
1632          if (ctype && CLASSTYPE_TEMPLATE_INSTANTIATION (ctype))


(gdb) bt
#0  0x080838fa in check_explicit_specialization (declarator=0x2857f180, decl=0x2857cb64, template_count=0, flags=195) at ../../gcc/gcc/cp/pt.c:1632
#1  0x0806c5c0 in grokfndecl (ctype=0x2857c948, type=0x2857ca8c, declarator=0x2857f180, orig_declarator=0x2857f180, virtualp=0, flags=NO_SPECIAL, quals=0x0, raises=0xc3, check=1, friendp=0, publicp=1, inlinep=0, funcdef_flag=1, template_count=0, in_namespace=0x2857cb64) at ../../gcc/gcc/cp/decl.c:8993
#2  0x08070d39 in grokdeclarator (declarator=0x2857f180, declspecs=0x28580050, decl_context=NORMAL, initialized=1, attrlist=0x0) at ../../gcc/gcc/cp/decl.c:11651
#3  0x08079666 in start_function (declspecs=0x28580050, declarator=0x28539bc0, attrs=0x0, flags=0) at ../../gcc/gcc/cp/decl.c:13336
#4  0x08112042 in begin_function_definition (decl_specs=0x28580050, attributes=0x0, declarator=0x28539bc0) at ../../gcc/gcc/cp/semantics.c:1649
#5  0x080e3a0f in cp_parser_function_definition_from_specifiers_and_declarator (parser=0x2857eec0, decl_specifiers=0x28580050, attributes=0x0, declarator=0x28539bc0) at ../../gcc/gcc/cp/parser.c:13791
#6  0x080e08fc in cp_parser_function_definition (parser=0x2857eec0, friend_p=0xbfbff51b) at ../../gcc/gcc/cp/parser.c:11079
#7  0x080e3ec4 in cp_parser_single_declaration (parser=0x2857eec0, member_p=false, friend_p=0xbfbff51b) at ../../gcc/gcc/cp/parser.c:14038
#8  0x080e3cba in cp_parser_template_declaration_after_export (parser=0x2857eec0, member_p=false) at ../../gcc/gcc/cp/parser.c:13924
#9  0x080dc994 in cp_parser_declaration (parser=0x2857eec0) at ../../gcc/gcc/cp/parser.c:6413
#10 0x080dc7bd in cp_parser_declaration_seq_opt (parser=0x2857eec0) at ../../gcc/gcc/cp/parser.c:6346
#11 0x080d8b8c in cp_parser_translation_unit (parser=0x2857eec0) at ../../gcc/gcc/cp/parser.c:2262
#12 0x080e4a0d in yyparse () at ../../gcc/gcc/cp/parser.c:14688
#13 0x081458f5 in c_common_parse_file (set_yydebug=0) at ../../gcc/gcc/c-opts.c:1630
#14 0x0831ad4e in compile_file () at ../../gcc/gcc/toplev.c:2204
#15 0x083200dd in do_compile () at ../../gcc/gcc/toplev.c:5576
#16 0x08320166 in toplev_main (argc=2, argv=0x0) at ../../gcc/gcc/toplev.c:5611
#17 0x08148d93 in main (argc=2, argv=0xbfbff6e8) at ../../gcc/gcc/main.c:37


(gdb) p ctype
$1 = 0x2857c948






More information about the Gcc-patches mailing list