Commit 3581d5db by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/82095 (ICE in tree_nop_conversion at tree.c:11793 on ppc64le)

	PR middle-end/82095
	* varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
	NULL DECL_INITIAL.

	* gcc.dg/tls/pr82095.c: New test.

From-SVN: r251754
parent 58565a2e
2017-09-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82095
* varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
NULL DECL_INITIAL.
2017-09-06 Richard Biener <rguenther@suse.de> 2017-09-06 Richard Biener <rguenther@suse.de>
* gimple-ssa-strength-reduction.c * gimple-ssa-strength-reduction.c
......
2017-09-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82095
* gcc.dg/tls/pr82095.c: New test.
2017-09-05 Jakub Jelinek <jakub@redhat.com> 2017-09-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/81768 PR middle-end/81768
......
/* PR middle-end/82095 */
/* { dg-do compile } */
/* { dg-options "-Og -fno-tree-ccp" } */
/* { dg-require-effective-target tls } */
/* { dg-add-options tls } */
static int b;
static __thread int c;
void
foo (void)
{
if (b)
if (c)
b = 1;
}
...@@ -6562,8 +6562,9 @@ categorize_decl_for_section (const_tree decl, int reloc) ...@@ -6562,8 +6562,9 @@ categorize_decl_for_section (const_tree decl, int reloc)
/* Note that this would be *just* SECCAT_BSS, except that there's /* Note that this would be *just* SECCAT_BSS, except that there's
no concept of a read-only thread-local-data section. */ no concept of a read-only thread-local-data section. */
if (ret == SECCAT_BSS if (ret == SECCAT_BSS
|| (flag_zero_initialized_in_bss || DECL_INITIAL (decl) == NULL
&& initializer_zerop (DECL_INITIAL (decl)))) || (flag_zero_initialized_in_bss
&& initializer_zerop (DECL_INITIAL (decl))))
ret = SECCAT_TBSS; ret = SECCAT_TBSS;
else else
ret = SECCAT_TDATA; ret = SECCAT_TDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment