]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix pr119160.c for non-glibc targets [PR119862]
authorKonstantinos Eleftheriou <konstantinos.eleftheriou@vrull.eu>
Tue, 10 Jun 2025 06:24:45 +0000 (08:24 +0200)
committerPhilipp Tomsich <philipp.tomsich@vrull.eu>
Fri, 13 Jun 2025 12:36:11 +0000 (14:36 +0200)
Testcase pr119160.c fails with symbol referencing errors for
`__cyg_profile_func_enter` and `__cyg_profile_func_exit` on non-glibc
systems.

This patch adds empty definitions for `__cyg_profile_func_enter`
and `__cyg_profile_func_exit` in order to prevent those errors.

PR testsuite/119862

gcc/testsuite/ChangeLog:

* gcc.dg/pr119160.c: Added empty definitions for
`__cyg_profile_func_enter` and `__cyg_profile_func_exit`
functions.

gcc/testsuite/gcc.dg/pr119160.c

index 5743b3b76036d3f5c50a08594fe6c6a416d40dab..c3d9b811f16309cda7862bd27bbdf0bf09e052ec 100644 (file)
@@ -4,6 +4,19 @@
 
 typedef __attribute__((__vector_size__ (32))) int V;
 
+/* Add empty implementations of __cyg_profile_func_enter() and
+   __cyg_profile_func_exit() to avoid problems on non-glibc
+   systems.  */
+void __attribute__((no_instrument_function))
+__cyg_profile_func_enter(void *this_fn, void *call_site)
+{
+}
+
+void __attribute__((no_instrument_function))
+__cyg_profile_func_exit(void *this_fn, void *call_site)
+{
+}
+
 void
 foo (V v, V, V, V *r)
 {