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
    [...]

Reply via email to