From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2624B3858C74; Tue, 20 Sep 2022 16:40:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2624B3858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663692001; bh=KeXKzuUJC9nzokF/vg/XbD5eSfRx6kXg4hmJ7CPSchs=; h=From:To:Subject:Date:From; b=Xv87YuOthB1aPIrvZGVlM5tSkBD7obnTr9U6jxu+OeIGFa2wehh7ysIVlSkROrIc0 yg/XLV6H4XyaN7ZT2oFhMV30U8MW6WOriBqAMbyxtALa9c+9M53/k37a9nZ6yNmiFv 8LXOrKYAummdWHzh/ys0YirBuRzKKze5HTthmlsA= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106981] New: [OpenMP] ICE in decompose, at wide-int.h:984 with '#pragma acc atomic capture' Date: Tue, 20 Sep 2022 16:40:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code, openacc 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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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=3D106981 Bug ID: 106981 Summary: [OpenMP] ICE in decompose, at wide-int.h:984 with '#pragma acc atomic capture' Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openacc Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org CC: tschwinge at gcc dot gnu.org, vries at gcc dot gnu.org Target Milestone: --- This is reduced from an OpenACC testsuite. I am not quite sure whether it is valid or not; I now bluntly claim: ice-on-valid-code for C rejects-valid for C++ however, it might well be also an ICE on invalid, I have not checked ... In any case: With g++, it fails with: input5.i:6:44: error: invalid form of =E2=80=98#pragma omp atomic=E2=80=99 = before =E2=80=98(=E2=80=99 token 6 | c[x] =3D totals[x%((int)(n/10 + 1))] =3D (a[x] + b[x]) + totals[x%((int) n/10 + 1)]; But with the C compiler, it has an ICE, unless 'long long n' has been chang= ed to 'int': long long n =3D 100; void test1(int x, double *a, double *b, double *c, double *totals) { #pragma acc atomic capture c[x] =3D totals[x%((int)(n/10 + 1))] =3D (a[x] + b[x]) + totals[x%((i= nt) n/10 + 1)]; } The ICE is: -------------------------- input5.i:6:7: internal compiler error: in decompose, at wide-int.h:984 6 | c[x] =3D totals[x%((int)(n/10 + 1))] =3D (a[x] + b[x]) + totals[x%((int) n/10 + 1)]; | ^ 0x67f840 wi::int_traits= > >::decompose(long*, unsigned int, generic_wide_int > const&) ../../repos/gcc/gcc/wide-int.h:984=