public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/112763] New: [OpenMP] ICE in gimplify_adjust_omp_clauses, at gimplify.cc:13238 – with defaultmap(firstprivate) for C++ member variables
@ 2023-11-29 13:13 burnus at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2023-11-29 13:13 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112763
           Summary: [OpenMP] ICE in gimplify_adjust_omp_clauses, at
                    gimplify.cc:13238 – with defaultmap(firstprivate) for
                    C++ member variables
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: openmp
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Created attachment 56718
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56718&action=edit
Testcase; compile with 'g++ -fopenmp -DDEFAULT_FIRSTPRIVATE' for this PR or
without -D for PR110347

The following code uses a C++ member variable and 'defaultmap(firstprivate)'
causes an ICE.

I am not quite sure what the result should be but an ICE is surely wrong.

Vaguely related to OpenMP spec issue #3343, strongly related is my email today
to the omp-lang@ spec email list.

* * *

In member function ‘void myClass::tgt()’:
28:14: internal compiler error: in gimplify_adjust_omp_clauses, at
gimplify.cc:13238
   28 |      #pragma omp target defaultmap(firstprivate) private(d) if (0)
      |              ^~~


0x880609 gimplify_adjust_omp_clauses
        ../../repos/gcc-trunk-commit/gcc/gimplify.cc:13238
0x10094b4 gimplify_omp_workshare
        ../../repos/gcc-trunk-commit/gcc/gimplify.cc:15783


Compile the attached testcase with:
 g++ -fopenmp -DDEFAULT_FIRSTPRIVATE
Note: it compiles with  -DNON_MEMBER (and fails at runtime, which might be
correct).

See also PR 110347 for the case of unset DEFAULT_FIRSTPRIVATE, i.e. using
  firstprivate(member_var)  instead of   default{,map}(firstprivate)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-29 13:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 13:13 [Bug middle-end/112763] New: [OpenMP] ICE in gimplify_adjust_omp_clauses, at gimplify.cc:13238 – with defaultmap(firstprivate) for C++ member variables 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).