public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array
@ 2015-06-02 19:21 wangmianzhi1 at linuxmail dot org
  2015-06-02 19:31 ` [Bug libfortran/66385] " wangmianzhi1 at linuxmail dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: wangmianzhi1 at linuxmail dot org @ 2015-06-02 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66385
           Summary: ICE: FORALL writing multiple elements of one array
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wangmianzhi1 at linuxmail dot org
  Target Milestone: ---

The ICE is triggered when compiling the following code with -O1 or higher -O
levels.

program test
  double precision::a(30)

  forall(i=1:10)
    a(10*[0,1,2]+i)=1d0
  end forall
end program


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

* [Bug libfortran/66385] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
@ 2015-06-02 19:31 ` wangmianzhi1 at linuxmail dot org
  2015-06-03 13:11 ` [Bug fortran/66385] " dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wangmianzhi1 at linuxmail dot org @ 2015-06-02 19:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Mianzhi Wang <wangmianzhi1 at linuxmail dot org> ---
The bug is bypassed by -fno-frontend-optimize, same as in the case of 66050 and
66386.


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

* [Bug fortran/66385] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
  2015-06-02 19:31 ` [Bug libfortran/66385] " wangmianzhi1 at linuxmail dot org
@ 2015-06-03 13:11 ` dominiq at lps dot ens.fr
  2015-06-03 13:27 ` [Bug fortran/66385] [4.9/5/6 Regression] " dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-06-03 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 66386 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/66385] [4.9/5/6 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
  2015-06-02 19:31 ` [Bug libfortran/66385] " wangmianzhi1 at linuxmail dot org
  2015-06-03 13:11 ` [Bug fortran/66385] " dominiq at lps dot ens.fr
@ 2015-06-03 13:27 ` dominiq at lps dot ens.fr
  2015-06-04  8:54 ` tkoenig at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-06-03 13:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.8.4
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2015-06-03
                 CC|                            |tkoenig at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|ICE: FORALL writing         |[4.9/5/6 Regression] ICE:
                   |multiple elements of one    |FORALL writing multiple
                   |array                       |elements of one array
      Known to fail|                            |4.9.2, 5.1.0, 6.0

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The ICE appeared between revisions r197010 (2013-03-23, OK) and r197238
(2013-03-29, ICE), likely r197216 (pr55806) or r197217 (pr45159).


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

