+2007-12-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/34138
+ * tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars):
+ Do not forward propagate addresses if that changes volatileness of
+ the pointed-to type.
+
2007-12-05 Uros Bizjak <ubizjak@gmail.com>
PR target/34312
+2007-12-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/34138
+ * gcc.c-torture/compile/pr34138.c: New testcase.
+
2007-12-05 Jakub Jelinek <jakub@redhat.com>
PR debug/33739
--- /dev/null
+extern void free (void *__ptr);
+struct shparam
+{
+ char **p;
+ int foo;
+};
+static struct shparam shellparam;
+inline void freeparam (volatile struct shparam *param, char **ap)
+{
+ free ((void *) (*ap));
+ free ((void *) (param->p));
+}
+void dotcmd (char **p)
+{
+ freeparam (&shellparam, p);
+}
+void evaltree (void)
+{
+ void (*evalfn) (char **);
+ evalfn = dotcmd;
+}
}
if (TREE_CODE (rhs) == ADDR_EXPR
- /* We can also disregard changes in CV qualifiers for
+ /* We can also disregard changes in const qualifiers for
the dereferenced value. */
|| ((TREE_CODE (rhs) == NOP_EXPR
|| TREE_CODE (rhs) == CONVERT_EXPR)
&& TREE_CODE (TREE_OPERAND (rhs, 0)) == ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (rhs))
+ /* But do not propagate changes in volatileness. */
+ && (TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (rhs)))
+ == TYPE_VOLATILE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0)))))
&& types_compatible_p (TREE_TYPE (TREE_TYPE (TREE_OPERAND (rhs, 0))),
TREE_TYPE (TREE_TYPE (rhs)))))
{