[Bug c++/63693] New: ICE c-opts.c:1067

rippey.e at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Oct 30 22:45:00 GMT 2014


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

            Bug ID: 63693
           Summary: ICE c-opts.c:1067
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rippey.e at gmail dot com

With gcc 4.9.2 or 4.9.1 running:

g++ --std=c++11 ch3.cpp

with the contents of ch3.cpp being:

"template<typename T>
class C{
 T t;
 decltype(t)::a::"

will produce:

ch3.cpp:4:2: internal compiler error: Segmentation fault
  decltype(t)::a::
  ^
0x91b6df crash_signal
        ../../gcc-4.9.2/gcc/toplev.c:337
0x532c2a resolve_typename_type(tree_node*, bool)
        ../../gcc-4.9.2/gcc/cp/pt.c:21479
0x576cb1 cp_parser_nested_name_specifier_opt
        ../../gcc-4.9.2/gcc/cp/parser.c:5186
0x574343 cp_parser_id_expression
        ../../gcc-4.9.2/gcc/cp/parser.c:4711
0x57454f cp_parser_parse_and_diagnose_invalid_type_name
        ../../gcc-4.9.2/gcc/cp/parser.c:3024
0x58fa44 cp_parser_member_declaration
        ../../gcc-4.9.2/gcc/cp/parser.c:20256
0x571460 cp_parser_member_specification_opt
        ../../gcc-4.9.2/gcc/cp/parser.c:20108
0x571460 cp_parser_class_specifier_1
        ../../gcc-4.9.2/gcc/cp/parser.c:19336
0x571460 cp_parser_class_specifier
        ../../gcc-4.9.2/gcc/cp/parser.c:19563
0x571460 cp_parser_type_specifier
        ../../gcc-4.9.2/gcc/cp/parser.c:14339
0x582a60 cp_parser_decl_specifier_seq
        ../../gcc-4.9.2/gcc/cp/parser.c:11575
0x58e2b3 cp_parser_single_declaration
        ../../gcc-4.9.2/gcc/cp/parser.c:23181
0x58e774 cp_parser_template_declaration_after_export
        ../../gcc-4.9.2/gcc/cp/parser.c:23050
0x592389 cp_parser_declaration
        ../../gcc-4.9.2/gcc/cp/parser.c:10975
0x590ef8 cp_parser_declaration_seq_opt
        ../../gcc-4.9.2/gcc/cp/parser.c:10897
0x5926fa cp_parser_translation_unit
        ../../gcc-4.9.2/gcc/cp/parser.c:4028
0x5926fa c_parse_file()
        ../../gcc-4.9.2/gcc/cp/parser.c:31701
0x63ab23 c_common_parse_file()
        ../../gcc-4.9.2/gcc/c-family/c-opts.c:1067
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
/disk/0/erippey/series2_we_qa/csrc/reduce>g++ --version
g++ (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Obviously this example is not valid C++.  It was arrived at by taking a much
longer program which was believed to be valid C++ and removing parts without
regard to validity.



More information about the Gcc-bugs mailing list