public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Ada: unable to compare strings (Attempt to compare array with non-array)
@ 2017-12-14  5:57 sergiodj+buildbot
  2017-12-14  5:57 ` Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master sergiodj+buildbot
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: sergiodj+buildbot @ 2017-12-14  5:57 UTC (permalink / raw)
  To: gdb-testers

*** TEST RESULTS FOR COMMIT 79e8fcaafa92e7b4a74e510c5487e87c60ff1945 ***

Author: Joel Brobecker <brobecker@adacore.com>
Branch: master
Commit: 79e8fcaafa92e7b4a74e510c5487e87c60ff1945

Ada: unable to compare strings (Attempt to compare array with non-array)

Consider the following Ada Code:

   type Str is new String (1 .. 4);
   My_str : Str := "ABCD";

This simply declares a 4-character string type. Trying to perform
equality tests using it currently yield an error:

    (gdb) p my_str = my_str
    Attempt to compare array with non-array
    (gdb) p my_str = "ABCD"
    Attempt to compare array with non-array

The error occurs because my_str is defined as an object whose
type is a typdef to a TYPE_CODE_ARRAY, which ada_value_equal
is not expecting at all (yet). This patch fixes this oversight.

gdb/ChangeLog:

        * ada-lang.c (ada_value_equal): Add handling of typedef types
        when comparing array objects.

gdb/testsuite/ChangeLog:

        * gdb.ada/str_binop_equal: New testcase.

Tested on x86_64-linux.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-12-14  8:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14  5:57 [binutils-gdb] Ada: unable to compare strings (Attempt to compare array with non-array) sergiodj+buildbot
2017-12-14  5:57 ` Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master sergiodj+buildbot
2017-12-14  6:28 ` Failures on Ubuntu-AArch64-m64, " sergiodj+buildbot
2017-12-14  6:34 ` Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-12-14  6:58 ` Failures on Fedora-x86_64-m64, " sergiodj+buildbot
2017-12-14  7:16 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2017-12-14  7:25 ` Failures on Ubuntu-AArch32-m32, " sergiodj+buildbot
2017-12-14  7:29 ` Failures on Fedora-i686, " sergiodj+buildbot
2017-12-14  7:45 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-12-14  7:50 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2017-12-14  8:06 ` Failures on Fedora-x86_64-native-gdbserver-m64, " sergiodj+buildbot
2017-12-14  8:13 ` Failures on Fedora-x86_64-m32, " sergiodj+buildbot
2017-12-14  8:35 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot

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