On 06/11/2024 17:38, Andrew Pinski wrote:
+ if (ENABLE_OFFLOADING && offload)
+ {
+ for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;)
+ {
+ if (startswith (c, "amdgcn"))
+ return ordered_max (64, omp_max_vf (false));
This causes a bootstrap failure for me (and others) on x86_64-linux-gnu:
I'm not sure why I didn't see this.
I'm testing the attached patch.
Andrew
From 345eb9b795d9728733bd0e472529e259ce796ff6 Mon Sep 17 00:00:00 2001
From: Andrew Stubbs <[email protected]>
Date: Wed, 6 Nov 2024 17:50:00 +0000
Subject: [PATCH] openmp: Fix signed/unsigned warning
My previous patch broke things when building with Werror.
gcc/ChangeLog:
* omp-general.cc (omp_max_vf): Cast the constant to poly_uint64.
---
gcc/omp-general.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/omp-general.cc b/gcc/omp-general.cc
index 1ae575ee181..72fb7f92ff7 100644
--- a/gcc/omp-general.cc
+++ b/gcc/omp-general.cc
@@ -1005,7 +1005,7 @@ omp_max_vf (bool offload)
for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;)
{
if (startswith (c, "amdgcn"))
- return ordered_max (64, omp_max_vf (false));
+ return ordered_max (poly_uint64 (64), omp_max_vf (false));
else if ((c = strchr (c, ':')))
c++;
}
--
2.46.0