public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/107028] [13 Regression][OpenACC] ICE in install_var_field, at omp-low.cc:797
Date: Sun, 25 Sep 2022 05:51:57 +0000	[thread overview]
Message-ID: <bug-107028-4-uYK4Slq6dW@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107028-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Minor postscript: While the following (reduced testcase in comment 0) looks a
bit odd,

  int data;
  ...
  #pragma acc data copyin(a, a.data)

the original uses a pointer. Thus, something like
  int *data;
  ...
  #pragma acc data copyin(a, a.data[0:n])

which is more sensible. This variant still gives an ICE.
However, either variant shouldn't ICE

BTW: GCC 12 has the following omplower dump for this variant:
   #pragma omp target oacc_data \
        map(to:a [len: 8]) map(alloc:a.data [len: 8]) \
        map(to:*_8 [len: _7]) map(attach:a.data [bias: 0])

--------------------------------------
long long n = 10;

class data_container {
 public:
  int *data;
};

void test2() {
  data_container a;
  a.data = (int*)__builtin_malloc (n * sizeof (int));
#pragma acc data copyin(a, a.data[0:n])
{ }
}

  parent reply	other threads:[~2022-09-25  5:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-24 18:58 [Bug middle-end/107028] New: " burnus at gcc dot gnu.org
2022-09-24 21:35 ` [Bug middle-end/107028] " burnus at gcc dot gnu.org
2022-09-25  5:51 ` burnus at gcc dot gnu.org [this message]
2022-09-26  9:20 ` rguenth at gcc dot gnu.org
2022-09-29 14:05 ` cvs-commit at gcc dot gnu.org
2022-09-29 17:35 ` burnus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107028-4-uYK4Slq6dW@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).