+2006-11-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR rtl-opt/28812
+ * alias.c (fixed_scalar_and_varying_struct_p): Don't return a
+ non null value if the struct memory access is in the 0th
+ aliasing set.
+
2006-11-12 Jie Zhang <jie.zhang@analog.com>
Revert
if (! flag_strict_aliasing)
return NULL_RTX;
- if (MEM_SCALAR_P (mem1) && MEM_IN_STRUCT_P (mem2)
+ if (MEM_ALIAS_SET (mem2)
+ && MEM_SCALAR_P (mem1) && MEM_IN_STRUCT_P (mem2)
&& !varies_p (mem1_addr, 1) && varies_p (mem2_addr, 1))
/* MEM1 is a scalar at a fixed address; MEM2 is a struct at a
varying address. */
return mem1;
- if (MEM_IN_STRUCT_P (mem1) && MEM_SCALAR_P (mem2)
+ if (MEM_ALIAS_SET (mem1)
+ && MEM_IN_STRUCT_P (mem1) && MEM_SCALAR_P (mem2)
&& varies_p (mem1_addr, 1) && !varies_p (mem2_addr, 1))
/* MEM2 is a scalar at a fixed address; MEM1 is a struct at a
varying address. */
+2006-11-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ PR rtl-opt/28812
+ * gcc.c-torture/execute/mayalias-3.c: New test.
+
2006-11-11 Richard Sandiford <richard@codesourcery.com>
PR middle-end/27528
2006-11-10 Paul Thomas <pault@gcc.gnu.org>
- PR fortran/29758
- * gfortran.dg/reshape_source_size_1.f90: New test.
+ PR fortran/29758
+ * gfortran.dg/reshape_source_size_1.f90: New test.
2006-11-10 Paul Thomas <pault@gcc.gnu.org>
2006-11-10 Uros Bizjak <ubizjak@gmail.com>
PR target/29777
- * lib/target-supports.exp (vect_widen_mult_hi_to_si): Add i?86-*-*
+ * lib/target-supports.exp (vect_widen_mult_hi_to_si): Add i?86-*-*
and x86_64-*-* targets.
2006-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
--- /dev/null
+struct S { short x; };
+typedef struct S __attribute__((__may_alias__)) test;
+
+test *p;
+
+int g(int *a)
+{
+ p = (test*)a;
+}
+
+int f()
+{
+ int a;
+ g(&a);
+ a = 10;
+ test s={1};
+ *p=s;
+ return a;
+}
+
+int main() {
+ if (f() == 10)
+ __builtin_abort();
+ return 0;
+}
+
+