Hi Thomas,
could you review the second patch instead? I have sent the wrong patch
(early draft) and corrected it half an hour later!
https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548779.html
Tobias
On 6/24/20 8:01 PM, Thomas Koenig via Fortran wrote:
Hi Tobias,
OK for the trunk?
I just checked, and this gets a segfault for
program main
character (len=3), parameter :: x = 'abc'
print *, x(2:2)
end program main
+ if (ts)
+ e->kind = ts->kind;
+ else if (e->symtree->n.sym->ts.type == BT_CHARACTER)
+ e->kind = ts->kind;
There are two potential problems: e->symtree could be NULL,
and (if the second assignment is reached) ts is NULL.
You may have meant
e->kind = e->symtree->n.sym->ts.kind;
Could you correct that, and resubmit?
Thanks for working on this!
Best regards
Thomas