This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: aarch64 gdb failures in testsuite


On Tue, Jul 25, 2017 at 12:45 PM, Steve Ellcey <sellcey@cavium.com> 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
> sellcey@cavium.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]