Comments
Patch
@@ -1,3 +1,9 @@
+2011-02-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/47715
+ * config/i386/i386.c (ix86_expand_move): Always use legitimized
+ plus const symbol reference.
+
2011-02-16 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/linux64.h (GLIBC_DYNAMIC_LINKERX32): Update
@@ -15520,13 +15520,20 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
}
}
+ if (symbol1)
+ {
+ if (GET_MODE (symbol1) != mode)
+ symbol1 = convert_to_mode (mode, symbol1, 1);
+ emit_insn (gen_rtx_SET (VOIDmode, op0, symbol1));
+ return;
+ }
+
if ((flag_pic || MACHOPIC_INDIRECT)
&& (mode == Pmode || mode == ptr_mode)
&& symbolic_operand (op1, mode))
{
if (TARGET_MACHO && !TARGET_64BIT)
{
- gcc_assert (symbol1 == NULL);
#if TARGET_MACHO
/* dynamic-no-pic */
if (MACHOPIC_INDIRECT)
@@ -15563,8 +15570,6 @@ ix86_expand_move (enum machine_mode mode, rtx operands[])
}
else
{
- if (symbol1 != NULL)
- op1 = symbol1;
if (MEM_P (op0))
op1 = force_reg (mode, op1);
else if (!TARGET_64BIT || !x86_64_movabs_operand (op1, mode))
@@ -1,3 +1,8 @@
+2011-02-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/47715
+ * gcc.target/i386/pr47715-4.c: New.
+
2011-02-16 H.J. Lu <hongjiu.lu@intel.com>
PR target/47766
new file mode 100644
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+struct gomp_team_state
+{
+ struct gomp_team_state *prev_ts;
+ unsigned team_id;
+ unsigned level;
+};
+struct gomp_thread
+{
+ void *data;
+ struct gomp_team_state ts;
+};
+extern __thread struct gomp_thread gomp_tls_data;
+int
+foo (int level)
+{
+ struct gomp_team_state *ts = &gomp_tls_data.ts;
+ if (level < 0 || level > ts->level)
+ return -1;
+ return ts->team_id;
+}