Re: [PATCH] Fix type of imported variable for arraydim.exp

Tom Tromey <[email protected]> Mon, 03 Aug 2026 07:29:32 -0600
Newsgroups gmane.comp.gdb.patches
Message-ID <[email protected]>
>>>>> "Tom" == Tom de Vries <[email protected]> writes:

Tom> On 7/30/26 6:59 PM, Tom Tromey wrote:
>> The test code for gdb.ada/arraydim.exp imports a variable using a
>> dummy type.  Then the test tries to print the type of this variable.
>> This works ok with GCC, because the import is emitted as a
>> declaration; but this fails with gnat-llvm, where a definition is
>> emitted.
>> This seems to be a test bug to me.  This patch fixes the problem by
>> using the correct type here.

Tom> Do I understand it correctly that there are two (independent) issues:
Tom> - decl vs def: fixed in arraydim.exp
Tom> - dummy type vs correct type: fixed in arraydim/foo.adb
Tom> ?

More or less.  If the compiler emits a declaration in the DWARF, the
test works ok.  This is the GCC case.  But gnat-llvm emits a definition
instead, which seems completely valid to me; but since the type is wrong
the test fails.

Tom