On Sat, Feb 10, 2024 at 06:00:42PM -0800, Steve Kargl wrote: > > The problem here is that sym->ts.u.cl->length == NULL. If I change > the conditional to > > if (sym->ts.type == BT_CHARACTER > && sym->ts.u.cl->length > && !INTEGER_CST_P (sym->ts.u.cl->backend_decl)) > > then the option -fdump-tree-original produces > > void bar () > { > integer(kind=8) .s; > struct array01_character(kind=1) s; > > try > { > s.data = 0B; > s.dtype = {.elem_len=(unsigned long) .s, .version=0, .rank=1, > .type=6}; > bah ((character(kind=1)[0:][1:.s] * restrict) s.data, .s); > } >
Well, that leads to a regression. The goes removes references to an undefined variable, and gives a regression? I tried to artificial set length to 0 (and -1 but -1 is 0) and that leads to even more regressions?? -- Steve