+2009-01-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ 2009-01-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38503
+ * g++.dg/warn/Wstrict-aliasing-bogus-placement-new.C: New testcase.
+
+ 2009-01-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38745
+ * g++.dg/torture/pr38745.C: New testcase.
+
+ 2009-01-26 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/38851
+ * g++.dg/warn/Wuninitialized-1.C: New testcase.
+
+ 2009-01-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
+ Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/38747
+ PR tree-optimization/38748
+ * gcc.dg/tree-ssa/struct-aliasing-1.c: New test.
+ * gcc.c-torture/execute/struct-aliasing-1.c: Likewise.
+
2009-01-29 H.J. Lu <hongjiu.lu@intel.com>
2009-01-28 Richard Guenther <rguenther@suse.de>
--- /dev/null
+/* { dg-do compile } */
+
+union u_u16
+{
+ unsigned short v;
+ struct
+ {
+ unsigned char lo8, hi8;
+ } __attribute__ ((__may_alias__)) u;
+} __attribute__ ((__may_alias__));
+union u_u32
+{
+ unsigned int v;
+ struct
+ {
+ u_u16 lo16, hi16;
+ } u;
+} __attribute__ ((__may_alias__));
+union u_u64
+{
+ struct
+ {
+ u_u32 lo32, hi32;
+ } u;
+};
+struct Record
+{
+};
+long long
+UnpackFullKey (Record & rec, const char *&p)
+{
+ long long c64 = 0;
+ (*(u_u16 *) & (*(u_u32 *) & ( *(u_u64*)&c64).u.lo32.v).u.lo16.v).u.hi8 = 1;
+ return c64;
+}
+
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wstrict-aliasing" } */
+
+inline void *operator new (__SIZE_TYPE__, void *__p) throw() { return __p; }
+
+struct Y {
+ Y() {}
+ int i;
+};
+
+struct X {
+ X() {}
+ void construct(const Y& y)
+ {
+ new (&m_data[0]) Y(y);
+ }
+ bool initialized;
+ char m_data[sizeof (Y)];
+};
+
+void bar(const X&);
+void foo(Y& y)
+{
+ X x;
+ x.construct(y);
+ x.initialized = true;
+ bar(x);
+}
+
--- /dev/null
+/* { dg-options "-O2 -Wuninitialized" } */
+
+struct Empty { Empty() {} }; /* { dg-bogus "uninitialized" } */
+struct Other {
+ Other(const Empty& e_) : e(e_) {}
+ Empty e;
+};
+void bar(Other&);
+void foo()
+{
+ Empty e;
+ Other o(e);
+ bar(o);
+}
+
--- /dev/null
+struct S { float f; };
+int __attribute__((noinline))
+foo (int *r, struct S *p)
+{
+ int *q = (int *)&p->f;
+ int i = *q;
+ *r = 0;
+ return i + *q;
+}
+extern void abort (void);
+int main()
+{
+ int i = 1;
+ if (foo (&i, (struct S *)&i) != 1)
+ abort ();
+ return (0);
+}
--- /dev/null
+/* { dg-do "compile" } */
+/* { dg-options "-O2 -fdump-tree-fre" } */
+
+struct S { float f; };
+int __attribute__((noinline))
+foo (float *r, struct S *p)
+{
+ int *q = (int *)&p->f;
+ int i = *q;
+ *r = 0.0;
+ return i + *q;
+}
+
+/* { dg-final { scan-tree-dump-times "\\\*q" 1 "fre" } } */
+/* { dg-final { cleanup-tree-dump "fre" } } */