public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tschwinge at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105975] OpenMP/nvptx offloading: 'internal compiler error: in maybe_legitimize_operand, at optabs.cc:7785'
Date: Wed, 15 Jun 2022 08:49:22 +0000	[thread overview]
Message-ID: <bug-105975-4-Be363YjwE1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105975-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
Created attachment 53140
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53140&action=edit
'a-for-11.o.xz'

With commit 1d205dbac1e1754c01c22a31bd1688126545401e "Factor out common
internal-fn idiom" sources, I've run such an OpenMP/nvptx offloading
compilation ('libgomp.c-c++-common/for-11.c', '-O1') with '-v -save-temps', and
we see:

    [...]
    
/home/thomas/tmp/source/gcc/build/trace-slim-omp/build-gcc-offload-nvptx-none/gcc/lto1
-quiet -dumpbase ./a.xnvptx-none.mkoffload -m64 -mgomp -O1 -version
-fno-openacc -fno-pie -fcf-protection=none -foffload-abi=lp64 -fopenmp
@./a.xnvptx-none.mkoffload.args.0 -o ./a.xnvptx-none.mkoffload.s
    [...]
    during RTL pass: expand
    source-gcc/libgomp/testsuite/libgomp.c-c++-common/for-2.h: In function
‘f20_tpf_simd_static._omp_fn.1’:
    source-gcc/libgomp/testsuite/libgomp.c-c++-common/for-2.h:343:9: internal
compiler error: in maybe_legitimize_operand, at optabs.cc:7785
    [...]

    $ cat < a.xnvptx-none.mkoffload.args.0
    a-for-11.o

If you now build a nvptx offloading compiler (same commit
1d205dbac1e1754c01c22a31bd1688126545401e sources):

    $ ../source-gcc/configure --target=nvptx-none
--enable-as-accelerator-for=x86_64-pc-linux-gnu --enable-languages=lto
--enable-checking=yes,extra,rtl
    $ make -j16 all-gcc

..., you ought to be able to reproduce the ICE (using the 'a-for-11.o' I've
attached to this PR, 'xz'-compressed):

    $ gcc/lto1 -quiet -dumpbase ./a.xnvptx-none.mkoffload -m64 -mgomp -O1
-version -fno-openacc -fno-pie -fcf-protection=none -foffload-abi=lp64 -fopenmp
a-for-11.o -o ./a.xnvptx-none.mkoffload.s
    [...]
    during RTL pass: expand
    ../source-gcc/libgomp/testsuite/libgomp.c-c++-common/for-2.h: In function
‘f20_tpf_simd_static._omp_fn.1’:
    ../source-gcc/libgomp/testsuite/libgomp.c-c++-common/for-2.h:343:9:
internal compiler error: in maybe_legitimize_operand, at optabs.cc:7785
    [...]

  parent reply	other threads:[~2022-06-15  8:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 14:40 [Bug target/105975] New: " tschwinge at gcc dot gnu.org
2022-06-14 20:08 ` [Bug target/105975] " rsandifo at gcc dot gnu.org
2022-06-15  8:49 ` tschwinge at gcc dot gnu.org [this message]
2022-06-15  8:51 ` tschwinge at gcc dot gnu.org
2022-06-15 11:01 ` rsandifo at gcc dot gnu.org
2022-06-15 16:40 ` cvs-commit at gcc dot gnu.org
2022-06-15 16:42 ` rsandifo at gcc dot gnu.org
2022-06-15 21:04 ` tschwinge 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-105975-4-Be363YjwE1@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).