public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: [testsuite] More testsuite fixes.
@ 2026-06-27 23:57 Jan Kratochvil
  0 siblings, 0 replies; only message in thread
From: Jan Kratochvil @ 2026-06-27 23:57 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 60c662d53a1ac22be67f8ab076e8881766335308
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2016-09-12T23:09:34+02:00
Stats  : +226/-3 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/60c662d53a1ac22be67f8ab076e8881766335308?branch=gdb-17.2-rebase-f44

Log:
[testsuite] More testsuite fixes.

---
diff --git a/gdb-testsuite-casts.patch b/gdb-testsuite-casts.patch
new file mode 100644
index 0000000..1ed7ecb
--- /dev/null
+++ b/gdb-testsuite-casts.patch
@@ -0,0 +1,80 @@
+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--
+

diff --git a/gdb-testsuite-m-static.patch b/gdb-testsuite-m-static.patch
new file mode 100644
index 0000000..49ad93b
--- /dev/null
+++ b/gdb-testsuite-m-static.patch
@@ -0,0 +1,79 @@
+http://sourceware.org/ml/gdb-patches/2016-09/msg00083.html
+Subject: [testsuite patch] Fix C++11 compilation failure for gdb.cp/m-static.exp
+
+
+--y0ulUmNC+osPPQO6
+Content-Type: text/plain; charset=iso-2022-jp
+Content-Disposition: inline
+
+Hi,
+
+gcc-6.2.1-1.fc26.x86_64
+
+g++ -std=c++03:
+no warnings
+
+g++:
+In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:0:
+/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:34: error: ^[$B!F^[(Bconstexpr^[$B!G^[(B needed for in-class initialization of static data member ^[$B!F^[(Bconst float gnu_obj_4::somewhere^[$B!G^[(B of non-integral type [-fpermissive]
+   static const float somewhere = 3.14159;
+                                  ^~~~~~~
+
+clang++:
+In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
+/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init]
+  static const float somewhere = 3.14159;
+                     ^           ~~~~~~~
+1 warning generated.
+
+clang++ -std=c++11:
+In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
+/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init]
+  static const float somewhere = 3.14159;
+                     ^           ~~~~~~~
+/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:3: note: add 'constexpr'
+  static const float somewhere = 3.14159;
+  ^
+  constexpr
+1 error generated.
+
+OK for check-in?
+
+After the fix out of the 4 combinations above only this one remains non-empty:
+
+clang++:
+In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
+/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init]
+  static const float somewhere = 3.14159;
+                     ^           ~~~~~~~
+1 warning generated.
+
+
+Jan
+
+--y0ulUmNC+osPPQO6
+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/m-static.h (gnu_obj_4::somewhere): Use constexpr for C++11.
+
+diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h
+index bcedfff..2992463 100644
+--- a/gdb/testsuite/gdb.cp/m-static.h
++++ b/gdb/testsuite/gdb.cp/m-static.h
+@@ -6,6 +6,9 @@ class gnu_obj_4
+   static const int elsewhere;
+   static const int nowhere;
+   static const int everywhere = 317;
++#if __cplusplus >= 201103L
++  constexpr
++#endif
+   static const float somewhere = 3.14159;
+ 
+   // try to ensure test4 is actually allocated
+
+--y0ulUmNC+osPPQO6--
+

diff --git a/gdb-upstream.patch b/gdb-upstream.patch
new file mode 100644
index 0000000..87364af
--- /dev/null
+++ b/gdb-upstream.patch
@@ -0,0 +1,55 @@
+commit 2c29df25b7c2ff006b45afd80ee6dd734ebbd47c
+Author: Sergio Durigan Junior <sergiodj@redhat.com>
+Date:   Sun Sep 11 16:53:09 2016 -0400
+
+    Fix false FAIL on gdb.base/stap-probe.exp, due to ICF optimization
+    
+    GCC 6's ICF optimization pass is making the declaration of 'm1' and
+    'm2', on gdb.base/stap-probe.c, to be unified.  However, this leads to
+    only one instance of the probe 'two' being created, which causes a
+    failure on the testsuite (which expects a multi-location breakpoint to
+    be inserted on the probe).
+    
+    This patch fixes this failure by declaring a dummy variable on 'm1',
+    and using it as an argument to m1's version of probe 'two'.  Since we
+    do not care about the contents of the functions nor about the
+    arguments of each probe 'two', this is OK.
+    
+    gdb/testsuite/ChangeLog:
+    2016-09-11  Sergio Durigan Junior  <sergiodj@redhat.com>
+    	    Jan Kratochvil  <jan.kratochvil@redhat.com>
+    
+    	* gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to
+    	make m1's definition to be different from m2's.  Use 'dummy' as an
+    	argument for probe 'two'.
+
+### a/gdb/testsuite/ChangeLog
+### b/gdb/testsuite/ChangeLog
+## -1,3 +1,10 @@
++2016-09-11  Sergio Durigan Junior  <sergiodj@redhat.com>
++	    Jan Kratochvil  <jan.kratochvil@redhat.com>
++
++	* gdb.base/stap-probe.c (m1): New variable 'dummy', necessary to
++	make m1's definition to be different from m2's.  Use 'dummy' as an
++	argument for probe 'two'.
++
+ 2016-09-10  Jon Beniston  <jon@beniston.com>
+ 
+ 	* lib/mi-support.exp (mi_gdb_target_load): Use target_sim_options
+--- a/gdb/testsuite/gdb.base/stap-probe.c
++++ b/gdb/testsuite/gdb.base/stap-probe.c
+@@ -53,8 +53,13 @@ struct funcs
+ static void
+ m1 (void)
+ {
++  /* m1 and m2 are equivalent, but because of some compiler
++     optimizations we have to make each of them unique.  This is why
++     we have this dummy variable here.  */
++  volatile int dummy = 0;
++
+   if (TEST2)
+-    STAP_PROBE (test, two);
++    STAP_PROBE1 (test, two, dummy);
+ }
+ 
+ static void

diff --git a/gdb.spec b/gdb.spec
index 215fe55..8ab9078 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -28,7 +28,7 @@ Version: 7.12
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 0.14.%{tardate}%{?dist}
+Release: 0.15.%{tardate}%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
 Group: Development/Debuggers
@@ -247,7 +247,7 @@ Patch231: gdb-6.3-bz202689-exec-from-pthread-test.patch
 
 # Backported fixups post the source tarball.
 #Xdrop: Just backports.
-#Patch232: gdb-upstream.patch
+Patch232: gdb-upstream.patch
 
 # Testcase for PPC Power6/DFP instructions disassembly (BZ 230000).
 #=fedoratest+ppc
@@ -577,6 +577,10 @@ Patch1143: gdb-linux_perf-bundle.patch
 # [rhel6+7] Fix compatibility of bison <3.1 and gcc >=6.
 Patch1144: gdb-bison-old.patch
 
+# [testsuite] More testsuite fixes.
+Patch1145: gdb-testsuite-casts.patch
+Patch1146: gdb-testsuite-m-static.patch
+
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
 # RL_STATE_FEDORA_GDB would not be found for:
 # Patch642: gdb-readline62-ask-more-rh.patch
@@ -774,7 +778,7 @@ find -name "*.info*"|xargs rm -f
 # Match the Fedora's version info.
 %patch2 -p1
 
-#patch232 -p1
+%patch232 -p1
 %patch349 -p1
 %patch1058 -p1
 %patch1132 -p1
@@ -902,6 +906,8 @@ done
 %patch1123 -p1
 %patch1143 -p1
 %patch1144 -p1
+%patch1145 -p1
+%patch1146 -p1
 
 %patch1075 -p1
 %if 0%{?rhel:1} && 0%{?rhel} <= 7
@@ -1448,6 +1454,9 @@ then
 fi
 
 %changelog
+* Mon Sep 12 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-0.15.20160907.fc25
+- [testsuite] More testsuite fixes.
+
 * Mon Sep 12 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12-0.14.20160907.fc25
 - Various mostly testsuite compatibility and regression fixes.
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-27 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-27 23:57 [rpms/gdb] gdb-17.2-rebase-f44: [testsuite] More testsuite fixes Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox