Re: [PATCH] OpenMP: Fix regressions in metadirective-target-device-2.c [PR120518]

2025-06-04 Thread Tobias Burnus
Sandra Loosemore wrote: gcc/ChangeLog PR c++/120518 * omp-general.cc (omp_device_num_check): Look inside a CLEANUP_POINT_EXPR when trying to optimize special cases. LGTM. Thanks, Tobias […] + tree t = *device_num; + if (TREE_CODE (t) == CLEANUP_POINT_EXPR) +t =

[PATCH] OpenMP: Fix regressions in metadirective-target-device-2.c [PR120518]

2025-06-04 Thread Sandra Loosemore
My previous patch that added a CLEANUP_POINT_EXPR around the device_num selector expression in the C++ front end broke the testcase c-c++-common/gomp/metadirective-target-device-2.c on offload targets. It confused the code in omp_device_num_check that tries to bypass error checking and do early res