From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [testsuite patch] Fix C++11 compilation failure for gdb.cp/m-static.exp
Date: Thu, 15 Sep 2016 13:11:00 -0000 [thread overview]
Message-ID: <ba2eda55-ddb2-f2dd-0691-ceac5044840f@redhat.com> (raw)
In-Reply-To: <20160915123424.GA8875@host1.jankratochvil.net>
On 09/15/2016 01:34 PM, Jan Kratochvil wrote:
> On Thu, 15 Sep 2016 14:22:54 +0200, Pedro Alves wrote:
>> Did you try moving the initialization to the .cc file? Like:
>>
>> const float gnu_obj_4::somewhere = 3.14159;
>>
>> Did you find a reason to not do that?
>
> I have found that it may invalidate the testcase some way so I stayed on the
> safe side. I have read now briefly the .exp file and it does have some XFAIL
> around "extra CU-level DW_TAG_variable as DW_AT_declaration".
>
> But those compiler bugs should be forgotten now so I am fine even with this
> new patch below.
>
Hmm, OK, now that I read the test, I think you were right in trying to
keep it safe, actually. The .exp file has:
# static const initialized in the class definition, PR gdb/11702.
if { $non_dwarf } { setup_xfail *-*-* }
gdb_test "print test4.everywhere" "\\$\[0-9\].* = 317" "static const int initialized in class definition"
if { $non_dwarf } { setup_xfail *-*-* }
gdb_test "print test4.somewhere" "\\$\[0-9\].* = 3.14\[0-9\]*" "static const float initialized in class definition"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Added by this:
https://sourceware.org/bugzilla/show_bug.cgi?id=11702
https://sourceware.org/ml/gdb-patches/2010-06/msg00677.html
https://sourceware.org/ml/gdb-patches/2010-06/txt00011.txt
So the new patch would make that highlighted tested above not
test what its test message says it is testing.
So I now think your original patch is better. Please push
that one instead.
(Even better would be to rewrite the test using the
dwarf assembler, but that'd of course be much more work.)
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-09-15 13:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-11 14:22 Jan Kratochvil
2016-09-15 12:22 ` Pedro Alves
2016-09-15 12:34 ` Jan Kratochvil
2016-09-15 13:11 ` Pedro Alves [this message]
2016-09-15 21:47 ` [commit] " Jan Kratochvil
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=ba2eda55-ddb2-f2dd-0691-ceac5044840f@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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