[PATCH, committed] Fortran: error recovery for bad deferred character length assignment [PR104314]

2022-09-15 Thread Harald Anlauf via Fortran
Dear all, the attached obvious patch fixes an ICE on a NULL pointer dereference. We didn't properly check that the types of expressions are character before referencing the length. The issue was originally investigated by Steve, so I made him co-author. Regtested on x86_64-pc-linux-gnu and push

[PATCH, committed] Fortran: catch NULL pointer dereferences while simplifying PACK [PR106857]

2022-09-15 Thread Harald Anlauf via Fortran
Dear all, we hit a NULL pointer dereference when trying to simplify PACK when the MASK argument was present. The obvious and trivial solution is to check for NULL pointer dereferences why looking at the constructor for the ARRAY argument, which we already do in the case the MASK is not present.