about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-02-07 14:08:16 -0600
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-03-25 14:34:23 -0500
commitd0d1811fb96d592e9b379b9176e1ab9d0b858916 (patch)
treec1ea00dd08cb458d7a8daf11a0e59d40f6de5317 /stdio-common
parent45ae17dd7ed3b9dea0d698d1c37a978d8d0a9aa2 (diff)
downloadglibc-d0d1811fb96d592e9b379b9176e1ab9d0b858916.tar.gz
glibc-d0d1811fb96d592e9b379b9176e1ab9d0b858916.tar.xz
glibc-d0d1811fb96d592e9b379b9176e1ab9d0b858916.zip
Fix tests which expose ldbl -> _Float128 redirects
The ldbl redirects for ieee128 have some jagged edges when
inspecting and manipulating symbols directly.

e.g asprintf is unconditionally redirected to __asprintfieee128
thus any tests relying on GCC's redirect behavior will encounter
problems if they inspect the symbol names too closely.

I've mitigated tests which expose the limitations of the
ldbl -> f128 redirects by giving them knowledge about the
redirected symbol names.

Hopefully there isn't much user code which depends on this
implementation specific behavior.

Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/tst-vfprintf-user-type.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stdio-common/tst-vfprintf-user-type.c b/stdio-common/tst-vfprintf-user-type.c
index 6c840fe04b..40d714fdb1 100644
--- a/stdio-common/tst-vfprintf-user-type.c
+++ b/stdio-common/tst-vfprintf-user-type.c
@@ -147,7 +147,11 @@ do_test (void)
 
   /* Alias declaration for asprintf, to avoid the format string
      attribute and the associated warning.  */
+#if __LONG_DOUBLE_USES_FLOAT128 == 1
+  extern int asprintf_alias (char **, const char *, ...) __asm__ ("__asprintfieee128");
+#else
   extern int asprintf_alias (char **, const char *, ...) __asm__ ("asprintf");
+#endif
   TEST_VERIFY (asprintf_alias == asprintf);
   char *str = NULL;
   TEST_VERIFY (asprintf_alias (&str, "[[%P]]", 123L, 456.0) >= 0);