+2007-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/33856
+ * tree-data-ref.c (get_references_in_stmt): Don't add
+ REFERENCE_CLASS_P trees to references vector if get_base_address
+ returns NULL on them.
+
2007-11-05 Alexandre Oliva <aoliva@redhat.com>
* cfg.c (dump_cfg_bb_info): Update bb_bitnames to match enum.
2007-11-05 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/33856
+ * gcc.c-torture/compile/20071027-1.c: New test.
+
PR c++/33836
* g++.dg/ext/label10.C: New test.
--- /dev/null
+/* PR tree-optimization/33856 */
+/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
+
+typedef struct z_key
+{
+ int key;
+ int mask;
+} z_key;
+typedef struct picture_size
+{
+ z_key key;
+} picture_size;
+
+void picture_size_new (picture_size *ps)
+{
+ z_key key;
+ ps->key = key;
+}
+
+void picture_sizes_load_default (picture_size *ps)
+{
+ int i;
+ for (i = 0; i < 5; ++i)
+ picture_size_new (ps);
+}
op1 = &GIMPLE_STMT_OPERAND (stmt, 1);
if (DECL_P (*op1)
- || REFERENCE_CLASS_P (*op1))
+ || (REFERENCE_CLASS_P (*op1) && get_base_address (*op1)))
{
ref = VEC_safe_push (data_ref_loc, heap, *references, NULL);
ref->pos = op1;
}
if (DECL_P (*op0)
- || REFERENCE_CLASS_P (*op0))
+ || (REFERENCE_CLASS_P (*op0) && get_base_address (*op0)))
{
ref = VEC_safe_push (data_ref_loc, heap, *references, NULL);
ref->pos = op0;
op0 = &CALL_EXPR_ARG (call, i);
if (DECL_P (*op0)
- || REFERENCE_CLASS_P (*op0))
+ || (REFERENCE_CLASS_P (*op0) && get_base_address (*op0)))
{
ref = VEC_safe_push (data_ref_loc, heap, *references, NULL);
ref->pos = op0;