Commit 5cb96b6a by Uros Bizjak

re PR target/77991 (ICE on x32 in plus_constant, at explow.c:87)

	PR target/77991
	* config/i386/i386.c (legitimize_tls_address)
	<case TLS_MODEL_INITIAL_EXEC>: For TARGET_64BIT || TARGET_ANY_GNU_TLS
	convert dest to Pmode if different than Pmode.

testsuite/ChangeLog:

	PR target/77991
	* gcc.target/i386/pr77991.c: New test.

From-SVN: r241308
parent 812ba636
2016-10-18 Uros Bizjak <ubizjak@gmail.com>
PR target/77991
* config/i386/i386.c (legitimize_tls_address)
<case TLS_MODEL_INITIAL_EXEC>: For TARGET_64BIT || TARGET_ANY_GNU_TLS
convert dest to Pmode if different than Pmode.
2016-10-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2016-10-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/77916 PR tree-optimization/77916
......
...@@ -16357,7 +16357,9 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov) ...@@ -16357,7 +16357,9 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov)
base = get_thread_pointer (tp_mode, base = get_thread_pointer (tp_mode,
for_mov || !TARGET_TLS_DIRECT_SEG_REFS); for_mov || !TARGET_TLS_DIRECT_SEG_REFS);
off = force_reg (tp_mode, off); off = force_reg (tp_mode, off);
return gen_rtx_PLUS (tp_mode, base, off); dest = gen_rtx_PLUS (tp_mode, base, off);
if (tp_mode != Pmode)
dest = convert_to_mode (Pmode, dest, 1);
} }
else else
{ {
2016-10-18 Uros Bizjak <ubizjak@gmail.com>
PR target/77991
* gcc.target/i386/pr77991.c: New test.
2016-10-18 Matthew Fortune <matthew.fortune@imgtec.com> 2016-10-18 Matthew Fortune <matthew.fortune@imgtec.com>
* lib/gcc-dg.exp: Set gcc_force_conventional_output whenever * lib/gcc-dg.exp: Set gcc_force_conventional_output whenever
...@@ -5,8 +10,7 @@ ...@@ -5,8 +10,7 @@
2016-10-18 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com> 2016-10-18 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/sso/sso.exp: Return early if not * gcc.dg/sso/sso.exp: Return early if not effective_target_int32.
effective_target_int32.
2016-10-18 Richard Biener <rguenther@suse.de> 2016-10-18 Richard Biener <rguenther@suse.de>
...@@ -228,8 +232,8 @@ ...@@ -228,8 +232,8 @@
* g++.dg/ext/flexary18.C: New test. * g++.dg/ext/flexary18.C: New test.
* g++.dg/torture/pr64312.C: Add a dg-error directive to an ill-formed * g++.dg/torture/pr64312.C: Add a dg-error directive to an ill-formed
regression test. regression test.
* g++.dg/compat/struct-layout-1_generate.c (subfield): Add argument. * g++.dg/compat/struct-layout-1_generate.c (subfield): Add argument.
Avoid generating a flexible array member in an array. Avoid generating a flexible array member in an array.
2016-10-13 Martin Sebor <msebor@redhat.com> 2016-10-13 Martin Sebor <msebor@redhat.com>
...@@ -706,7 +710,7 @@ ...@@ -706,7 +710,7 @@
* gcc.dg/torture/pr77855.c: New testcase. * gcc.dg/torture/pr77855.c: New testcase.
2016-10-06 James Clarke <jrtc27@jrtc27.com> 2016-10-06 James Clarke <jrtc27@jrtc27.com>
Eric Botcazou <ebotcazou@adacore.com> Eric Botcazou <ebotcazou@adacore.com>
* g++.dg/other/pr77759.C: New test. * g++.dg/other/pr77759.C: New test.
......
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-require-effective-target maybe_x32 } */
/* { dg-options "-O2 -mx32 -maddress-mode=short" } */
struct rcu_reader_data
{
unsigned ctr;
_Bool waiting;
}
extern __thread rcu_reader;
void rcu_read_lock()
{
struct rcu_reader_data *x = &rcu_reader;
_Bool val = 0;
__atomic_store(&x->waiting, &val, 0);
}
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