]> git.ipfire.org Git - thirdparty/gcc.git/commit
libgomp/target.c: Fix buffer size for 'omp requires' diagnostic
authorTobias Burnus <tburnus@baylibre.com>
Thu, 19 Jun 2025 19:16:42 +0000 (21:16 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Thu, 19 Jun 2025 19:16:42 +0000 (21:16 +0200)
commit8a759dbb690dbd882b4884515a57ba6f285835cc
tree571d94036e234f1f00686bf4ba87e0a402013bde
parentb8617e0a241c7021f539aeca09a7c2bec02e9b39
libgomp/target.c: Fix buffer size for 'omp requires' diagnostic

One of the buffers that printed the list of set 'omp requires'
requirements missed the 'self' clause addition, being potentially
to short when all device-affecting clauses were passed. Solved it
by moving the sizeof(<string of all permitted values>" into a new
'#define' just above the associated gomp_requires_to_name function.

libgomp/ChangeLog:

* target.c (GOMP_REQUIRES_NAME_BUF_LEN): Define.
(GOMP_offload_register_ver, gomp_target_init): Use it for the
char buffer size.
libgomp/target.c