https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88116
--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Wed, Dec 12, 2018 at 04:59:21PM +0000, gs...@t-online.de wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88116 > > --- Comment #6 from G. Steinmetz <gs...@t-online.de> --- > > (In reply to kargl from comment #5) > > I don't know if you like to keep track of issues that you submit or not. > Maybe I could do better. But for the next couple of weeks, > I'm gonna take an absence from Bugzilla. > > > Do you want to migrate this to its own PR? > This is now pr88467. > > Thanks. > I think I know what the problem is. Just don't know how to fix it. Basically, gfortran is inserting type conversions and doing the checking from the outer array constructor inward. Thus, we have [integer :: 1, [integer(8), 2, '3']] Gfortran sees integer and integer(8) and inserts a conversion via convert_i8_i4. When this is done, the checking of the inner array constructor is lost. So, we have something like [integer :: 1, convert_i8_i4([2, '3']) and the internal representation of gfc_expr contains a union of the various types.