]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix 'main' function in 'gcc.dg/builtin-dynamic-object-size-pr120780.c'
authorThomas Schwinge <tschwinge@baylibre.com>
Wed, 9 Jul 2025 08:06:39 +0000 (10:06 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Wed, 9 Jul 2025 08:20:23 +0000 (10:20 +0200)
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

index 0d6593ec8289aa5841c957abd7b307d28d318776..12e6c29569c7b2006236d705fc3cfb4ecc47f67b 100644 (file)
@@ -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));