[Bug fortran/91726] [7/8/9/10 Regression] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3612

2019-09-29 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91726

--- Comment #3 from Paul Thomas  ---
Author: pault
Date: Sun Sep 29 10:12:42 2019
New Revision: 276269

URL: https://gcc.gnu.org/viewcvs?rev=276269=gcc=rev
Log:
2019-09-29  Paul Thomas  

PR fortran/91726
* resolve.c (gfc_expr_to_initialize): Bail out with a copy of
the original expression if the array ref is a scalar and the
array_spec has corank.
* trans-array.c (gfc_conv_array_ref): Such expressions are OK
even if the array ref codimen is zero.
* trans-expr.c (gfc_get_class_from_expr): New function taken
from gfc_get_vptr_from_expr.
(gfc_get_vptr_from_expr): Call new function.
* trans-stmt.c (trans_associate_var): If one of these is a
target expression, extract the class expression from the target
and copy its fields to a new target variable.
* trans.h : Add prototype for gfc_get_class_from_expr.

2019-09-29  Paul Thomas  

PR fortran/91726
* gfortran.dg/coarray_poly_9.f90 : New test.


Added:
trunk/gcc/testsuite/gfortran.dg/coarray_poly_9.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/fortran/trans.h
trunk/gcc/testsuite/ChangeLog

[Bug fortran/91726] [7/8/9/10 Regression] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3612

2019-09-22 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91726

Paul Thomas  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #2 from Paul Thomas  ---
Created attachment 46910
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46910=edit
Patch for the PR

I am just about to submit to the list.

The offending revision was not as Dominique suggested. Not only did it look
unlikely but I reverted it and tested because I just could not figure out which
one was responsible. 

Paul

[Bug fortran/91726] [7/8/9/10 Regression] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3612

2019-09-15 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91726

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-09-15
 CC||pault at gcc dot gnu.org
  Known to work||6.5.0
Summary|[8/9/10 Regression] ICE in  |[7/8/9/10 Regression] ICE
   |gfc_conv_array_ref, at  |in gfc_conv_array_ref, at
   |fortran/trans-array.c:3612  |fortran/trans-array.c:3612
 Ever confirmed|0   |1
  Known to fail||10.0, 7.4.0, 8.3.0, 9.2.0

--- Comment #1 from Dominique d'Humieres  ---
The ICE appeared between revisions r254227 (2017-10-30, OK) and r254498
(2017-11-07, ICE) and had been back ported to GCC7. Could it be r254244?