public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration @ 2012-12-23 20:41 vlukas at gmx dot de 2013-01-07 17:19 ` [Bug c++/55801] " paolo.carlini at oracle dot com ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: vlukas at gmx dot de @ 2012-12-23 20:41 UTC (permalink / raw) To: gcc-bugs 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) --------------------------------------------------------------- ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/55801] ICE with thread_local after ill-formed forward declaration 2012-12-23 20:41 [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration vlukas at gmx dot de @ 2013-01-07 17:19 ` paolo.carlini at oracle dot com 2013-01-08 10:22 ` paolo.carlini at oracle dot com ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2013-01-07 17:19 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55801 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-01-07 Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/55801] ICE with thread_local after ill-formed forward declaration 2012-12-23 20:41 [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration vlukas at gmx dot de 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 ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2013-01-08 10:22 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55801 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot |gnu.org |com --- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-01-08 10:22:30 UTC --- On it. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/55801] ICE with thread_local after ill-formed forward declaration 2012-12-23 20:41 [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration vlukas at gmx dot de 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 4 siblings, 0 replies; 6+ messages in thread From: vlukas at gmx dot de @ 2013-01-08 10:47 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55801 --- Comment #2 from vlukas at gmx dot de 2013-01-08 10:46:55 UTC --- Thank you for working on this. Strangely, I just tested this again and could remove one line from my testcase: -------------------------------- class C; thread_local C O, O2 = O; -------------------------------------- The two lines above produce an ICE too. The line "class ::C;" was removed, it is not necessary for the ICE to occur. I thought I had tested this back in december already. This means that the title of this PR should get changed, otherwise it is misleading. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/55801] ICE with thread_local after ill-formed forward declaration 2012-12-23 20:41 [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration vlukas at gmx dot de ` (2 preceding siblings ...) 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 4 siblings, 0 replies; 6+ messages in thread From: paolo at gcc dot gnu.org @ 2013-01-09 14:44 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55801 --- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2013-01-09 14:43:59 UTC --- Author: paolo Date: Wed Jan 9 14:43:50 2013 New Revision: 195050 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195050 Log: /cp 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/55801 * decl2.c (var_needs_tls_wrapper): Return false when error_operand_p of the argument is true. /testsuite 2013-01-09 Paolo Carlini <paolo.carlini@oracle.com> PR c++/55801 * g++.dg/tls/thread_local-ice.C: New. Added: trunk/gcc/testsuite/g++.dg/tls/thread_local-ice.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl2.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/55801] ICE with thread_local after ill-formed declaration 2012-12-23 20:41 [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration vlukas at gmx dot de ` (3 preceding siblings ...) 2013-01-09 14:44 ` paolo at gcc dot gnu.org @ 2013-01-09 14:46 ` paolo.carlini at oracle dot com 4 siblings, 0 replies; 6+ messages in thread From: paolo.carlini at oracle dot com @ 2013-01-09 14:46 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55801 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED Target Milestone|--- |4.8.0 Summary|ICE with thread_local after |ICE with thread_local after |ill-formed forward |ill-formed declaration |declaration | --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2013-01-09 14:45:42 UTC --- Fixed for 4.8.0. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-01-09 14:46 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-12-23 20:41 [Bug c++/55801] New: ICE with thread_local after ill-formed forward declaration vlukas at gmx dot de 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
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).