From: Corinna Vinschen <vinschen@redhat.com>
To: gdb@sources.redhat.com
Subject: Re: What is gdb.base/structs2.exp actually testing?
Date: Mon, 08 Mar 2004 15:07:00 -0000 [thread overview]
Message-ID: <20040308150623.GA23993@cygbert.vinschen.de> (raw)
In-Reply-To: <20040308145454.GA16299@nevyn.them.org>
On Mar 8 09:54, Daniel Jacobowitz wrote:
> On Mon, Mar 08, 2004 at 03:41:54PM +0100, Corinna Vinschen wrote:
> > Hi,
> >
> > the subject already contains the question. What is the structs2 test
> > good for? It's really not clear to me. There's a PR 13536 mentioned
> > in the first line of structs2.c but this is a PRMS number and searching
> > the gdb-patches archive didn't give me any useful hint. Is PRMS still
> > accessible somewhere?
> >
> > The problem with this test is that it is based on the assumption, that
> > GCC would not optimize away unused variables. The register arguments
> > to param_reg are not reallyused, instead they only get values assigned.
> > GCC is able to recognize this and to optimize away these assignments
> > entirely, even in the non-optimize case! This happens for example on
> > the SH target.
> >
> > The consequence of this fact is that the binary doesn't contain any
> > debug information for the given register variables, so GDB doesn't know
> > about them. In turn the testcase has two fails:
> >
> > FAIL: gdb.base/structs2.exp: structs2 continue1 (PRMS 13536)
> > FAIL: gdb.base/structs2.exp: structs2 continue2 (PRMS 13536)
> >
> > due to the fact that the arguments are not printed, when the breakpoint
> > is hit:
> >
> > Breakpoint 2, param_reg () at ...
> >
> > Are these tests really useful or shouldn't they either be dropped or
> > modified to accomodate the above case?
>
> Personally, that seems like a very dubious optimization for GCC to be
> making at -O0... we can't change the calling convention at -O0, so the
> arguments are there, so GCC ought to emit enough information for us to
> find them. You didn't mention what compiler version you're testing
> with...
It happened with 3.4 and a 3.5.0 snapshot.
Corinna
--
Corinna Vinschen
Cygwin Developer
Red Hat, Inc.
next prev parent reply other threads:[~2004-03-08 15:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-08 14:42 Corinna Vinschen
2004-03-08 14:54 ` Daniel Jacobowitz
2004-03-08 15:07 ` Corinna Vinschen [this message]
2004-03-08 16:20 ` Andrew Cagney
2004-03-08 15:11 Bloch, Jack
2004-03-08 16:32 Michael Elizabeth Chastain
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=20040308150623.GA23993@cygbert.vinschen.de \
--to=vinschen@redhat.com \
--cc=gdb@sources.redhat.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