public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-27  9:51 ` markeggleston at gcc dot gnu.org
  2020-03-27 15:42 ` kargl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: markeggleston at gcc dot gnu.org @ 2020-03-27  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

markeggleston at gcc dot gnu.org changed:

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

--- Comment #3 from markeggleston at gcc dot gnu.org ---
A patch from Steve Kargl was sent to the fortran mailing list, (see
https://gcc.gnu.org/pipermail/fortran/2020-March/054130.html) without reference
to any PR.

It appeared to be related to this PR. I have verified the patch and also
checked it with the test case in the original report.

The result is:

    5 |   equivalence (i, arr(1))
      |                 1
Error: Array 'arr' at (1) with non-constant bounds cannot be an EQUIVALENCE
object

The above is much better than an ICE. Thanks Steve.

I will add test cases to the patch and will send it upstream for approval for
master and backports to gcc-8 and gcc-9.

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

* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
  2020-03-27  9:51 ` [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n markeggleston at gcc dot gnu.org
@ 2020-03-27 15:42 ` kargl at gcc dot gnu.org
  2020-04-02  6:19 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-03-27 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to markeggleston from comment #3)
> A patch from Steve Kargl was sent to the fortran mailing list, (see
> https://gcc.gnu.org/pipermail/fortran/2020-March/054130.html) without
> reference to any PR.
> 
> It appeared to be related to this PR. I have verified the patch and also
> checked it with the test case in the original report.

Techinically, it is related to 

https://stackoverflow.com/questions/60846187/fortran-equivalence-statement-with-array-length-from-subroutine-input

In the stackoverflow thread, someone mentioned this is a regression going back
to at least 6.5.

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

* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
  2020-03-27  9:51 ` [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n markeggleston at gcc dot gnu.org
  2020-03-27 15:42 ` kargl at gcc dot gnu.org
@ 2020-04-02  6:19 ` cvs-commit at gcc dot gnu.org
  2020-04-02  7:27 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-02  6:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

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

commit r10-7507-gbf1f6d8819ade074271df718f01fd3a5a9dc1b82
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Thu Apr 2 07:18:52 2020 +0100

    fortran: ICE equivalence with an element of an array PR94030

    Deferred size arrays can not be used in equivalance statements.

    gcc/fortran/ChangeLog:

            PR fortran/94030
            * resolve.c (resolve_equivalence): Correct formatting
            around the label "identical_types".  Instead of using
            gfc_resolve_array_spec use is_non_constants_shape_array
            to determine whether the array can be used in a in an
            equivalence statement.

    gcc/testsuite/ChangeLog:

            PR fortran/94030
            * gfortran.dg/pr94030_1.f90
            * gfortran.dg/pr94030_2.f90

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

* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-04-02  6:19 ` cvs-commit at gcc dot gnu.org
@ 2020-04-02  7:27 ` cvs-commit at gcc dot gnu.org
  2020-04-02  7:32 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-02  7:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:514bd32c5273b1b6c3438016faf96ffdd45639ca

commit r9-8440-g514bd32c5273b1b6c3438016faf96ffdd45639ca
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Thu Apr 2 08:26:34 2020 +0100

    fortran: ICE equivalence with an element of an array PR94030

    Deferred size arrays can not be used in equivalance statements.

    gcc/fortran/ChangeLog:

            Backport from master
            2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

            PR fortran/94030
            * resolve.c (resolve_equivalence): Correct formatting
            around the label "identical_types".  Instead of using
            gfc_resolve_array_spec use is_non_constants_shape_array
            to determine whether the array can be used in a in an
            equivalence statement.

    gcc/testsuite/ChangeLog:

            Backport from master
            2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

            PR fortran/94030
            * gfortran.dg/pr94030_1.f90
            * gfortran.dg/pr94030_2.f90

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

* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-04-02  7:27 ` cvs-commit at gcc dot gnu.org
@ 2020-04-02  7:32 ` cvs-commit at gcc dot gnu.org
  2020-04-02  7:46 ` markeggleston at gcc dot gnu.org
  2020-04-16 13:06 ` tkoenig at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-02  7:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:26191cec3421a157f4bafa7760cfd1bc4f90f0e5

commit r8-10157-g26191cec3421a157f4bafa7760cfd1bc4f90f0e5
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Thu Apr 2 08:32:05 2020 +0100

    fortran: ICE equivalence with an element of an array PR94030

    Deferred size arrays can not be used in equivalance statements.

    gcc/fortran/ChangeLog:

            Backport from master
            2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

            PR fortran/94030
            * resolve.c (resolve_equivalence): Correct formatting
            around the label "identical_types".  Instead of using
            gfc_resolve_array_spec use is_non_constants_shape_array
            to determine whether the array can be used in a in an
            equivalence statement.

    gcc/testsuite/ChangeLog:

            Backport from master
            2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>

            PR fortran/94030
            * gfortran.dg/pr94030_1.f90
            * gfortran.dg/pr94030_2.f90

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

* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-04-02  7:32 ` cvs-commit at gcc dot gnu.org
@ 2020-04-02  7:46 ` markeggleston at gcc dot gnu.org
  2020-04-16 13:06 ` tkoenig at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: markeggleston at gcc dot gnu.org @ 2020-04-02  7:46 UTC (permalink / raw)
  To: gcc-bugs

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

markeggleston at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #8 from markeggleston at gcc dot gnu.org ---
Commits for master and backports:

r10-7507-gbf1f6d8819ade074271df718f01fd3a5a9dc1b82
r9-8440-g514bd32c5273b1b6c3438016faf96ffdd45639ca
r8-10157-g26191cec3421a157f4bafa7760cfd1bc4f90f0e5

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

* [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n
       [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-04-02  7:46 ` markeggleston at gcc dot gnu.org
@ 2020-04-16 13:06 ` tkoenig at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-04-16 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jiri.pittner@jh-inst.cas.cz

--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
*** Bug 88452 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2020-04-16 13:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-94030-4@http.gcc.gnu.org/bugzilla/>
2020-03-27  9:51 ` [Bug fortran/94030] [8/9/10 Regression] ICE equivalence of an integer and an element of an array of size n markeggleston at gcc dot gnu.org
2020-03-27 15:42 ` kargl at gcc dot gnu.org
2020-04-02  6:19 ` cvs-commit at gcc dot gnu.org
2020-04-02  7:27 ` cvs-commit at gcc dot gnu.org
2020-04-02  7:32 ` cvs-commit at gcc dot gnu.org
2020-04-02  7:46 ` markeggleston at gcc dot gnu.org
2020-04-16 13:06 ` tkoenig 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).