[Bug debug/82718] Bad DWARF5 .debug_loclists generation

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Oct 25 17:41:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82718

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2017-10-25
                 CC|                            |jakub at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Target Milestone|---                         |7.3
     Ever confirmed|0                           |1

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly simplified testcase:
/* PR debug/82718 */
/* { dg-do assemble } */
/* { dg-options "-O2 -gdwarf-5" } */

extern int e;
extern long foo (int, void *, unsigned long, unsigned long);
struct S
{
  int f;
  unsigned long t, s;
};

static inline long
bv (int x, void *y, unsigned long z, unsigned long w)
{
  long a = 0;
  do
    {
      long g;
      do
        g = (long int) (foo (x, y + a, z - a, w + a));
      while (g == -1L && e == 9959);
      if (g <= 0)
        return g < 0 ? g : a;
      a += g;
    }
  while ((unsigned long) a < z);
  return a;
}

const char *
baz (struct S *x)
{
  unsigned long h = 8;
  char *j = 0;
  unsigned long z = x->f;
  if (__builtin_expect (!!((unsigned long) bv (x->f, j, z, x->t + h + 10) !=
z), 0))
    return 0;
  x->s = z;
  return j;
}

The problem is that secname on the .LVL* labels doesn't reflect the section
switch.  I'll handle this tomorrow.


More information about the Gcc-bugs mailing list