https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101871
--- Comment #6 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Sun, Aug 15, 2021 at 07:21:42PM +0000, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101871 > > --- Comment #5 from anlauf at gcc dot gnu.org --- > In array.c:gfc_match_array_constructor there's the following code: > > 1335 /* Walk the constructor, and if possible, do type conversion for > 1336 numeric types. */ > 1337 if (gfc_numeric_ts (&ts)) > 1338 { > 1339 m = walk_array_constructor (&ts, head); > 1340 if (m == MATCH_ERROR) > 1341 return m; > 1342 } > > Steve, you were the last one to work on this block. > It appears that non-numeric ts are not handled (here). > Can you give some insight? > Unfortunately, I can't remember why it's confined to numeric types. I did the simply thing of commenting out the if-stmt and got an ICE. I also tried explicitly setting the typespec of each array element to the typespec of array constructor and that also ICE'd. I haven't had time to polk further. I think at some point the actual arg list is reduced to a formal argument list. This might loose the array constructor typespec when reducing/resolving the arg list.