public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vlukas at gmx dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration Date: Sun, 23 Dec 2012 20:41:00 -0000 [thread overview] Message-ID: <bug-55801-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55801 Bug #: 55801 Summary: ICE with thread_local after ill-formed forward declaration Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: vlukas@gmx.de The following ill-formed snippet: --------------------------------------------------------- class C; class ::C; thread_local C O, O2 = O; -------------------------------------------------------- Compiled with "c++ -std=c++0x -c" produces an ICE: -------------------------------------------------------- thread_local.ice.gcc-4.8.cc:2:9: warning: declaration 'class C' does not declare anything [enabled by default] class ::C; ^ thread_local.ice.gcc-4.8.cc:3:16: error: aggregate 'C O' has incomplete type and cannot be defined thread_local C O, O2 = O; ^ thread_local.ice.gcc-4.8.cc:3:19: error: variable 'C O2' has initializer but incomplete type thread_local C O, O2 = O; ^ thread_local.ice.gcc-4.8.cc:3:24: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in var_defined_without_dynamic_init, at cp/decl2.c:2795 thread_local C O, O2 = O; ^ 0xc6ef89 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) ../../gcc_svn/gcc/tree.c:9007 0x5e1bfc tree_class_check ../../gcc_svn/gcc/tree.h:3794 0x5e1bfc var_defined_without_dynamic_init ../../gcc_svn/gcc/cp/decl2.c:2795 0x5e1bfc var_needs_tls_wrapper ../../gcc_svn/gcc/cp/decl2.c:2813 0x5eeb6b get_tls_wrapper_fn(tree_node*) ../../gcc_svn/gcc/cp/decl2.c:2876 0x698816 finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*, bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int) ../../gcc_svn/gcc/cp/semantics.c:3296 0x61586d cp_parser_primary_expression ../../gcc_svn/gcc/cp/parser.c:4395 0x61736a cp_parser_postfix_expression ../../gcc_svn/gcc/cp/parser.c:5630 0x61987a cp_parser_unary_expression ../../gcc_svn/gcc/cp/parser.c:6686 0x61a3f7 cp_parser_binary_expression ../../gcc_svn/gcc/cp/parser.c:7360 0x61a885 cp_parser_assignment_expression ../../gcc_svn/gcc/cp/parser.c:7585 0x61acc4 cp_parser_constant_expression ../../gcc_svn/gcc/cp/parser.c:7816 0x626dfe cp_parser_init_declarator ../../gcc_svn/gcc/cp/parser.c:15986 0x62738e cp_parser_simple_declaration ../../gcc_svn/gcc/cp/parser.c:10562 0x629160 cp_parser_block_declaration ../../gcc_svn/gcc/cp/parser.c:10443 0x631d4b cp_parser_declaration ../../gcc_svn/gcc/cp/parser.c:10340 0x630a1d cp_parser_declaration_seq_opt ../../gcc_svn/gcc/cp/parser.c:10226 0x6322c2 cp_parser_translation_unit ../../gcc_svn/gcc/cp/parser.c:3808 0x6322c2 c_parse_file() ../../gcc_svn/gcc/cp/parser.c:28177 0x738854 c_common_parse_file() ../../gcc_svn/gcc/c-family/c-opts.c:1023 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. -------------------------------------------------------------- Output of "c++ -v" is: -------------------------------------------------------------- Using built-in specs. COLLECT_GCC=/home/lima/vanilla_installs/gcc_and_tools/bin/c++ COLLECT_LTO_WRAPPER=/home/lima/vanilla_installs/gcc_and_tools/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc_svn/configure --prefix=/home/lima/vanilla_installs/gcc_and_tools --enable-__cxa_atexit --enable-languages=c,c++ --disable-nls --disable-multilib Thread model: posix gcc version 4.8.0 20121223 (experimental) (GCC) ---------------------------------------------------------------
next reply other threads:[~2012-12-23 20:41 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-12-23 20:41 vlukas at gmx dot de [this message] 2013-01-07 17:19 ` [Bug c++/55801] " paolo.carlini at oracle dot com 2013-01-08 10:22 ` paolo.carlini at oracle dot com 2013-01-08 10:47 ` vlukas at gmx dot de 2013-01-09 14:44 ` paolo at gcc dot gnu.org 2013-01-09 14:46 ` [Bug c++/55801] ICE with thread_local after ill-formed declaration 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-55801-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: linkBe 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).