* [Patch, fortran] PR83898 - [6/7/8 Regression] ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:7181
@ 2018-01-23 19:29 Paul Richard Thomas
0 siblings, 0 replies; only message in thread
From: Paul Richard Thomas @ 2018-01-23 19:29 UTC (permalink / raw)
To: fortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 372 bytes --]
Commit as 'obvious' in revision 256994.
I will attend to 6- and 7-branches in a little while.
Paul
2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898
* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
for characters.
2018-23-01 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83898
* gfortran.dg/associate_33.f03 : New test.
[-- Attachment #2: submit.diff --]
[-- Type: text/plain, Size: 1458 bytes --]
Index: gcc/fortran/trans-stmt.c
===================================================================
*** gcc/fortran/trans-stmt.c (revision 256606)
--- gcc/fortran/trans-stmt.c (working copy)
*************** trans_associate_var (gfc_symbol *sym, gf
*** 1579,1585 ****
desc = sym->backend_decl;
cst_array_ctor = e->expr_type == EXPR_ARRAY
! && gfc_constant_array_constructor_p (e->value.constructor);
/* If association is to an expression, evaluate it and create temporary.
Otherwise, get descriptor of target for pointer assignment. */
--- 1579,1586 ----
desc = sym->backend_decl;
cst_array_ctor = e->expr_type == EXPR_ARRAY
! && gfc_constant_array_constructor_p (e->value.constructor)
! && e->ts.type != BT_CHARACTER;
/* If association is to an expression, evaluate it and create temporary.
Otherwise, get descriptor of target for pointer assignment. */
Index: gcc/testsuite/gfortran.dg/associate_33.f03
===================================================================
*** gcc/testsuite/gfortran.dg/associate_33.f03 (nonexistent)
--- gcc/testsuite/gfortran.dg/associate_33.f03 (working copy)
***************
*** 0 ****
--- 1,11 ----
+ ! { dg-do run }
+ !
+ ! Test the fix for PR83898.f90
+ !
+ ! Contributed by G Steinmetz <gscfq@t-online.de>
+ !
+ program p
+ associate (x => ['1','2'])
+ if (any (x .ne. ['1','2'])) call abort
+ end associate
+ end
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-01-23 19:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 19:29 [Patch, fortran] PR83898 - [6/7/8 Regression] ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:7181 Paul Richard Thomas
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).