This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47208] New: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p, at cp/decl2.c:3563 with missing #include <initializer_list>
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 7 Jan 2011 12:01:41 +0000
- Subject: [Bug c++/47208] New: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p, at cp/decl2.c:3563 with missing #include <initializer_list>
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47208
Summary: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p,
at cp/decl2.c:3563 with missing #include
<initializer_list>
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
------ testcase.C ------
constexpr auto list = { };
static const int l = list.size();
------------------------
Compiler output:
$ gcc -std=c++0x testcase.C
testcase.C:1:25: error: deducing from brace-enclosed initializer list requires
#include <initializer_list>
testcase.C:1:25: error: unable to deduce '<type error>' from '<brace-enclosed
initializer list>()'
testcase.C:2:22: internal compiler error: in decl_constant_var_p, at
cp/decl2.c:3563
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(gdb) bt
#0 fancy_abort (file=0x1210188
"/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl2.c", line=3563,
function=0x1211120 "decl_constant_var_p") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/diagnostic.c:892
#1 0x00000000005b69b8 in decl_constant_var_p (decl=0x7ffff7ee71e0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/decl2.c:3563
#2 0x0000000000644318 in finish_id_expression (id_expression=0x7ffff5cdaf78,
decl=0x7ffff7ee71e0, scope=0x0,
idk=0x7fffffffd3fc, integral_constant_expression_p=1 '\001',
allow_non_integral_constant_expression_p=1 '\001',
non_integral_constant_expression_p=0x7ffff5cdc0dd "", template_p=0 '\000',
done=0 '\000', address_p=0 '\000',
template_arg_p=0 '\000', error_msg=0x7fffffffd378, location=238)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:3105
#3 0x00000000005d8fdc in cp_parser_primary_expression (parser=0x7ffff5cdc0b0,
address_p=0 '\000',
cast_p=<value optimized out>, template_arg_p=0 '\000', idk=0x7fffffffd3fc)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:4005
#4 0x00000000005d9c40 in cp_parser_postfix_expression (parser=0x7ffff5cdc0b0,
address_p=0 '\000', cast_p=0 '\000',
member_access_only_p=0 '\000', pidk_return=0x0) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:5163
#5 0x00000000005da8bb in cp_parser_unary_expression (parser=0x7ffff5cdc0b0,
address_p=0 '\000', cast_p=0 '\000', pidk=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:6147
#6 0x00000000005db188 in cp_parser_binary_expression (parser=0x7ffff5cdc0b0,
cast_p=<value optimized out>,
no_toplevel_fold_p=0 '\000', prec=PREC_NOT_OPERATOR, pidk=<value optimized
out>)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:6817
#7 0x00000000005db6a3 in cp_parser_assignment_expression
(parser=0x7ffff5cdc0b0, cast_p=0 '\000', pidk=0x0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7036
#8 0x00000000005dc0f9 in cp_parser_constant_expression (parser=0x7ffff5cdc0b0,
allow_non_constant_p=<value optimized out>,
non_constant_p=0x7fffffffd71f "") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7261
#9 0x00000000005dc604 in cp_parser_initializer_clause (parser=<value optimized
out>, non_constant_p=0x7fffffffd71f "")
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16509
#10 cp_parser_initializer_clause (parser=<value optimized out>,
non_constant_p=0x7fffffffd71f "")
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16497
#11 0x00000000005e42dd in cp_parser_init_declarator (parser=0x7ffff5cdc0b0,
decl_specifiers=0x7fffffffd780, checks=0x0,
function_definition_allowed_p=0 '\000', member_p=0 '\000',
declares_class_or_enum=0,
function_definition_p=0x7fffffffd7ef "") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:14683
#12 0x00000000005e987b in cp_parser_simple_declaration (parser=0x7ffff5cdc0b0,
function_definition_allowed_p=1 '\001')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9689
#13 0x00000000005e9be7 in cp_parser_block_declaration (parser=0x7ffff5cdc0b0,
statement_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9587
#14 cp_parser_block_declaration (parser=0x7ffff5cdc0b0, statement_p=0 '\000')
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9521
#15 0x00000000005ed8f2 in cp_parser_declaration (parser=0x7ffff5cdc0b0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9492
#16 cp_parser_declaration (parser=0x7ffff5cdc0b0) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9399
#17 0x00000000005ec41a in cp_parser_declaration_seq_opt (parser=0x7ffff5cdc0b0)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9378
#18 0x00000000005edf69 in cp_parser_translation_unit () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:3461
#19 c_parse_file () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:25214
#20 0x00000000006c2195 in c_common_parse_file () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/c-family/c-opts.c:1071
#21 0x0000000000a24598 in compile_file (argc=14, argv=0x7fffffffdab8)
at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:579
#22 do_compile (argc=14, argv=0x7fffffffdab8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1874
#23 toplev_main (argc=14, argv=0x7fffffffdab8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1937
#24 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6
#25 0x00000000004fef2d in _start ()
Tested revisions:
r168552 - crash
r165699 - OK
4.5 r168062 - OK