* [Bug fortran/66385] [4.9/5/6 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (2 preceding siblings ...)
  2015-06-03 13:27 ` [Bug fortran/66385] [4.9/5/6 Regression] " dominiq at lps dot ens.fr
@ 2015-06-04  8:54 ` tkoenig at gcc dot gnu.org
  2015-06-04  9:25 ` tkoenig at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-06-04  8:54 UTC (permalink / raw)
  To: gcc-bugs

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

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


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

* [Bug fortran/66385] [4.9/5/6 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (3 preceding siblings ...)
  2015-06-04  8:54 ` tkoenig at gcc dot gnu.org
@ 2015-06-04  9:25 ` tkoenig at gcc dot gnu.org
  2015-06-05 20:51 ` tkoenig at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-06-04  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |36854

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
As I wrote in the other PR, BLOCKs created by front-end optimization and FORALL
don't mix well.

The solution is not to attempt that particular optimization within a FORALL.

Index: frontend-passes.c
===================================================================
--- frontend-passes.c   (Revision 223876)
+++ frontend-passes.c   (Arbeitskopie)
@@ -1243,6 +1243,10 @@ combine_array_constructor (gfc_expr *e)
   if (in_assoc_list)
     return false;

+  /* With FORALL, the BLOCKS created by create_var will cause an ICE.  */
+  if (forall_level > 0)
+    return false;
+
   op1 = e->value.op.op1;
   op2 = e->value.op.op2;


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36854
[Bug 36854] [meta-bug] fortran front-end optimization


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

* [Bug fortran/66385] [4.9/5/6 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (4 preceding siblings ...)
  2015-06-04  9:25 ` tkoenig at gcc dot gnu.org
@ 2015-06-05 20:51 ` tkoenig at gcc dot gnu.org
  2015-06-14 10:08 ` tkoenig at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-06-05 20:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Fri Jun  5 20:51:08 2015
New Revision: 224172

URL: https://gcc.gnu.org/viewcvs?rev=224172&root=gcc&view=rev
Log:
2015-06-05  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/66385
        * frontend-passes.c (combine_array_constructor): Return early if
        inside a FORALL loop.

2015-06-05  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/66385
        * gfortran.dg/forall_17.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/forall_17.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/frontend-passes.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug fortran/66385] [4.9/5/6 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (5 preceding siblings ...)
  2015-06-05 20:51 ` tkoenig at gcc dot gnu.org
@ 2015-06-14 10:08 ` tkoenig at gcc dot gnu.org
  2015-10-16  8:22 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-06-14 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Sun Jun 14 10:08:00 2015
New Revision: 224465

URL: https://gcc.gnu.org/viewcvs?rev=224465&root=gcc&view=rev
Log:
2015-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/66385
        Backport from trunk
        * frontend-passes.c (combine_array_constructor): Return early if
        inside a FORALL loop.

2015-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/66385
        * gfortran.dg/forall_17.f90:  New test.



Added:
    branches/gcc-5-branch/gcc/testsuite/gfortran.dg/forall_17.f90
Modified:
    branches/gcc-5-branch/gcc/fortran/ChangeLog
    branches/gcc-5-branch/gcc/fortran/frontend-passes.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


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

* [Bug fortran/66385] [4.9/5/6 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (6 preceding siblings ...)
  2015-06-14 10:08 ` tkoenig at gcc dot gnu.org
@ 2015-10-16  8:22 ` rguenth at gcc dot gnu.org
  2015-10-18 11:30 ` [Bug fortran/66385] [4.9 " tkoenig at gcc dot gnu.org
  2015-10-18 11:30 ` tkoenig at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-16  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.4


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

* [Bug fortran/66385] [4.9 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (8 preceding siblings ...)
  2015-10-18 11:30 ` [Bug fortran/66385] [4.9 " tkoenig at gcc dot gnu.org
@ 2015-10-18 11:30 ` tkoenig at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-10-18 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed on all affected branches, closing.


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

* [Bug fortran/66385] [4.9 Regression] ICE: FORALL writing multiple elements of one array
  2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
                   ` (7 preceding siblings ...)
  2015-10-16  8:22 ` rguenth at gcc dot gnu.org
@ 2015-10-18 11:30 ` tkoenig at gcc dot gnu.org
  2015-10-18 11:30 ` tkoenig at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-10-18 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Author: tkoenig
Date: Sun Oct 18 11:29:37 2015
New Revision: 228943

URL: https://gcc.gnu.org/viewcvs?rev=228943&root=gcc&view=rev
Log:
2015-10-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

        Backport from trunk
        PR fortran/66385
        * frontend-passes.c (combine_array_constructor): Return early if
        inside a FORALL loop.

2015-10-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

        Backport from trunk
        PR fortran/66385
        * gfortran.dg/forall_17.f90:  New test.


Added:
    branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/forall_17.f90
Modified:
    branches/gcc-4_9-branch/gcc/fortran/ChangeLog
    branches/gcc-4_9-branch/gcc/fortran/frontend-passes.c
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2015-10-18 11:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-02 19:21 [Bug libfortran/66385] New: ICE: FORALL writing multiple elements of one array wangmianzhi1 at linuxmail dot org
2015-06-02 19:31 ` [Bug libfortran/66385] " wangmianzhi1 at linuxmail dot org
2015-06-03 13:11 ` [Bug fortran/66385] " dominiq at lps dot ens.fr
2015-06-03 13:27 ` [Bug fortran/66385] [4.9/5/6 Regression] " dominiq at lps dot ens.fr
2015-06-04  8:54 ` tkoenig at gcc dot gnu.org
2015-06-04  9:25 ` tkoenig at gcc dot gnu.org
2015-06-05 20:51 ` tkoenig at gcc dot gnu.org
2015-06-14 10:08 ` tkoenig at gcc dot gnu.org
2015-10-16  8:22 ` rguenth at gcc dot gnu.org
2015-10-18 11:30 ` [Bug fortran/66385] [4.9 " tkoenig at gcc dot gnu.org
2015-10-18 11:30 ` 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).