On 2025-07-09 04:21, Thomas Schwinge wrote:
Fix-up for commit 72e85d46472716e670cbe6e967109473b8d12d38
"tree-optimization/120780: Support object size for containing objects".
'size_t sz' is unused here, and GCC/nvptx doesn't accept this:
spawn -ignore SIGHUP [...]/nvptx-none-run
./builtin-dynamic-object-size-pr120780.exe
error : Prototype doesn't match for 'main' in 'input file 1 at offset
1924', first defined in 'input file 1 at offset 1924'
nvptx-run: cuLinkAddData failed: unknown error (CUDA_ERROR_UNKNOWN, 999)
FAIL: gcc.dg/builtin-dynamic-object-size-pr120780.c execution test
gcc/testsuite/
* gcc.dg/builtin-dynamic-object-size-pr120780.c: Fix 'main' function.
---
gcc/testsuite/gcc.dg/builtin-dynamic-object-size-pr120780.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, I'll backport this to gcc-15 too tomorrow along with my fix.
Sid
diff --git a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-pr120780.c
b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-pr120780.c
index 0d6593ec828..12e6c29569c 100644
--- a/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-pr120780.c
+++ b/gcc/testsuite/gcc.dg/builtin-dynamic-object-size-pr120780.c
@@ -207,7 +207,7 @@ test5 (size_t sz)
}
int
-main (size_t sz)
+main (void)
{
test1 (sizeof (struct container));
test1 (sizeof (struct container) - sizeof (int));