+2011-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46491
+ Backported from mainline
+ 2010-05-14 Jan Hubicka <jh@suse.cz>
+
+ * ipa-pure-const.c (check_stmt): Do not use memory_identifier_string.
+
2011-03-30 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
for (i = 0; i < gimple_asm_nclobbers (stmt); i++)
{
op = gimple_asm_clobber_op (stmt, i);
- if (simple_cst_equal(TREE_VALUE (op), memory_identifier_string) == 1)
+ if (strcmp (TREE_STRING_POINTER (TREE_VALUE (op)), "memory") == 0)
/* Abandon all hope, ye who enter here. */
local->pure_const_state = IPA_NEITHER;
}
+2011-04-07 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2010-11-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/46491
+ * gcc.target/i386/pr46491.c: New test.
+
2011-03-09 Jason Merrill <jason@redhat.com>
* g++.dg/template/nontype22.C: New.
--- /dev/null
+/* PR tree-optimization/46491 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-ipa-reference" } */
+
+extern void abort (void);
+
+__attribute__((noinline)) int
+foo (int *p)
+{
+ int r;
+ asm ("movl $6, (%1)\n\txorl %0, %0" : "=r" (r) : "r" (p) : "memory");
+ return r;
+}
+
+int
+main (void)
+{
+ int p = 8;
+ if ((foo (&p) ? : p) != 6)
+ abort ();
+ return 0;
+}