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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-02-01
                 CC|                            |kargl at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from kargl at gcc dot gnu.org ---
This appears to be related to Sandra and Tobias's work on CFI.  In particular,
trans-expr.cc(gfc_conv_gfc_desc_to_cfi_desc) appear to not handle an
intent(out) deferred entity.  gfortran eventually gets to line 5818 and
following where the `tree gfx` and `tree idx` are getting manipulated, but
`fsym->as` shows

(gdb) b trans-expr.cc:5818
Breakpoint 1 at 0x9c6412: file ../../gccx/gcc/fortran/trans-expr.cc, line 5818.
(gdb) run -Wall a.f90
Breakpoint 1, gfc_conv_gfc_desc_to_cfi_desc (parmse=0x7fffffffdba0,
e=0x203c24fc0, fsym=0x203c54900) at ../../gccx/gcc/fortran/trans-expr.cc:5818
5818          if (fsym->attr.pointer || fsym->attr.allocatable)
(gdb) p *fsym->as
$1 = {rank = 1, corank = 0, type = AS_DEFERRED, cotype = 0, lower = {0x0
<repeats 15 times>}, upper = {
    0x0 <repeats 15 times>}, cray_pointee = false, cp_was_assumed = false,
resolved = true}
(gdb) 

Here, lower == NULL and upper == NULL, and I suspect the gfc is not set up
correctly.

Reply via email to