https://gcc.gnu.org/g:dc51d5a7de04e39966bad94a984e58d06d1f21eb

commit r17-554-gdc51d5a7de04e39966bad94a984e58d06d1f21eb
Author: Rainer Orth <[email protected]>
Date:   Sat May 16 14:17:31 2026 +0200

    libgomp: Fix env.c compilation on Darwin
    
    Darwin bootstrap is currently broken compiling libgomp/env.c:
    
    libgomp/env.c: In function 'initialize_env':
    libgomp/env.c:2476:7: error: use of logical '||' with constant operand 
'2097152' [-Werror=constant-logical-operand]
     2476 |       || GOMP_DEFAULT_STACKSIZE)
          |       ^~
    libgomp/env.c:2476:7: note: use '|' for bitwise operation
     2476 |       || GOMP_DEFAULT_STACKSIZE)
          |       ^~
    
    This is only seen on Darwin since this is the only target that defines a
    non-zero GOMP_DEFAULT_STACKSIZE.
    
    Bootstrapped without regressions on x86_64-apple-darwin25.5.0 and
    x86_64-apple-darwin21.6.0.
    
    2026-05-16  Rainer Orth  <[email protected]>
    
            libgomp:
            * env.c (initialize_env): Check GOMP_DEFAULT_STACKSIZE for
            non-zero.

Diff:
---
 libgomp/env.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgomp/env.c b/libgomp/env.c
index 8088085dd6c9..deb4f0bb431e 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -2473,7 +2473,7 @@ initialize_env (void)
 
   if ((none != NULL && gomp_get_icv_flag (none->flags, GOMP_ICV_STACKSIZE))
       || (all != NULL && gomp_get_icv_flag (all->flags, GOMP_ICV_STACKSIZE))
-      || GOMP_DEFAULT_STACKSIZE)
+      || GOMP_DEFAULT_STACKSIZE != 0)
     {
       int err;

Reply via email to