public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument
@ 2021-04-11 11:24 jrfsousa at gmail dot com
  2021-04-14 18:27 ` [Bug fortran/100029] " dominiq at lps dot ens.fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jrfsousa at gmail dot com @ 2021-04-11 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100029
           Summary: ICE on subroutine call with allocatable polymorphic
                    assumed-rank argument
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 50556
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50556&action=edit
Fortran code showing problem

Hi All!

ICE on subroutine call when passing an allocatable polymorphic assumed-rank
intent-out argument.

Seen in:

GNU Fortran (GCC) 11.0.1 20210411 (experimental)
GNU Fortran (GCC) 10.3.1 20210411
GNU Fortran (GCC) 9.3.1 20210411

Thank you very much.

Best regards.
José Rui

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
@ 2021-04-14 18:27 ` dominiq at lps dot ens.fr
  2021-04-16 23:07 ` jrfsousa at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-04-14 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-04-14
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed since at least GCC7.

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
  2021-04-14 18:27 ` [Bug fortran/100029] " dominiq at lps dot ens.fr
@ 2021-04-16 23:07 ` jrfsousa at gmail dot com
  2021-06-18 10:58 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jrfsousa at gmail dot com @ 2021-04-16 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from José Rui Faustino de Sousa <jrfsousa at gmail dot com> ---
Patch posted.

https://gcc.gnu.org/pipermail/fortran/2021-April/055924.html

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
  2021-04-14 18:27 ` [Bug fortran/100029] " dominiq at lps dot ens.fr
  2021-04-16 23:07 ` jrfsousa at gmail dot com
@ 2021-06-18 10:58 ` dominiq at lps dot ens.fr
  2022-09-25 21:07 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-06-18 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
                   ` (2 preceding siblings ...)
  2021-06-18 10:58 ` dominiq at lps dot ens.fr
@ 2022-09-25 21:07 ` anlauf at gcc dot gnu.org
  2022-10-01 18:10 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-09-25 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
Rebased patch pinged here:

https://gcc.gnu.org/pipermail/fortran/2022-September/058247.html

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
                   ` (3 preceding siblings ...)
  2022-09-25 21:07 ` anlauf at gcc dot gnu.org
@ 2022-10-01 18:10 ` cvs-commit at gcc dot gnu.org
  2022-10-08 18:43 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-01 18:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:5299155bb80e90df822e1eebc9f9a0c8e4505a46

commit r13-3014-g5299155bb80e90df822e1eebc9f9a0c8e4505a46
Author: José Rui Faustino de Sousa <jrfsousa@gmail.com>
Date:   Sun Sep 25 22:48:55 2022 +0200

    Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029,
PR100040]

    gcc/fortran/ChangeLog:

            PR fortran/100040
            PR fortran/100029
            * trans-expr.cc (gfc_conv_class_to_class): Add code to have
            assumed-rank arrays recognized as full arrays and fix the type
            of the array assignment.
            (gfc_conv_procedure_call): Change order of code blocks such that
            the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
            first.

    gcc/testsuite/ChangeLog:

            PR fortran/100029
            * gfortran.dg/PR100029.f90: New test.

            PR fortran/100040
            * gfortran.dg/PR100040.f90: New test.

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
                   ` (4 preceding siblings ...)
  2022-10-01 18:10 ` cvs-commit at gcc dot gnu.org
