[PR fortran/89266, patch] - ICE with TRANSFER of len=0 character array constructor
Harald Anlauf
anlauf@gmx.de
Mon Feb 25 03:32:00 GMT 2019
Committed as rev. 269177. As this patch also fixed PR88326,
I added the testcase below.
Thanks for the review,
Harald
2019-02-24 Harald Anlauf <anlauf@gmx.de>
PR fortran/88326
* gfortran.dg/pr88326.f90: New test.
On 02/23/19 19:10, Thomas Koenig wrote:
> Hi Harald,
>
>> OK for trunk? Or rather wait for post-9.1?
>
> I think this can go into current trunk.
>
> Thanks!
>
> Regards
>
> Thomas
>
-------------- next part --------------
Index: gcc/testsuite/gfortran.dg/pr88326.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr88326.f90 (nonexistent)
+++ gcc/testsuite/gfortran.dg/pr88326.f90 (working copy)
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! PR fortran/88326 - ICE in gfc_conv_array_initializer
+
+program p
+ character, parameter :: x(3) = ['a','b','c']
+ character :: y(1) = transfer('', x) ! { dg-error "Different shape for array assignment" }
+ character(0) :: z(1) = transfer('', x) ! { dg-error "Different shape for array assignment" }
+ character :: u(0) = transfer('', x)
+ print *, y, z, u
+end
More information about the Gcc-patches
mailing list