Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-25 Thread Thomas Koenig via Gcc-patches
Hi Tobias, OK – with assert or without? I don't think the assert is needed - if things go wrong there, then I am quite sure that we will get all sorts of ICEs downstream if this is not set correctly somewhere after all, and your testing indicates that it is not. Besides, I like the elegance o

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-25 Thread Tobias Burnus
-- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter Fortran: Fix character-kind=4 substring resolution (PR95837) gcc/fortran/ChangeLog: PR fortran/95837 * resolve.c (gfc_resolv

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-24 Thread Thomas Koenig via Gcc-patches
Hi Tobias, could you review the second patch instead? I have sent the wrong patch (early draft) and corrected it half an hour later! Sorry, I missed that. Here's the review of the real patch :-) So, the first part is + if (ts) +e->ts.kind = ts->kind; Ok, I unerstand that - ts has been

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-24 Thread Tobias Burnus
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

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-24 Thread Thomas Koenig via Gcc-patches
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 a

Re: Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-23 Thread Tobias Burnus
1 Error: Operands of comparison operator ‘/=’ at (1) are CHARACTER(3)/CHARACTER(3,4) - Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter Fortran: Fix character-kind=4

Fortran: Fix character-kind=4 substring resolution (PR95837)

2020-06-23 Thread Tobias Burnus
) - Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter Fortran: Fix character-kind=4 substring resolution (PR95837) gcc/fortran/ChangeLog: PR fortran/95837 * resolve.c