public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102729] New: Assumed rank: ICE when passing noncontiguous to CONTIGUOUS assume rank (assumed-rank loop handling)
@ 2021-10-13 14:44 burnus at gcc dot gnu.org
  2021-10-13 16:03 ` [Bug fortran/102729] " burnus at gcc dot gnu.org
  2021-10-23 22:12 ` sandra at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-13 14:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102729
           Summary: Assumed rank: ICE when passing noncontiguous to
                    CONTIGUOUS assume rank (assumed-rank loop handling)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Related: PR 102708, PR54753, PR102641

That's an extended version of gfortran.dg/c-interop/fc-descriptor-7.f90

- - - -

  integer(C_INT), target :: bb(10,10)
  call ftest (bb(2:10:2, :), is_cont=.false._c_bool)
...
  subroutine ftest_ar (a, is_cont)
    use iso_c_binding
    integer(C_INT) :: a(..)
    logical(c_bool), value, intent(in) :: is_cont
...
    !call ftest_ar_con (a, is_cont=.true._c_bool)  ! <<< fixme!
  end subroutine

  subroutine ftest_ar_con (a, is_cont)
    use iso_c_binding
    integer(C_INT), contiguous :: a(..)
    logical(c_bool), value, intent(in) :: is_cont
....


That gives an ICE as the loop handling does not work
for rank == -1 (= assumed-rank arrays)

  124 |     call ftest_ar_con (a, is_cont=.true._c_bool)  ! <<< fixme!

internal compiler error: in gfc_trans_create_temp_array, at
fortran/trans-array.c:1491

0x6799b2 gfc_trans_create_temp_array(stmtblock_t*, stmtblock_t*, gfc_ss*,
tree_node*, tree_node*, bool, bool, bool, locus*)  fortran/trans-array.c:1491
0x98af9b gfc_conv_loop_setup(gfc_loopinfo*, locus*)  fortran/trans-array.c:5449
0x9be118 gfc_conv_subref_array_arg(gfc_se*, gfc_expr*, int, sym_intent, bool,
gfc_symbol const*, char const*, gfc_symbol*, bool)   fortran/trans-expr.c:4976

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/102729] Assumed rank: ICE when passing noncontiguous to CONTIGUOUS assume rank (assumed-rank loop handling)
  2021-10-13 14:44 [Bug fortran/102729] New: Assumed rank: ICE when passing noncontiguous to CONTIGUOUS assume rank (assumed-rank loop handling) burnus at gcc dot gnu.org
@ 2021-10-13 16:03 ` burnus at gcc dot gnu.org
  2021-10-23 22:12 ` sandra at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-13 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |102641

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
An (UNRELATED) patch which contains the FULL TESTCASE (commented) is in file
   gfortran.dg/c-interop/fc-descriptor-7.f90
as modified by
https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581575.html


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102641
[Bug 102641] Bogus error for intent(out) dummy that is a polymorphic
assumed-rank array

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/102729] Assumed rank: ICE when passing noncontiguous to CONTIGUOUS assume rank (assumed-rank loop handling)
  2021-10-13 14:44 [Bug fortran/102729] New: Assumed rank: ICE when passing noncontiguous to CONTIGUOUS assume rank (assumed-rank loop handling) burnus at gcc dot gnu.org
  2021-10-13 16:03 ` [Bug fortran/102729] " burnus at gcc dot gnu.org
@ 2021-10-23 22:12 ` sandra at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-10-23 22:12 UTC (permalink / raw)
  To: gcc-bugs

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

sandra at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sandra at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from sandra at gcc dot gnu.org ---
This is the same ICE previously reported as PR100194.

*** This bug has been marked as a duplicate of bug 100194 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-23 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 14:44 [Bug fortran/102729] New: Assumed rank: ICE when passing noncontiguous to CONTIGUOUS assume rank (assumed-rank loop handling) burnus at gcc dot gnu.org
2021-10-13 16:03 ` [Bug fortran/102729] " burnus at gcc dot gnu.org
2021-10-23 22:12 ` sandra at gcc dot gnu.org

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).