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

            Bug ID: 129133
           Summary: Error: non-trivial conversion in mem_ref
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 66327
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66327&action=edit
f90 source code

>From the llvm testsuite on github, the file 
flang/test/HLFIR/order_assignments/forall-pointer-assignment-scheduling-bounds.f90
seems ok with recent flang:

$ flang
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-pointer-assignment-scheduling-bounds.f90
; ./a.out
 PASS
$ flang --version
flang version 22.1.8 (Fedora 22.1.8-4.fc44)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-flang.cfg
$

gfortran 16.2.0 seems less happy with it:

$ ~/gcc/results.16.2.0/bin/gfortran
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-pointer-assignment-scheduling-bounds.f90
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-pointer-assignm
ent-scheduling-bounds.f90:23:1:

   23 | subroutine test_remapping_no_conflict(a, iarray)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: non-trivial conversion in ‘mem_ref’
struct array02_integer(kind=4)
struct array01_integer(kind=4)
parm.31 = *_86;
/home/dcb42/llvm/trunk/flang/test/HLFIR/order_assignments/forall-pointer-assignm
ent-scheduling-bounds.f90:23:1: internal compiler error: ‘verify_gimple’ failed
0x20475b7 internal_error

$ ~/gcc/results.16.2.0/bin/gfortran -v
Using built-in specs.
COLLECT_GCC=/home/dcb42/gcc/results.16.2.0/bin/gfortran
COLLECT_LTO_WRAPPER=/home/dcb42/gcc/results.16.2.0/libexec/gcc/x86_64-pc-linux-gnu/16.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-16.2.0/configure
--prefix=/home/dcb42/gcc/results.16.2.0 --disable-bootstrap --disable-doc
--disable-multilib --with-pkgversion=16.2.0 --enable-checking=yes
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.2.0 (16.2.0) 
$ 

trunk gfortran performs similarly.

Reply via email to