On 04.11.2016 06:18, Senthil Kumar Selvaraj wrote:

Georg-Johann Lay writes:
State of matters is that Binutils support is missing, and if I understand you
correctly, dg-require is not appropriate to factor out availability of such
features?

I'll take a stab at adding the missing binutils support for avr label diffs.

Thanks for taking care of this. I had a look into it but got stuck with a test case derived from gcc.c-torture/execute/pr70460.c

int c;

__attribute__((noinline, noclone)) void
call (void)
{
  __asm ("nop");
}

__attribute__((noinline, noclone)) void
foo (int x)
{
  static int b[] = { &&lab1 - &&lab0, &&lab2 - &&lab0 };
  void *a = &&lab0 + b[x];
  goto *a;
lab1:
  c += 2;
  call();
lab2:
  c++;
lab0:
  ;
}

int
main ()
{
  foo (0);
  if (c != 3)
    __builtin_abort ();
  foo (1);
  if (c != 4)
    __builtin_abort ();
  return 0;
}


The problem is when relaxation is turned on and the CALL is shortened to RCALL but respective literals are not fixed up.

Johann

Regards
Senthil

Reply via email to