Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: vladimir.mezentsev@oracle.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] (SPARC/LEON) fix incorrect array return value printed by "finish"
Date: Tue, 24 Apr 2018 12:11:00 -0000	[thread overview]
Message-ID: <20180424121136.42oiuprwhfnvslzg@adacore.com> (raw)
In-Reply-To: <ae19fbb2-396c-e478-c204-b311e95a71ca@oracle.com>

>  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.

-- 
Joel


  reply	other threads:[~2018-04-24 12:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 17:45 Joel Brobecker
2018-04-24  7:18 ` vladimir.mezentsev
2018-04-24 12:11   ` Joel Brobecker [this message]
2018-04-30 22:51     ` Joel Brobecker
2018-04-30 22:58       ` vladimir.mezentsev
2018-05-04 18:34         ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180424121136.42oiuprwhfnvslzg@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vladimir.mezentsev@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox