public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "arnez at linux dot vnet.ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/54826] New: gdb test case failure (bs15503) due to gaps in lexical block
Date: Fri, 05 Oct 2012 14:49:00 -0000	[thread overview]
Message-ID: <bug-54826-4@http.gcc.gnu.org/bugzilla/> (raw)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54826

             Bug #: 54826
           Summary: gdb test case failure (bs15503) due to gaps in lexical
                    block
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arnez@linux.vnet.ibm.com


Current upstream gcc causes a regression with the gdb test case
bs15503.exp:
FAIL: gdb.cp/bs15503.exp: print s.length()
FAIL: gdb.cp/bs15503.exp: print s[0]
FAIL: gdb.cp/bs15503.exp: print s[s.length()-1]
FAIL: gdb.cp/bs15503.exp: print (const char *) s
FAIL: gdb.cp/bs15503.exp: print (const char *) s.substr(0,4)
FAIL: gdb.cp/bs15503.exp: print (const char *) (s=s.substr(0,4))

What happens is that the DWARF output for bs15503.cc wraps the string
variable "s" from StringTest<wchar_t>::testFunction() in a lexical
block with spurious gaps.  The test case happens to set a break point
into one of these gaps and tries to access the variable from there,
which gdb (correctly) refuses.

For reference, here's a link to the source code:
http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/src/gdb/testsuite/gdb.cp/bs15503.cc?rev=1.11&cvsroot=src

I've verified the failure on x86_64 and s390x.  The regression was
introduced by: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191494


             reply	other threads:[~2012-10-05 14:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 14:49 arnez at linux dot vnet.ibm.com [this message]
2012-10-05 22:48 ` [Bug debug/54826] " dehao at gcc dot gnu.org
2012-10-06  2:27 ` dehao at gcc dot gnu.org
2012-10-06 16:20 ` dehao at gcc dot gnu.org
2012-10-08 12:08 ` rguenth at gcc dot gnu.org
2012-10-09  9:02 ` arnez at linux dot vnet.ibm.com

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=bug-54826-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).