From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D96723858C32; Fri, 5 Apr 2024 09:46:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D96723858C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712310403; bh=TouCrnE4wzj86vmEJ3jXIPVR+H1J+giUGoUHR6yLDMo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jtf5plVaBe3ovwl2xp63CvWlGQH1+l2susl0Wq6yQgRve+cs/SGrFz0nuTigGBqyl sUpzAr4XkscsxzNTiFTRT1kOGne6TcMv3YGjAhActaNUazYdrSg2RcBYWqdQcsTSLe zSBhLYZNsBlL7WwQgQMQtIBpJN+GgjS5iLICBI7Y= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/114596] [OpenMP] "declare variant" scoring seems incorrect for construct selectors Date: Fri, 05 Apr 2024 09:46:43 +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: openmp 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=3D114596 --- Comment #4 from Tobias Burnus --- > For selector construct =3D {teams, parallel, for} > score1 =3D 29 score2 =3D 29 > --------------- > > The constructs[i]'s score look fine. > > But I wonder why score =3D=3D 29 and not 28. Answer: omp_context_compute_score starts with: *score =3D 1; which is set (only) in the error case to "-1" and otherwise, scores only get added. =E2=80=94 I think a constant offset to all scores does not harm (as = it is only used internally) but I still find it confusing.=