Re: [RFA/commit] (SPARC/LEON) fix incorrect array return value printed by "finish"

vladimir.mezentsev
2018-04-30T22:58:23Z

Hi Joel,

On 04/30/2018 03:51 PM, Joel Brobecker wrote:
> Hi Vladimir,
>
> On Tue, Apr 24, 2018 at 05:11:36AM -0700, Joel Brobecker wrote:
>>> Â I never usedÂ  ada and it looks like a bug in ada compiler not in gdb.
>>> Probably ada generates incorrect code for function which returns a small
>>> array.
>>>
>>> The similar cÂ  test works:
>>> % cat r.c
>>> #include <stdio.h>
>>>
>>> typedef int __attribute__ ((vector_size (2 * sizeof(int)))) I2;
>> A vector and an array are not treated the same. So your example
>> is actually not quite equivalent. And this is the reason behind
>> the first part of my analysis that said we need to both check
>> TYPE_CODE_ARRAY *and* the TYPE_VECTOR flag.
>>
>> You'll also note that I explicitly made sure that gnu_vectors.exp
>> still passes for me, and so I'm fairly sure that the "similar C test"
>> you cooked up above still works as well. But if you could give my patch
>> a try on Solaris to double-check (eg: by running gnu_vector.exp after
>> applying it), that would be a second confirmation.
> Was my explanation satisfactory to you?

Â  yes.Â  Your fix looks good to me.

-Vladimir

> Did you want to test my change
> on Solaris before we decide whether to go for this patch or not?
>