From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11210 invoked by alias); 28 Aug 2014 23:06:24 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11177 invoked by uid 48); 28 Aug 2014 23:06:21 -0000 From: "lucdanton at free dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/62299] New: [4.9/5 regression] ICE with __attribute__((__weakref__(""))) and __thread Date: Thu, 28 Aug 2014 23:06:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lucdanton at free dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01927.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62299 Bug ID: 62299 Summary: [4.9/5 regression] ICE with __attribute__((__weakref__(""))) and __thread Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lucdanton at free dot fr $ g++-trunk --version g++-trunk (GCC) 5.0.0 20140828 (experimental) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ cat testcase.cpp static __typeof 0 __gthrw_pthread_once __attribute__((__weakref__(""))); template class keyword_tss_ptrnoncopyable { static __thread T *value_; }; $ g++-trunk testcase.cpp -c testcase.cpp:4:2: internal compiler error: Segmentation fault }; ^ 0xc11bff crash_signal ../../gcc/gcc/toplev.c:339 0x8a49f4 tree_check ../../gcc/gcc/tree.h:2962 0x8a49f4 symbol_table::decl_assembler_name_hash(tree_node const*) ../../gcc/gcc/symtab.c:69 0x8a4c73 symbol_table::insert_to_assembler_name_hash(symtab_node*, bool) ../../gcc/gcc/symtab.c:181 0x8a4efc symbol_table::symtab_initialize_asm_name_hash() ../../gcc/gcc/symtab.c:263 0x8a6d6f symtab_node::get_for_asmname(tree_node const*) ../../gcc/gcc/symtab.c:947 0x8b2f38 handle_alias_pairs ../../gcc/gcc/cgraphunit.c:1111 0x8b7ddc symbol_table::finalize_compilation_unit() ../../gcc/gcc/cgraphunit.c:2264 0x69cde2 cp_write_global_declarations() ../../gcc/gcc/cp/decl2.c:4666 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. ---------- This testcase was mechanically derived from preprocessed source. As best as I can tell the original __gthrw_pthread_once comes from c++/5.0.0/x86_64-unknown-linux-gnu/bits/gthr-default.h., in case that matters. The testcase is accepted by GCC 4.8 and 4.9.