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

            Bug ID: 65646
           Summary: ICE in invalid syntax
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de

Hi,

on current trunk (snapshot gcc-5-20150329, r221765)

the following file causes an ICE:

$ cat test.cpp 
const_iterator
#include <sstream>

$ g++ test.cpp
.... lots of warnings/errors, and then:
/home/ed/gnu/install/include/c++/5.0.0/istream:451:14: note: previous
declaration 'std::basic_istream<char>::__istream_type&
std::basic_istream<char>::ignore'
/home/ed/gnu/install/include/c++/5.0.0/istream: At global scope:
/home/ed/gnu/install/include/c++/5.0.0/istream:648:29: error: 'streamsize' has
not been declared
     getline(char_type* __s, streamsize __n, char_type __delim);
                             ^
/home/ed/gnu/install/include/c++/5.0.0/istream:653:12: error:
'std::basic_istream<char>& std::basic_istream<char>::ignore' is not a static
data member of 'class std::basic_istream<char>'
     ignore(streamsize __n);
            ^
/home/ed/gnu/install/include/c++/5.0.0/istream:653:12: error: 'streamsize' was
not declared in this scope
/home/ed/gnu/install/include/c++/5.0.0/istream:653:26: internal compiler error:
Segmentation fault
     ignore(streamsize __n);
                          ^
0xce846f crash_signal
    ../../gcc-5-20150329/gcc/toplev.c:383
0x719f29 tree_check(tree_node*, char const*, int, char const*, tree_code)
    ../../gcc-5-20150329/gcc/tree.h:2845
0x719f29 determine_visibility(tree_node*)
    ../../gcc-5-20150329/gcc/cp/decl2.c:2392
0x68172d cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
    ../../gcc-5-20150329/gcc/cp/decl.c:6696
0x761031 cp_parser_init_declarator
    ../../gcc-5-20150329/gcc/cp/parser.c:17299
0x76175c cp_parser_single_declaration
    ../../gcc-5-20150329/gcc/cp/parser.c:23811
0x7621dd cp_parser_explicit_specialization
    ../../gcc-5-20150329/gcc/cp/parser.c:14622
0x76f1bf cp_parser_declaration
    ../../gcc-5-20150329/gcc/cp/parser.c:11331
0x76d86a cp_parser_declaration_seq_opt
    ../../gcc-5-20150329/gcc/cp/parser.c:11264
0x76e0e5 cp_parser_namespace_body
    ../../gcc-5-20150329/gcc/cp/parser.c:16268
0x76e0e5 cp_parser_namespace_definition
    ../../gcc-5-20150329/gcc/cp/parser.c:16249
0x76f169 cp_parser_declaration
    ../../gcc-5-20150329/gcc/cp/parser.c:11366
0x76d86a cp_parser_declaration_seq_opt
    ../../gcc-5-20150329/gcc/cp/parser.c:11264
0x76db7f cp_parser_translation_unit
    ../../gcc-5-20150329/gcc/cp/parser.c:4100
0x76db7f c_parse_file()
    ../../gcc-5-20150329/gcc/cp/parser.c:33192
0x8a0502 c_common_parse_file()
    ../../gcc-5-20150329/gcc/c-family/c-opts.c:1057
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.

Reply via email to