public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/111042] New: [OpenMP] 'allocate' clause and combined directive - impove diagnostic, ICE because of missing diagnostic
@ 2023-08-16 20:18 burnus at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2023-08-16 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111042
Bug ID: 111042
Summary: [OpenMP] 'allocate' clause and combined directive -
impove diagnostic, ICE because of missing diagnostic
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Keywords: diagnostic, ice-on-invalid-code, openmp
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
At least on spec level, the problem in the following is 'loop' consumes the
'private' clause but does not take the 'allocate'.
Thus, the 'allocate' clause remains - but it is not applied to any leaf
construct as there is no data-privatization clause. That's invalid as a clause
needs to apply to at least one leaf construct in a combined/composite
construct.
(A) Fortran: The following is accepted but then gives an ICE in
gimplify_omp_loop.
The original dump shows 'loop private(var) allocate(allocator(1):var)' but
that's invalid as that kind of clause it not permitted for 'loop':
EXPECTED: There is an error message + 'allocate' is not put on the 'loop'
clause.
use omp_lib
implicit none
integer :: var, i
!$omp target teams loop allocate(omp_default_mem_alloc : var) private(var)
do i=1,5
end do
end
(B) C/C++ – The code is rejected with:
error: ‘var’ specified in ‘allocate’ clause but not in an explicit
privatization clause
While technically correct, the error is misleading as it only applies to a
particular leaf construct.
Expected: The error makes clearer that this applies only after splitting.
Notes:
* 'omp target teams' is fine – the 'private(var)' ends up only with 'teams';
the 'allocate' shows up for both in the original dump, but that should be
harmless.
* Issue found via https://github.com/SOLLVE/sollve_vv/pull/761
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-08-16 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-16 20:18 [Bug middle-end/111042] New: [OpenMP] 'allocate' clause and combined directive - impove diagnostic, ICE because of missing diagnostic burnus at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).