public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/58672] New: ICE with thread_local and variable of broken class
@ 2013-10-09 20:57 reichelt at gcc dot gnu.org
2014-01-31 17:30 ` [Bug c++/58672] [c++11] " jason 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:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58672
Bug ID: 58672
Summary: ICE with thread_local and variable of broken class
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 invalid code snippet (compiled with "-std=c++11") triggers an ICE
since GCC 4.8.0 (when thread_local was introduced):
==========================
struct A
{
A(int);
i;
};
thread_local A a(0);
==========================
bug.cc:4:3: error: 'i' does not name a type
i;
^
bug.cc: In function 'void __tls_init()':
bug.cc:7:16: internal compiler error: Segmentation fault
thread_local A a(0);
^
0xaefa5f crash_signal
../../gcc/gcc/toplev.c:335
0x7fa439 cgraph_create_function_alias(tree_node*, tree_node*)
../../gcc/gcc/cgraph.c:565
0x7fa51c cgraph_same_body_alias(cgraph_node*, tree_node*, tree_node*)
../../gcc/gcc/cgraph.c:594
0x617d7b handle_tls_init
../../gcc/gcc/cp/decl2.c:3976
0x617d7b cp_write_global_declarations()
../../gcc/gcc/cp/decl2.c:4171
Please submit a full bug report, [etc.]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58672] [c++11] ICE with thread_local and variable of broken class
2013-10-09 20:57 [Bug c++/58672] New: ICE with thread_local and variable of broken class reichelt at gcc dot gnu.org
2014-01-31 17:30 ` [Bug c++/58672] [c++11] " jason at gcc dot gnu.org
@ 2014-01-31 17:30 ` jason at gcc dot gnu.org
2014-01-31 17:31 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-31 17:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58672
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jan 31 17:30:17 2014
New Revision: 207365
URL: http://gcc.gnu.org/viewcvs?rev=207365&root=gcc&view=rev
Log:
PR c++/58672
* decl2.c (handle_tls_init): Handle null init fn.
Added:
branches/gcc-4_8-branch/gcc/testsuite/g++.dg/tls/thread_local-ice2.C
Modified:
branches/gcc-4_8-branch/gcc/cp/ChangeLog
branches/gcc-4_8-branch/gcc/cp/decl2.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58672] [c++11] ICE with thread_local and variable of broken class
2013-10-09 20:57 [Bug c++/58672] New: ICE with thread_local and variable of broken class reichelt at gcc dot gnu.org
@ 2014-01-31 17:30 ` jason at gcc dot gnu.org
2014-01-31 17:30 ` jason at gcc dot gnu.org
2014-01-31 17:31 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-31 17:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58672
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Fri Jan 31 17:30:03 2014
New Revision: 207363
URL: http://gcc.gnu.org/viewcvs?rev=207363&root=gcc&view=rev
Log:
PR c++/58672
* decl2.c (handle_tls_init): Handle null init fn.
Added:
trunk/gcc/testsuite/g++.dg/tls/thread_local-ice2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/58672] [c++11] ICE with thread_local and variable of broken class
2013-10-09 20:57 [Bug c++/58672] New: ICE with thread_local and variable of broken class reichelt at gcc dot gnu.org
2014-01-31 17:30 ` [Bug c++/58672] [c++11] " jason at gcc dot gnu.org
2014-01-31 17:30 ` jason at gcc dot gnu.org
@ 2014-01-31 17:31 ` jason at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2014-01-31 17:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58672
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Last reconfirmed|2014-01-31 00:00:00 |
CC| |jason at gcc dot gnu.org
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Target Milestone|4.9.0 |4.8.3
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.8.3/4.9.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-31 17:31 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:57 [Bug c++/58672] New: ICE with thread_local and variable of broken class reichelt at gcc dot gnu.org
2014-01-31 17:30 ` [Bug c++/58672] [c++11] " jason at gcc dot gnu.org
2014-01-31 17:30 ` jason at gcc dot gnu.org
2014-01-31 17:31 ` jason at gcc dot gnu.org
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).