public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/47207] New: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p, at cp/decl2.c:3563 on invalid code
Date: Fri, 07 Jan 2011 11:58:00 -0000	[thread overview]
Message-ID: <bug-47207-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47207

           Summary: [4.6 Regression] [C++0x] ICE: in decl_constant_var_p,
                    at cp/decl2.c:3563 on invalid code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
                CC: gcc@abeckmann.de


----- testcase.C -----
constexpr X (X);
----------------------
The same as PR46564 comment #2, but probably different than PR46564 comment #0

Compiler output:
$ gcc -std=c++0x testcase.C 
testcase.C:1:14: error: ISO C++ forbids declaration of 'X' with no type
[-fpermissive]
testcase.C:1:14: 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=0x7fffffffd36c, integral_constant_expression_p=1 '\001',
allow_non_integral_constant_expression_p=1 '\001', 
    non_integral_constant_expression_p=0x7ffff5cdc02d "", template_p=0 '\000',
done=1 '\001', address_p=0 '\000', 
    template_arg_p=0 '\000', error_msg=0x7fffffffd2e8, location=102)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/semantics.c:3105
#3  0x00000000005d8fdc in cp_parser_primary_expression (parser=0x7ffff5cdc000,
address_p=0 '\000', 
    cast_p=<value optimized out>, template_arg_p=0 '\000', idk=0x7fffffffd36c)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:4005
#4  0x00000000005d9c40 in cp_parser_postfix_expression (parser=0x7ffff5cdc000,
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=0x7ffff5cdc000,
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=0x7ffff5cdc000,
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=0x7ffff5cdc000, 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=0x7ffff5cdc000,
allow_non_constant_p=<value optimized out>, 
    non_constant_p=0x7fffffffd63f "") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:7261
#9  0x00000000005dccf7 in cp_parser_parenthesized_expression_list
(parser=0x7ffff5cdc000, is_attribute_list=0, 
    cast_p=0 '\000', allow_expansion_p=1 '\001', non_constant_p=0x7fffffffd71f
"")
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:5722
#10 0x00000000005e337c in cp_parser_initializer (parser=0x7ffff5cdc000,
is_direct_init=0x7fffffffd71e "\001", 
    non_constant_p=0x7fffffffd71f "") at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:16458
#11 0x00000000005e42dd in cp_parser_init_declarator (parser=0x7ffff5cdc000,
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=0x7ffff5cdc000,
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=0x7ffff5cdc000,
statement_p=0 '\000')
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9587
#14 cp_parser_block_declaration (parser=0x7ffff5cdc000, statement_p=0 '\000')
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9521
#15 0x00000000005ed8f2 in cp_parser_declaration (parser=0x7ffff5cdc000)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9492
#16 cp_parser_declaration (parser=0x7ffff5cdc000) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cp/parser.c:9399
#17 0x00000000005ec41a in cp_parser_declaration_seq_opt (parser=0x7ffff5cdc000)
    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


             reply	other threads:[~2011-01-07 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 11:58 zsojka at seznam dot cz [this message]
2011-01-07 14:57 ` [Bug c++/47207] " hjl.tools at gmail dot com
2011-01-19 20:58 ` jakub at gcc dot gnu.org
2011-02-21 15:12 ` jason at gcc dot gnu.org
2011-02-21 15:54 ` jason at gcc dot gnu.org
2011-02-21 17:21 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-47207-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).