gdb/gdb-testsuite-casts.patch
Michael Matz a2f8e1d8c6 - Update to gdb 7.12.1
* negative repeat count for x examines backwards
  * fortran: support structs/arrays with dynamically types fields
  * support MPX bound checking
  * support for the Rust language
  * 'catch syscall' now can catch groups of related syscalls
  * New (sub)commands:
    - skip {-file,-gfile,-function,-rfunction}: generic skip
      mechanism
    - maint {selftest,info line-table}
    - new-ui: create new user interface for GUI clients
  * (fast) tracepoints on s390x and ppc64le added to gdbserver
  * New target Andes NDS32
- Remove patch gdb-aarch64-v81-hwbreakpoints.diff (upstream)
- Add patches from Fedora package:
    gdb-6.7-testsuite-stable-results.patch
    gdb-add-index-chmod.patch
    gdb-bison-old.patch
    gdb-container-rh-pkg.patch
    gdb-libexec-add-index.patch
    gdb-linux_perf-bundle.patch
    gdb-physname-pr11734-test.patch
    gdb-physname-pr12273-test.patch
    gdb-rhbz1007614-memleak-infpy_read_memory-test.patch
    gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
    gdb-rhbz1149205-catch-syscall-after-fork-test.patch
    gdb-rhbz1156192-recursive-dlopen-test.patch
    gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch
    gdb-rhbz1350436-type-printers-error.patch
    gdb-test-ivy-bridge.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=151
2017-02-15 16:05:56 +00:00

81 lines
2.3 KiB
Diff

http://sourceware.org/ml/gdb-patches/2016-09/msg00082.html
Subject: [testsuite patch] Fix false FAIL in gdb.cp/casts.exp
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
gcc-6.2.1-1.fc26.x86_64
gdb compile failed, /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:10: error: expected primary-expression before 'int'
decltype(int x)
^~~
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:10: error: expected ')' before 'int'
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:40:1: error: expected unqualified-id before 'decltype'
decltype(int x)
^~~~~~~~
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc: In function 'int main(int, char**)':
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/casts.cc:59:14: error: expected primary-expression before 'decltype'
double y = decltype(2);
^~~~~~~~
'decltype' is a registered keyword since C++11 which is now a default for GCC.
OK for check-in?
Jan
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline; filename=1
gdb/testsuite/ChangeLog
2016-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.cp/casts.cc: Rename decltype to int_to_double.
* gdb.cp/casts.exp (whatis decltype(5)): Rename to ...
(whatis int_to_double(5)): ... here.
diff --git a/gdb/testsuite/gdb.cp/casts.cc b/gdb/testsuite/gdb.cp/casts.cc
index 43f112f..4f68ba0 100644
--- a/gdb/testsuite/gdb.cp/casts.cc
+++ b/gdb/testsuite/gdb.cp/casts.cc
@@ -37,7 +37,7 @@ struct DoublyDerived : public VirtuallyDerived,
// Confuse a simpler approach.
double
-decltype(int x)
+int_to_double(int x)
{
return x + 2.0;
}
@@ -56,7 +56,7 @@ main (int argc, char **argv)
Alpha *ad = &derived;
Alpha *add = &doublyderived;
- double y = decltype(2);
+ double y = int_to_double(2);
return 0; /* breakpoint spot: casts.exp: 1 */
}
diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp
index 34a2492..5798098 100644
--- a/gdb/testsuite/gdb.cp/casts.exp
+++ b/gdb/testsuite/gdb.cp/casts.exp
@@ -112,7 +112,7 @@ gdb_test "print reinterpret_cast<A &> (*b)" " = \\(A \\&\\) @$hex: {a = 42}" \
# Test that keyword shadowing works.
-gdb_test "whatis decltype(5)" " = double"
+gdb_test "whatis int_to_double(5)" " = double"
# Basic tests using typeof.
--ikeVEW9yuYc//A+q--