public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/106981] New: [OpenMP] ICE in decompose, at wide-int.h:984 with '#pragma acc atomic capture'
@ 2022-09-20 16:40 burnus at gcc dot gnu.org
  2022-09-20 16:46 ` [Bug c/106981] [OpenACC][OpenMP] ICE in decompose, at wide-int.h:984 with '#pragma omp/acc " burnus at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-09-20 16:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106981

            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 ‘#pragma omp atomic’ before ‘(’ token
    6 |       c[x] = totals[x%((int)(n/10 + 1))] = (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 changed
to 'int':


long long n = 100;

void test1(int x, double *a, double *b, double *c, double *totals)
{
#pragma acc atomic capture
      c[x] = totals[x%((int)(n/10 + 1))] = (a[x] + b[x]) + totals[x%((int) n/10
+ 1)];
}


The ICE is:
--------------------------
input5.i:6:7: internal compiler error: in decompose, at wide-int.h:984
    6 |       c[x] = totals[x%((int)(n/10 + 1))] = (a[x] + b[x]) +
totals[x%((int) n/10 + 1)];
      |       ^
0x67f840 wi::int_traits<generic_wide_int<wide_int_ref_storage<false, false> >
>::decompose(long*, unsigned int, generic_wide_int<wide_int_ref_storage<false,
false> > const&)
        ../../repos/gcc/gcc/wide-int.h:984

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2023-05-04  7:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20 16:40 [Bug c/106981] New: [OpenMP] ICE in decompose, at wide-int.h:984 with '#pragma acc atomic capture' burnus at gcc dot gnu.org
2022-09-20 16:46 ` [Bug c/106981] [OpenACC][OpenMP] ICE in decompose, at wide-int.h:984 with '#pragma omp/acc " burnus at gcc dot gnu.org
2022-09-21  7:49 ` [Bug c/106981] [10/11/12/13 Regression][OpenACC][OpenMP] " rguenth at gcc dot gnu.org
2022-09-21 13:20 ` burnus at gcc dot gnu.org
2022-09-21 13:36 ` jakub at gcc dot gnu.org
2022-09-21 14:10 ` burnus at gcc dot gnu.org
2022-09-23  8:59 ` jakub at gcc dot gnu.org
2022-09-23  9:08 ` burnus at gcc dot gnu.org
2022-09-23  9:15 ` jakub at gcc dot gnu.org
2022-09-23  9:44 ` jakub at gcc dot gnu.org
2022-09-24  7:31 ` cvs-commit at gcc dot gnu.org
2022-10-18  8:43 ` [Bug c/106981] [10/11/12 " rguenth at gcc dot gnu.org
2022-11-03  0:23 ` cvs-commit at gcc dot gnu.org
2022-11-04  8:31 ` cvs-commit at gcc dot gnu.org
2022-11-04 11:01 ` [Bug c/106981] [10 " jakub at gcc dot gnu.org
2023-05-03 15:19 ` cvs-commit at gcc dot gnu.org
2023-05-04  7:19 ` jakub 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).