From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF6563858009; Tue, 13 Feb 2024 17:32:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF6563858009 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707845556; bh=70Hxa7UFLNObQYRNz+ayl4vNUX9lPGrzckf5FvX9Cf8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hKRF0bPF68VuErduO1l7u4H7A0BqTxybOFer69T/WHXYQ72PWG9XUYE83c9I83JXB j/fIB7k00Io+zvwdJAHFhjsGcpWykOLcuFoeOPFDRVCihjh570sIIv88+l1jQedNjj 16nxML6Hz9OdnV28HG0t9yIgIINeJIAaiUmTR92Y= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113904] [OpenMP][5.0][5.1] Dynamic context selector 'user={condition(expr)}' not handled Date: Tue, 13 Feb 2024 17:32:36 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: accepts-invalid, openmp, rejects-valid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113904 --- Comment #1 from Tobias Burnus --- Patch for rejecting non-const arguments in Fortran (wrong-code bit) to brin= g it in line with C/C++: https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645488.html * * * TODO as follow up: * Permit non-constant values for 'condition' and also for 'device_num' -> Middle end changes + update all front ends accordingly * For C/C++, consider rejecting nonconforming device numbers, if known at compile time, i.e. only permit positive numbers and omp_initial_device_number (=3D -1) and omp_invalid_device_number (GCC: -4= ). Cf. OpenMP Issue 3832 for the 'conforming' bit. [Current spec wording only permits 0 ... < omp_get_num_devices(), i.e. neither the host (=3D omp_initial_device and =3D=3D omp_get_num_devi= ces()) or omp_invalid_device_number are not permitted as explicit value; however, if absent, it is as if the trait appeared with the default-device-var ICV, which permits the discussed values.] -> If device_num(-4) (=3D omp_invalid_device_number), the selector can be folded to not matching. * Possible testcases for some of the features discussed here: - https://gcc.gnu.org/pipermail/gcc-patches/2024-February/645472.html - the OpenMP 6.0 Examples' program_control/sources/dispatch.1.{c,f90}=