public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@us.ibm.com>
To: will schmidt <will_schmidt@vnet.ibm.com>, gdb-patches@sourceware.org
Cc: Rogerio Alves <rogealve@br.ibm.com>, cel@us.ibm.com
Subject: Re: [PATCH] Powerpc, fix vla-optimized-out.exp test
Date: Fri, 25 Mar 2022 08:26:17 -0700	[thread overview]
Message-ID: <c4c3aa66086083076d28e8f7e404dd37c0172b74.camel@us.ibm.com> (raw)
In-Reply-To: <e01de848c78bff70921cf5f06a639329c2e81692.camel@vnet.ibm.com>

Will:

> 
> The variable in this case is actually just 'a'.   The vla reference
> in
> the exp appears to be a copy/paste leftover from the nearby vla-ptr.c
> test.

Ok

> 
> > On Powerpc, the use of vla and the size of vla are both optimized
> > out.
> 
> I fear this shortcuts the intent of the test.   Can you instead
> update
> the test in a way that prevents 'a' from being optimized out? 

The test is run with -O1 and -03 optimization levels.  The test talks
about the the effect of lower and higher optimization leves,
specifically:

    # At higher optimisation levels, the array bounds themselves have           
    # been removed.  As such GDB can't be expected to know if the               
    # array contains _any_ elements at all.  It seems reasonable in             
    # that case to reply with 'no such vector element'.  

It seems to me that the test expects the value to be optimized out. 
Since the comments clearly talk about effects of the variable being
optimized out, changing the test to ensure variable a is not optimized
out would actually be consistent the point of the test.

                       Carl Love 


  reply	other threads:[~2022-03-25 15:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 21:41 Carl Love
2022-03-24 22:46 ` will schmidt
2022-03-25 15:26   ` Carl Love [this message]
2022-03-28 15:34     ` Carl Love
2022-04-17 15:19       ` Joel Brobecker
2022-06-09 17:23         ` Carl Love
2022-06-23 14:19           ` 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=c4c3aa66086083076d28e8f7e404dd37c0172b74.camel@us.ibm.com \
    --to=cel@us.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=rogealve@br.ibm.com \
    --cc=will_schmidt@vnet.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).