public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58671] New: ICE with thread_local and self-referential variable initialization
@ 2013-10-09 20:52 reichelt at gcc dot gnu.org
  2013-10-10  5:16 ` [Bug c++/58671] [c++11] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-10-09 20:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58671
           Summary: ICE with thread_local and self-referential variable
                    initialization
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following valid code line(compiled with "-std=c++11") triggers an ICE since
GCC 4.8.0 (when thread_local was introduced):

==============================
thread_local int i = i;
==============================

bug.cc:1:22: internal compiler error: in var_defined_without_dynamic_init, at
cp/decl2.c:2836
 thread_local int i = i;
                      ^
0x60966a var_defined_without_dynamic_init
        ../../gcc/gcc/cp/decl2.c:2836
0x60966a var_needs_tls_wrapper
        ../../gcc/gcc/cp/decl2.c:2852
0x6164db get_tls_wrapper_fn(tree_node*)
        ../../gcc/gcc/cp/decl2.c:2950
0x6b612f finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*,
bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int)
        ../../gcc/gcc/cp/semantics.c:3387
0x63fc90 cp_parser_primary_expression
        ../../gcc/gcc/cp/parser.c:4539
0x641890 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:5814
0x64405d cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7009
0x644c2f cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:7701
0x6450ef cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:7937
0x645546 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:7987
0x645546 cp_parser_constant_expression
        ../../gcc/gcc/cp/parser.c:8197
0x6512ae cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16530
0x65187f cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:10995
0x653700 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:10876
0x65c73e cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10773
0x65b4aa cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10659
0x65cd76 cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:3939
0x65cd76 c_parse_file()
        ../../gcc/gcc/cp/parser.c:28911
0x770903 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1046
Please submit a full bug report, [etc.]


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-14 22:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-09 20:52 [Bug c++/58671] New: ICE with thread_local and self-referential variable initialization reichelt at gcc dot gnu.org
2013-10-10  5:16 ` [Bug c++/58671] [c++11] " mpolacek at gcc dot gnu.org
2015-01-14 22:28 ` paolo at gcc dot gnu.org
2015-01-14 22:29 ` paolo.carlini at oracle dot com

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).