@ 2022-10-08 18:43 ` cvs-commit at gcc dot gnu.org
  2022-10-08 18:48 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-08 18:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:07da38566232cc11901c3eeb9fc2860f02f2e31f

commit r12-8813-g07da38566232cc11901c3eeb9fc2860f02f2e31f
Author: José Rui Faustino de Sousa <jrfsousa@gmail.com>
Date:   Sun Sep 25 22:48:55 2022 +0200

    Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029,
PR100040]

    gcc/fortran/ChangeLog:

            PR fortran/100040
            PR fortran/100029
            * trans-expr.cc (gfc_conv_class_to_class): Add code to have
            assumed-rank arrays recognized as full arrays and fix the type
            of the array assignment.
            (gfc_conv_procedure_call): Change order of code blocks such that
            the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
            first.

    gcc/testsuite/ChangeLog:

            PR fortran/100029
            * gfortran.dg/PR100029.f90: New test.

            PR fortran/100040
            * gfortran.dg/PR100040.f90: New test.

    (cherry picked from commit 5299155bb80e90df822e1eebc9f9a0c8e4505a46)

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
                   ` (5 preceding siblings ...)
  2022-10-08 18:43 ` cvs-commit at gcc dot gnu.org
@ 2022-10-08 18:48 ` cvs-commit at gcc dot gnu.org
  2022-10-08 19:04 ` cvs-commit at gcc dot gnu.org
  2022-10-08 19:05 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-08 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:1167c14d598021581e984cbe46273ade4bc54126

commit r11-10295-g1167c14d598021581e984cbe46273ade4bc54126
Author: José Rui Faustino de Sousa <jrfsousa@gmail.com>
Date:   Sun Sep 25 22:48:55 2022 +0200

    Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029,
PR100040]

    gcc/fortran/ChangeLog:

            PR fortran/100040
            PR fortran/100029
            * trans-expr.c (gfc_conv_class_to_class): Add code to have
            assumed-rank arrays recognized as full arrays and fix the type
            of the array assignment.
            (gfc_conv_procedure_call): Change order of code blocks such that
            the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
            first.

    gcc/testsuite/ChangeLog:

            PR fortran/100029
            * gfortran.dg/PR100029.f90: New test.

            PR fortran/100040
            * gfortran.dg/PR100040.f90: New test.

    (cherry picked from commit 5299155bb80e90df822e1eebc9f9a0c8e4505a46)

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
                   ` (6 preceding siblings ...)
  2022-10-08 18:48 ` cvs-commit at gcc dot gnu.org
@ 2022-10-08 19:04 ` cvs-commit at gcc dot gnu.org
  2022-10-08 19:05 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-08 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:a880f9a44ecad385d4273f96f76c5c900d716941

commit r10-11024-ga880f9a44ecad385d4273f96f76c5c900d716941
Author: José Rui Faustino de Sousa <jrfsousa@gmail.com>
Date:   Sun Sep 25 22:48:55 2022 +0200

    Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029,
PR100040]

    gcc/fortran/ChangeLog:

            PR fortran/100040
            PR fortran/100029
            * trans-expr.c (gfc_conv_class_to_class): Add code to have
            assumed-rank arrays recognized as full arrays and fix the type
            of the array assignment.
            (gfc_conv_procedure_call): Change order of code blocks such that
            the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
            first.

    gcc/testsuite/ChangeLog:

            PR fortran/100029
            * gfortran.dg/PR100029.f90: New test.

            PR fortran/100040
            * gfortran.dg/PR100040.f90: New test.

    (cherry picked from commit 5299155bb80e90df822e1eebc9f9a0c8e4505a46)

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

* [Bug fortran/100029] ICE on subroutine call with allocatable polymorphic assumed-rank argument
  2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
                   ` (7 preceding siblings ...)
  2022-10-08 19:04 ` cvs-commit at gcc dot gnu.org
@ 2022-10-08 19:05 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-10-08 19:05 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |10.5
             Status|ASSIGNED                    |RESOLVED

--- Comment #8 from anlauf at gcc dot gnu.org ---
Fixed on all open branches.  Closing.

Thanks for the patch!

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

end of thread, other threads:[~2022-10-08 19:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 11:24 [Bug fortran/100029] New: ICE on subroutine call with allocatable polymorphic assumed-rank argument jrfsousa at gmail dot com
2021-04-14 18:27 ` [Bug fortran/100029] " dominiq at lps dot ens.fr
2021-04-16 23:07 ` jrfsousa at gmail dot com
2021-06-18 10:58 ` dominiq at lps dot ens.fr
2022-09-25 21:07 ` anlauf at gcc dot gnu.org
2022-10-01 18:10 ` cvs-commit at gcc dot gnu.org
2022-10-08 18:43 ` cvs-commit at gcc dot gnu.org
2022-10-08 18:48 ` cvs-commit at gcc dot gnu.org
2022-10-08 19:04 ` cvs-commit at gcc dot gnu.org
2022-10-08 19:05 ` anlauf 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).