[Bug ada/24539] New: gdb.ada/vla.exp fails

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] New: gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

            Bug ID: 24539
           Summary: gdb.ada/vla.exp fails
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ada
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

gdb.sum:
...
PASS: gdb.ada/vla.exp: compilation vla.adb
FAIL: gdb.ada/vla.exp: print r00
FAIL: gdb.ada/vla.exp: print r01
FAIL: gdb.ada/vla.exp: print r10
FAIL: gdb.ada/vla.exp: print r22
...

gdb.log:
...
(gdb) break vla.adb:53^M
Breakpoint 1 at 0x401f84: file
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/vla/vla.adb,
line 53.^M
(gdb) run ^M
Starting program:
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.ada/vla/vla ^M
^M
Breakpoint 1, vla () at
/data/gdb_versions/devel/binutils-gdb.git/gdb/testsuite/gdb.ada/vla/vla.adb:53^M
53         Process (R00); -- Set breakpoint here^M
(gdb) print r00^M
$1 = (l1 => 0, l2 => 0, i1 => 1, a1 => (), i2 => 2, a2 => (), i3 => 3)^M
(gdb) FAIL: gdb.ada/vla.exp: print r00
print r01^M
$2 = (l1 => 0, l2 => 1, i1 => 1, a1 => (), i2 => 2, a2 => (20), i3 => 3)^M
(gdb) FAIL: gdb.ada/vla.exp: print r01
print r10^M
$3 = (l1 => 1, l2 => 0, i1 => 1, a1 => (10), i2 => 2, a2 => (), i3 => 3)^M
(gdb) FAIL: gdb.ada/vla.exp: print r10
print r22^M
$4 = (l1 => 2, l2 => 2, i1 => 1, a1 => (10, 10), i2 => 2, a2 => (20, 20), i3 =>
3)^M
(gdb) FAIL: gdb.ada/vla.exp: print r22
...

There seems to be an order discrepancy:
...
(l1 => 0, l2 => 0, i1 => 1, a1 => (), i2 => 2, a2 => (), i3 => 3)
...
vs:
...
(l1 => 0, l2 => 0, i1 => 1, i2 => 2, i3 => 3, a1 => (), a2 => ())
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
Which version of gcc/gnat are you using?

I actually think the output you are seeing is more correct,
because it's in the declaration order.  However all the compilers
I have locally seem to emit things in the wrong order.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I think for gdb it makes sense to simply accept both results.
Meanwhile I filed an internal bug report to get one of the
Gnat compiler engineers to fix the bug.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
I sent a patch.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #1)
> Which version of gcc/gnat are you using?

Default compilers on openSUSE Leap 15.0:
...
$ gnatmake --version
GNATMAKE 7.4.0
$ gcc --version
gcc (SUSE Linux) 7.4.0
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <[hidden email]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9a9e394b05a841bdd9163f280d7ef19cc65634d6

commit 9a9e394b05a841bdd9163f280d7ef19cc65634d6
Author: Tom Tromey <[hidden email]>
Date:   Wed May 29 10:21:52 2019 -0600

    Fix gdb.ada/vla.exp

    PR ada/24539 concerns a test failure in gdb.ada/vla.exp.

    The problem here is that different versions of Gnat emit the
    structure's fields in different orders -- with the order currently
    failing actually being the correct one.

    Joel pointed out that this can be fixed by simply adding the
    No_Component_Reordering pragma to the type in question, which is what
    this patch does.

    I've reported a Gnat compiler bug internally in hopes of getting the
    underlying problem fixed.

    gdb/testsuite/ChangeLog
    2019-06-14  Tom Tromey  <[hidden email]>

        PR ada/24539:
        * gdb.ada/vla.exp: Update tests.
        * gdb.ada/vla/vla.adb (Record_Type): Use No_Component_Reordering
        pragma.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug ada/24539] gdb.ada/vla.exp fails

adhemerval.zanella at linaro dot org
In reply to this post by adhemerval.zanella at linaro dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=24539

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |9.1

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.

--
You are receiving this mail because:
You are on the CC list for the bug.