This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] New gdb.ada/repeat_dyn testcase.
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 30 Nov 2017 19:13:13 -0500
- Subject: [binutils-gdb] New gdb.ada/repeat_dyn testcase.
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 875fb7a785e78fddef6da270636e8f4efbfd3e0d ***
Author: Joel Brobecker <brobecker@adacore.com>
Branch: master
Commit: 875fb7a785e78fddef6da270636e8f4efbfd3e0d
New gdb.ada/repeat_dyn testcase.
This patch introduces a testcase that exercises a scenario
which used to trigger an internal-error, but no longer does:
Consider the following array:
type Small is new Integer range Ident (1) .. Ident (10);
type Table is array (1 .. 3) of Small;
A1 : Table := (3, 5, 8);
The particularity of this array is that the type of each element
is a range type whose bounds are dynamic, since they depend on
the value returned by Ident (1) and Ident (10). Trying to apply
the repeat operator ('@') on one of its elements used to yield
an internal error:
(gdb) p a1(1)@3
$1 =
/[...]/gdbtypes.c:4512: internal-error:
copy_type: Assertion `TYPE_OBJFILE_OWNED (type)' failed.
Although the issue no longer appears, the testcase is still
interesting to have.
gdb/testsuite/ChangeLog:
* gdb.ada/repeat_dyn: New testcase.
Tested on x86_64-linux with clean results.