https://gcc.gnu.org/g:f8aa3f26d82ad7678c69fc2531f88340b997d5f9
commit r16-7685-gf8aa3f26d82ad7678c69fc2531f88340b997d5f9 Author: Jonathan Yong <[email protected]> Date: Tue Feb 17 02:08:55 2026 +0000 gcc.dg/plugin: fix spurious llp64 warnings Fixes compile tests with mingw-w64. gcc/testsuite/ChangeLog: * gcc.dg/plugin/taint-pr112850-precise.c: (__kernel_ulong_t): Change unsigned long to __UINTPTR_TYPE__. (__kernel_size_t): Change __kernel_ulong_t to __kernel_size_t. (copy_from_user): Change unsigned long n to size_t n. (snd_rawmidi_ioctl): Change unsigned long arg to uintptr_t arg. * gcc.dg/plugin/taint-pr112850-too-complex.c: Ditto. * gcc.dg/plugin/taint-pr112850-unsanitized.c: Ditto. * gcc.dg/plugin/taint-pr112850.c: Ditto. Signed-off-by: Jonathan Yong <[email protected]> Diff: --- gcc/testsuite/gcc.dg/plugin/taint-pr112850-precise.c | 8 ++++---- gcc/testsuite/gcc.dg/plugin/taint-pr112850-too-complex.c | 8 ++++---- gcc/testsuite/gcc.dg/plugin/taint-pr112850-unsanitized.c | 8 ++++---- gcc/testsuite/gcc.dg/plugin/taint-pr112850.c | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gcc/testsuite/gcc.dg/plugin/taint-pr112850-precise.c b/gcc/testsuite/gcc.dg/plugin/taint-pr112850-precise.c index 558f0fb1a8ae..30b25db7ec77 100644 --- a/gcc/testsuite/gcc.dg/plugin/taint-pr112850-precise.c +++ b/gcc/testsuite/gcc.dg/plugin/taint-pr112850-precise.c @@ -7,12 +7,12 @@ /* { dg-options "-fanalyzer -O2 -Wanalyzer-symbol-too-complex --param=analyzer-max-svalue-depth=13" } */ /* { dg-require-effective-target analyzer } */ -typedef unsigned long __kernel_ulong_t; -typedef __kernel_ulong_t __kernel_size_t; +typedef __UINTPTR_TYPE__ uintptr_t; +typedef __SIZE_TYPE__ __kernel_size_t; typedef __kernel_size_t size_t; typedef unsigned int gfp_t; -extern unsigned long copy_from_user(void* to, const void* from, unsigned long n); +extern unsigned long copy_from_user(void* to, const void* from, size_t n); extern __attribute__((__alloc_size__(1))) @@ -40,7 +40,7 @@ resize_runtime_buffer(struct snd_rawmidi_params* params) } long -snd_rawmidi_ioctl(unsigned long arg) +snd_rawmidi_ioctl(uintptr_t arg) { void* argp = (void*)arg; struct snd_rawmidi_params params; diff --git a/gcc/testsuite/gcc.dg/plugin/taint-pr112850-too-complex.c b/gcc/testsuite/gcc.dg/plugin/taint-pr112850-too-complex.c index 2a4ee8197c38..29efab0c9bf9 100644 --- a/gcc/testsuite/gcc.dg/plugin/taint-pr112850-too-complex.c +++ b/gcc/testsuite/gcc.dg/plugin/taint-pr112850-too-complex.c @@ -8,12 +8,12 @@ /* { dg-options "-fanalyzer -O2 -Wanalyzer-symbol-too-complex --param=analyzer-max-svalue-depth=12" } */ /* { dg-require-effective-target analyzer } */ -typedef unsigned long __kernel_ulong_t; -typedef __kernel_ulong_t __kernel_size_t; +typedef __UINTPTR_TYPE__ uintptr_t; +typedef __SIZE_TYPE__ __kernel_size_t; typedef __kernel_size_t size_t; typedef unsigned int gfp_t; -extern unsigned long copy_from_user(void* to, const void* from, unsigned long n); +extern unsigned long copy_from_user(void* to, const void* from, size_t n); extern __attribute__((__alloc_size__(1))) @@ -41,7 +41,7 @@ resize_runtime_buffer(struct snd_rawmidi_params* params) } long -snd_rawmidi_ioctl(unsigned long arg) +snd_rawmidi_ioctl(uintptr_t arg) { void* argp = (void*)arg; struct snd_rawmidi_params params; diff --git a/gcc/testsuite/gcc.dg/plugin/taint-pr112850-unsanitized.c b/gcc/testsuite/gcc.dg/plugin/taint-pr112850-unsanitized.c index e46fcb6c8a10..cdfc0cf63b65 100644 --- a/gcc/testsuite/gcc.dg/plugin/taint-pr112850-unsanitized.c +++ b/gcc/testsuite/gcc.dg/plugin/taint-pr112850-unsanitized.c @@ -7,12 +7,12 @@ /* { dg-options "-fanalyzer -O2 -Wanalyzer-too-complex" } */ /* { dg-require-effective-target analyzer } */ -typedef unsigned long __kernel_ulong_t; -typedef __kernel_ulong_t __kernel_size_t; +typedef __UINTPTR_TYPE__ uintptr_t; +typedef __SIZE_TYPE__ __kernel_size_t; typedef __kernel_size_t size_t; typedef unsigned int gfp_t; -extern unsigned long copy_from_user(void* to, const void* from, unsigned long n); +extern unsigned long copy_from_user(void* to, const void* from, size_t n); extern __attribute__((__alloc_size__(1))) @@ -40,7 +40,7 @@ resize_runtime_buffer(struct snd_rawmidi_params* params) } long -snd_rawmidi_ioctl(unsigned long arg) +snd_rawmidi_ioctl(uintptr_t arg) { void* argp = (void*)arg; struct snd_rawmidi_params params; diff --git a/gcc/testsuite/gcc.dg/plugin/taint-pr112850.c b/gcc/testsuite/gcc.dg/plugin/taint-pr112850.c index 6fa1d0f9bd4b..f427b3f86207 100644 --- a/gcc/testsuite/gcc.dg/plugin/taint-pr112850.c +++ b/gcc/testsuite/gcc.dg/plugin/taint-pr112850.c @@ -4,12 +4,12 @@ /* { dg-options "-fanalyzer -O2 -Wanalyzer-symbol-too-complex" } */ /* { dg-require-effective-target analyzer } */ -typedef unsigned long __kernel_ulong_t; -typedef __kernel_ulong_t __kernel_size_t; +typedef __UINTPTR_TYPE__ uintptr_t; +typedef __SIZE_TYPE__ __kernel_size_t; typedef __kernel_size_t size_t; typedef unsigned int gfp_t; -extern unsigned long copy_from_user(void* to, const void* from, unsigned long n); +extern unsigned long copy_from_user(void* to, const void* from, size_t n); extern __attribute__((__alloc_size__(1))) @@ -37,7 +37,7 @@ resize_runtime_buffer(struct snd_rawmidi_params* params) } long -snd_rawmidi_ioctl(unsigned long arg) +snd_rawmidi_ioctl(uintptr_t arg) { void* argp = (void*)arg; struct snd_rawmidi_params params;
