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/103642] New: [12 Regression] ICE in lower_omp_target: omp-low.c:12977 (fold_convert_loc) for omp target map(from: t.s->a[:N])
Date: Fri, 10 Dec 2021 09:41:20 +0000	[thread overview]
Message-ID: <bug-103642-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 103642
           Summary: [12 Regression] ICE in lower_omp_target:
                    omp-low.c:12977 (fold_convert_loc) for omp target
                    map(from: t.s->a[:N])
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: cltang at gcc dot gnu.org, jakub at gcc dot gnu.org
  Target Milestone: ---

Compiling
https://github.com/clang-ykt/omptests/blob/master/t-partial-struct/test.cpp
fails now as follows:

during GIMPLE pass: omplower
t-partial-struct/test.cpp: In function ‘int main()’:
t-partial-struct/test.cpp:232:13: internal compiler error: in fold_convert_loc,
at fold-const.c:2450
  232 |     #pragma omp target map(from: t.s->a[:N])
      |             ^~~
0x7d313f fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../repos/gcc/gcc/fold-const.c:2450
0x11218d4 lower_omp_target
        ../../repos/gcc/gcc/omp-low.c:12977
0x11218d4 lower_omp_1
        ../../repos/gcc/gcc/omp-low.c:14223
0x11218d4 lower_omp
        ../../repos/gcc/gcc/omp-low.c:14362


Until recently, it failed with:
  t-partial-struct/test.cpp:232:37: error: expected ')' before '->' token
which means this is a regression.


Reduced testcase - compile with "gcc / g++ -fopenmp":

typedef struct {
  int *a;
} SSS;
typedef struct {
  SSS *s;
} TTT;
main() {
  TTT t;
#pragma omp target map(t.s->a[9])
  ;
}

             reply	other threads:[~2021-12-10  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  9:41 burnus at gcc dot gnu.org [this message]
2021-12-10 10:08 ` [Bug middle-end/103642] [12 Regression] ICE in lower_omp_target: omp-low.c:12977 (fold_convert_loc) for omp target map(from: t.s->a[:N]) since r12-5835-g0ab29cf0bb68960c marxin at gcc dot gnu.org
2021-12-28 12:10 ` pinskia at gcc dot gnu.org
2022-01-17 12:49 ` rguenth at gcc dot gnu.org
2022-01-19 16:34 ` burnus at gcc dot gnu.org
2022-01-27 10:35 ` cvs-commit at gcc dot gnu.org
2022-02-04 14:28 ` 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-103642-4@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).