Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: aarch64 gdb failures in testsuite
@ 2017-07-25 19:45 Steve Ellcey
  2017-07-25 22:13 ` Andrew Pinski
  0 siblings, 1 reply; 5+ messages in thread
From: Steve Ellcey @ 2017-07-25 19:45 UTC (permalink / raw)
  To: gdb


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.

Steve Ellcey
sellcey@cavium.com


^ permalink raw reply	[flat|nested] 5+ messages in thread
* aarch64 gdb failures in testsuite
@ 2017-07-25 17:16 Steve Ellcey
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Ellcey @ 2017-07-25 17:16 UTC (permalink / raw)
  To: gdb

I am getting some aarch64 gdb failures that do not seem to be showing up 
in other peoples test runs from the gdb-testers mailing list and I was
wondering if anyone could help me figure out why these tests are failing
for me.

As an example, here is gdb.base/store.exp.  In my test case I am
getting this failuire:

Temporary breakpoint 9, wack_doublest (u=-1, v=-2) at /home/sellcey/gdb-std/src/binutils-gdb/gdb/testsuite/gdb.base/store.c:125
125       register doublest l = u, r = v;
(gdb) next
126       l = add_doublest (l, r);
(gdb) PASS: gdb.base/store.exp: continue to wack_doublest
print l
$29 = -1
(gdb) PASS: gdb.base/store.exp: var doublest l; print old l, expecting -1
print r
$30 = <optimized out>
(gdb) FAIL: gdb.base/store.exp: var doublest l; print old r, expecting -2
set variable l = 4


But when I look at https://sourceware.org/ml/gdb-testers/2017-q3/msg01016.html
and look at the gdb.log file I see it passes there:


Temporary breakpoint 9, wack_doublest (u=-1, v=-2) at /home/qiyao/buildbot/ubuntu-aarch64-m64/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/store.c:125
125       register doublest l = u, r = v;
(gdb) next
126       l = add_doublest (l, r);
(gdb) PASS: gdb.base/store.exp: continue to wack_doublest
print l
$29 = -1
(gdb) PASS: gdb.base/store.exp: var doublest l; print old l, expecting -1
print r
$30 = -2
(gdb) PASS: gdb.base/store.exp: var doublest l; print old r, expecting -2
set variable l = 4


In looking for differences in the runs I see the passing test uses GCC 4.8.4
and I am using GCC 5.4.0 (Ubuntu 16.04).  I don't think that should make
a difference but maybe it does.

I looked at the compiler options since for something to be <optimized out>
I assume we would have to be compiling with some optimization option but
both compilers are just using -g.

spawn -ignore SIGHUP gcc /home/sellcey/gdb-std/obj/binutils-gdb/gdb/testsuite/outputs/gdb.base/store/store0.o -g -lm -o /home/sellcey/gdb-std/obj/binutils-gdb/gdb/testsuite/outputs/gdb.base/store/store

I compiled the test case (gdb/testsuite/gdb.base/store.c) with -g using
the system GCC (5.4.0) and then ran the system GDB on it to see what
happened there and I get the same <optimized out> message there that I
do with the latest GDB sources.

% gcc -g store.c -o x
% gdb x

(gdb) b wack_doublest
Breakpoint 1 at 0x4008cc: file store.c, line 125.
(gdb) r
Starting program: /home/sellcey/gdb-std/x 

Breakpoint 1, wack_doublest (u=-1, v=-2) at store.c:125
125	  register doublest l = u, r = v;
(gdb) n
126	  l = add_doublest (l, r);
(gdb) print l
$1 = -1
(gdb) print r
$2 = <optimized out>


Any ideas on what is happening here?  Does anyone else get this failure?

Steve Ellcey
sellcey@cavium.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-26 17:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 19:45 aarch64 gdb failures in testsuite Steve Ellcey
2017-07-25 22:13 ` Andrew Pinski
2017-07-25 22:26   ` Steve Ellcey
2017-07-26 17:51     ` Steve Ellcey
  -- strict thread matches above, loose matches on Subject: below --
2017-07-25 17:16 Steve Ellcey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox