Re: aarch64 gdb failures in testsuite

Andrew Pinski <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CA+=Sn1kmymF0+6BvtyKsVeXpd4SG-PkbhvPVgM94pHMpJpRJDw@mail.gmail.com>
On Tue, Jul 25, 2017 at 12:45 PM, Steve Ellcey <[email protected]> wrote:
>
> Following up to my own mail at
> ttps://sourceware.org/ml/gdb/2017-07/msg00037.html
>
> It looks like the problem is with the GCC compiler.  If I use
> GCC 4.8.4 to run the gdb.base/store.c test case it works,
> if I use GCC 5.4.0 it does not.  I actually get around 50 or
> more gdb failures when I use GCC 5.4.0 rather than GCC 4.8.0.
> I believe that this may be due to aarch64 changing over from
> reload to lra during this timeframe.
>
> I have also found that the test case works if I remove the
> register keywords from the test.  Apparently the register
> keyword is ignored when optimizing but not at -O0.

function.c:
/* Return true if we should assign DECL a pseudo register; false if it
   should live on the local stack.  */

bool
use_register_for_decl (const_tree decl)
{

....

  if (optimize)
    return true;

  if (!DECL_REGISTER (decl))
    return false;

  /* When not optimizing, disregard register keyword for types that
     could have methods, otherwise the methods won't be callable from
     the debugger.  */
  if (RECORD_OR_UNION_TYPE_P (TREE_TYPE (decl)))
    return false;

  return true;
}

--------- CUT ------

This code has been that way since 2009 (r144939) but that function
returned true for DECL_REGISTER before that.

Thanks,
Andrew Pinski


>
> Steve Ellcey
> [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.