[Bug c++/68527] New: ICE with -fdump-ada-spec on invalid C++ 11 code
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 25 00:24:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68527
Bug ID: 68527
Summary: ICE with -fdump-ada-spec on invalid C++ 11 code
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
Recent trunk (but not 5.1) crashes while compiling the invalid program below
(derived from g++.dg/cpp0x/nsdmi-union6.C with the -fdump-ada-spec option.
$ cat x.cpp && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -Wall
-Wextra -Wpedantic -fdump-ada-spec -std=c++11 -xc++ z.cpp
struct S {
S s[1];
};
z.cpp:4:18: error: field ‘s’ has incomplete type ‘S [1]’
S s[1] = { 0 };
^
z.cpp:3:8: note: definition of ‘struct S’ is not complete until the closing
brace
struct S {
^
z.cpp:5:2: internal compiler error: tree check: expected class ‘type’, have
‘exceptional’ (error_mark) in dump_nested_types, at c-family/c-ada-spec.c:2467
};
^
0x131c5d6 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/home/msebor/scm/fsf/gcc-svn/gcc/tree.c:9657
0x72a567 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/home/msebor/scm/fsf/gcc-svn/gcc/tree.h:3115
0xa86977 dump_nested_types
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-ada-spec.c:2467
0xa88411 print_ada_declaration
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-ada-spec.c:2777
0xa80b4c print_generic_ada_decl
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-ada-spec.c:735
0xa808ce dump_ada_nodes
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-ada-spec.c:667
0xa8ab2a dump_ads
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-ada-spec.c:3389
0xa8acf4 dump_ada_specs(void (*)(char const*), int (*)(tree_node*,
cpp_operation))
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-ada-spec.c:3457
0x86c424 c_parse_final_cleanups()
/home/msebor/scm/fsf/gcc-svn/gcc/cp/decl2.c:4539
0xa6fb0b c_common_parse_file()
/home/msebor/scm/fsf/gcc-svn/gcc/c-family/c-opts.c:1091
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.
More information about the Gcc-bugs
mailing list