2010-08-11 Richard Guenther <rguenther@suse.de>
PR c/44555
* c-common.c (c_common_truthvalue_conversion): Remove
premature and wrong optimization concering ADDR_EXPRs.
* gcc.c-torture/execute/pr44555.c: New testcase.
From-SVN: r163098
+2010-08-11 Richard Guenther <rguenther@suse.de>
+
+ PR c/44555
+ * c-common.c (c_common_truthvalue_conversion): Remove
+ premature and wrong optimization concering ADDR_EXPRs.
+
2010-08-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR boehm-gc/34544
inner);
return truthvalue_true_node;
}
-
- /* If we still have a decl, it is possible for its address to
- be NULL, so we cannot optimize. */
- if (DECL_P (inner))
- {
- gcc_assert (DECL_WEAK (inner));
- break;
- }
-
- if (TREE_SIDE_EFFECTS (inner))
- return build2 (COMPOUND_EXPR, truthvalue_type_node,
- inner, truthvalue_true_node);
- else
- return truthvalue_true_node;
+ break;
}
case COMPLEX_EXPR:
+2010-08-11 Richard Guenther <rguenther@suse.de>
+
+ PR c/44555
+ * gcc.c-torture/execute/pr44555.c: New testcase.
+
2010-06-13 Uros Bizjak <ubizjak@gmail.com>
PR target/44481
--- /dev/null
+struct a {
+ char b[100];
+};
+int foo(struct a *a)
+{
+ if (&a->b)
+ return 1;
+ return 0;
+}
+extern void abort (void);
+int main()
+{
+ if (foo((struct a *)0) != 0)
+ abort ();
+ return 0;
+}