Hi David! On 2026-07-08T15:50:36+0200, I wrote: > David: I just noticed a GCC/Analyzer test case regression
I've filed PR126193 "openmp: Pass iteration count to static worksharing builtins for OMPT: 'c-c++-common/analyzer/omp-parallel-for-1.c'". Grüße Thomas > in context of a > GCC/OpenMP patch that we're about to push, switching a few libgomp entry > points from no argument to one 'unsigned long long' argument. (We can > still change these, have not yet been in a GCC release.) Briefly: > > On 2026-07-08T14:56:47+0200, Paul-Antoine Arras <[email protected]> wrote: >> --- a/gcc/builtin-types.def >> +++ b/gcc/builtin-types.def > >> +DEF_FUNCTION_TYPE_1 (BT_FN_COMPLEX_INT_ULONGLONG, BT_COMPLEX_INT, >> BT_ULONGLONG) > >> --- a/gcc/omp-builtins.def >> +++ b/gcc/omp-builtins.def > >> DEF_GOMP_BUILTIN (BUILT_IN_GOMP_LOOP_STATIC_WORKSHARING, >> - "GOMP_loop_static_worksharing", BT_FN_COMPLEX_INT, >> + "GOMP_loop_static_worksharing", >> + BT_FN_COMPLEX_INT_ULONGLONG, >> ATTR_CONST_NOTHROW_LEAF_LIST) > >> --- a/gcc/omp-expand.cc >> +++ b/gcc/omp-expand.cc >> @@ -5190,42 +5190,6 @@ expand_omp_for_static_nochunk (struct omp_region >> *region, >> [adjust to pass 'unsigned long long' argument to >> 'GOMP_loop_static_worksharing' etc.] > > The following was unexpected; that patch regresses: > > [-PASS:-]{+FAIL:+} c-c++-common/analyzer/omp-parallel-for-1.c (test for > excess errors) > > ... due to: > > [...]/c-c++-common/analyzer/omp-parallel-for-1.c: In function > 'test._omp_fn.0': > [...]/c-c++-common/analyzer/omp-parallel-for-1.c:16:9: warning: symbol > too complicated: 'WIDENING({SN 17}, > (INIT_VAL((*INIT_VAL((*INIT_VAL(.omp_data_i_5(D))).image)).rows)/(realpart_exprCONST_FN_RESULT('__builtin_GOMP_loop_static_worksharing', > {arg0: CAST(long long unsigned int, > INIT_VAL((*INIT_VAL((*INIT_VAL(.omp_data_i_5(D))).image)).rows))}))), > ((INIT_VAL((*INIT_VAL((*INIT_VAL(.omp_data_i_5(D))).image)).rows)/(realpart_exprCONST_FN_RESULT('__builtin_GOMP_loop_static_worksharing', > {arg0: CAST(long long unsigned int, > INIT_VAL((*INIT_VAL((*INIT_VAL(.omp_data_i_5(D))).image)).rows))})))+(int)1))' > [-Wanalyzer-symbol-too-complex] > [...]/c-c++-common/analyzer/omp-parallel-for-1.c:16:9: note: max_depth 19 > exceeds --param=analyzer-max-svalue-depth=18 > > David, do you have any better recommendation instead of doing what > GCC/Analyzer kind-of suggests? > > +/* { dg-additional-options --param=analyzer-max-svalue-depth=19 } */ > > (Untested.) > > Curiously, I see that regression only for C, but not for C++ compilation > of the 'c-c++-common/analyzer/omp-parallel-for-1.c' test case. (That > seems suspicious?)
