PR debug/63342
* dwarf2out.c (loc_list_from_tree): Handle MEM_REF with non-zero
offset, TARGET_MEM_REF and SSA_NAME.
* gcc.dg/pr63342.c: New test.
From-SVN: r215782
2014-10-01 Jakub Jelinek <jakub@redhat.com>
+ PR debug/63342
+ * dwarf2out.c (loc_list_from_tree): Handle MEM_REF with non-zero
+ offset, TARGET_MEM_REF and SSA_NAME.
+
* config/i386/i386.c (expand_vec_perm_palignr): Handle
256-bit vectors for TARGET_AVX2.
break;
case MEM_REF:
- /* ??? FIXME. */
if (!integer_zerop (TREE_OPERAND (loc, 1)))
- return 0;
+ {
+ have_address = 1;
+ goto do_plus;
+ }
/* Fallthru. */
case INDIRECT_REF:
list_ret = loc_list_from_tree (TREE_OPERAND (loc, 0), 0);
have_address = 1;
break;
+ case TARGET_MEM_REF:
+ case SSA_NAME:
+ return NULL;
+
case COMPOUND_EXPR:
return loc_list_from_tree (TREE_OPERAND (loc, 1), want_address);
case POINTER_PLUS_EXPR:
case PLUS_EXPR:
+ do_plus:
if (tree_fits_shwi_p (TREE_OPERAND (loc, 1)))
{
list_ret = loc_list_from_tree (TREE_OPERAND (loc, 0), 0);
2014-10-01 Jakub Jelinek <jakub@redhat.com>
+ PR debug/63342
+ * gcc.dg/pr63342.c: New test.
+
PR c++/63306
* g++.dg/ipa/pr63306.C: New test.
--- /dev/null
+/* PR debug/63342 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+static __thread double u[9], v[9];
+
+void
+foo (double **p, double **q)
+{
+ *p = u;
+ *q = v;
+}
+
+double
+bar (double x)
+{
+ int i;
+ double s = 0.0;
+ for (i = 0; i < 9; i++)
+ {
+ double a = x + v[i];
+ s += u[i] * a * a;
+ }
+ return s;
+}