* gimplify.c (gimplify_type_sizes): Gimplify DECL_SIZE and
DECL_SIZE_UNIT of variable length FIELD_DECLs.
* gcc.c-torture/compile/pr39394.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144727
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39394
+ * gimplify.c (gimplify_type_sizes): Gimplify DECL_SIZE and
+ DECL_SIZE_UNIT of variable length FIELD_DECLs.
+
2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* recog.c (verfiy_changes): Disallow renaming of hard regs in
if (TREE_CODE (field) == FIELD_DECL)
{
gimplify_one_sizepos (&DECL_FIELD_OFFSET (field), list_p);
+ gimplify_one_sizepos (&DECL_SIZE (field), list_p);
+ gimplify_one_sizepos (&DECL_SIZE_UNIT (field), list_p);
gimplify_type_sizes (TREE_TYPE (field), list_p);
}
break;
+2009-03-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/39394
+ * gcc.c-torture/compile/pr39394.c: New test.
+
2009-03-09 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* gcc.target/s390/20090223-1.c: New testcase.
--- /dev/null
+/* PR tree-optimization/39394 */
+
+char *p;
+int x;
+
+static inline void
+f1 (int n)
+{
+ asm volatile ("" : "=m" (*(struct { char x[n]; } *) p));
+}
+
+static inline void
+f2 (void)
+{
+ x ? f1 (1) : f1 (2);
+}
+
+static inline void
+f3 (void)
+{
+ f2 ();
+}
+
+void
+f4 (void)
+{
+ f3 ();
+}