* cfgexpand.c (expand_debug_expr): If for non-NULL offset
op0 is not a MEM, just return NULL instead of assertion
failure.
(discover_nonconstant_array_refs): Don't walk debug stmts.
* gcc.dg/pr43670.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158108
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/43670
+ * cfgexpand.c (expand_debug_expr): If for non-NULL offset
+ op0 is not a MEM, just return NULL instead of assertion
+ failure.
+ (discover_nonconstant_array_refs): Don't walk debug stmts.
+
2010-04-08 Doug Kwan <dougkwan@google.com>
* configure.ac: Recognize gold and do not use its version number
{
enum machine_mode addrmode, offmode;
- gcc_assert (MEM_P (op0));
+ if (!MEM_P (op0))
+ return NULL;
op0 = XEXP (op0, 0);
addrmode = GET_MODE (op0);
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple stmt = gsi_stmt (gsi);
- walk_gimple_op (stmt, discover_nonconstant_array_refs_r, NULL);
+ if (!is_gimple_debug (stmt))
+ walk_gimple_op (stmt, discover_nonconstant_array_refs_r, NULL);
}
}
+2010-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/43670
+ * gcc.dg/pr43670.c: New test.
+
2010-04-08 Maxim Kuvyrkov <maxim@codesourcery.com>
PR middle-end/40815
--- /dev/null
+/* PR debug/43670 */
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vrp -fcompare-debug" } */
+
+extern void abort (void);
+
+typedef struct { double T1; } S;
+
+void
+foo (void)
+{
+ int i, j;
+ double s;
+
+ S y[2][2];
+ S *x[2] = { y[0], y[1] };
+ S **p = x;
+
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 2; j++)
+ p[j][i].T1 = 1;
+
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 2; j++)
+ s = p[j][i].T1;
+
+ if (s != 1)
+ abort ();
+}