[PATCH 4/8] stdio: Fix tst-vfprintf-user-type on clang
H.J. Lu
hjl.tools@gmail.com
Wed Dec 17 23:56:03 GMT 2025
On Thu, Dec 18, 2025 at 1:56 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> The pointer alias comparison will be optimized away by the compiler,
Can we use a function to disable the pointer alias comparison optimization?
> and gcc and clang will evaluate it differently (clang evaluates it
> as false, while gcc evaluates it as true).
> ---
> stdio-common/tst-vfprintf-user-type.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/stdio-common/tst-vfprintf-user-type.c b/stdio-common/tst-vfprintf-user-type.c
> index 3fc98b30f1..41ae8a45c1 100644
> --- a/stdio-common/tst-vfprintf-user-type.c
> +++ b/stdio-common/tst-vfprintf-user-type.c
> @@ -183,7 +183,6 @@ do_test (void)
> #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);
> TEST_COMPARE_STRING (str, "[[(123, 456.000000)]]");
> --
> 2.43.0
>
--
H.J.
More information about the Libc-alpha
mailing list