[Patch] Fortran: dump-parse-tree.c fixes for OpenMP

2021-10-13 Thread Tobias Burnus
I recently saw that 'ancestor:' wasn't handled in -fdump-parse-tree. I also did run once into an ICE for the swap flag in atomics when dumping. – This fixes the two. Additionally, I changed 'ancestor' to a bit field. Comments? If not, I will commit it later today. Tobias - Sieme

[Patch] [v3] Fortran: Fix Bind(C) Array-Descriptor Conversion (Move to Front-End Code)

2021-10-13 Thread Tobias Burnus
Dear all, a minor update [→ v3]. I searched for XFAIL in Sandra's c-interop/ and found two remaining true** xfails, now fixed: - gfortran.dg/c-interop/typecodes-scalar-basic.f90 The conversion of scalars of type(c_ptr) was mishandled; fixed now; the fix did run into issues converting a stri

[PATCH] PR fortran/102717 - ICE in gfc_simplify_reshape, at fortran/simplify.c:6843

2021-10-13 Thread Harald Anlauf via Fortran
Dear Fortranners, when simplifying RESHAPE we hit a gcc_assert for negative entries in the SHAPE array. Obvious solution: replace gcc_assert by an error message. Regtested on x86_64-pc-linux-gnu. OK for mainline? As this is a safe fix, I'd like to backport to suitable branches. Thanks, Harald

[PATCH] PR fortran/102716 - ICE in gfc_validate_kind(): Got bad kind

2021-10-13 Thread Harald Anlauf via Fortran
Dear Fortranners, another simple and obvious fix: we need to reorder the argument checks to the SHAPE intrinsic so that invalid KIND arguments can be detected. Regtested on x86_64-pc-linux-gnu. OK for mainline? As I consider this a safe fix, I'd like to backport to suitable branches. Thanks, H

Re: [Patch] [v3] Fortran: Fix Bind(C) Array-Descriptor Conversion (Move to Front-End Code)

2021-10-13 Thread Harald Anlauf via Fortran
Hi Tobias, Am 13.10.21 um 18:01 schrieb Tobias Burnus: Dear all, a minor update [→ v3]. this has become an impressive work. I searched for XFAIL in Sandra's c-interop/ and found two remaining true** xfails, now fixed: - gfortran.dg/c-interop/typecodes-scalar-basic.f90   The conversion of

Re: [PATCH] PR fortran/102717 - ICE in gfc_simplify_reshape, at fortran/simplify.c:6843

2021-10-13 Thread Thomas Koenig via Fortran
H Harald, when simplifying RESHAPE we hit a gcc_assert for negative entries in the SHAPE array. Obvious solution: replace gcc_assert by an error message. Regtested on x86_64-pc-linux-gnu. OK for mainline? As this is a safe fix, I'd like to backport to suitable branches. OK for both. Thank

Re: [PATCH] PR fortran/102716 - ICE in gfc_validate_kind(): Got bad kind

2021-10-13 Thread Thomas Koenig via Fortran
Hi Harald, another simple and obvious fix: we need to reorder the argument checks to the SHAPE intrinsic so that invalid KIND arguments can be detected. Regtested on x86_64-pc-linux-gnu. OK for mainline? As I consider this a safe fix, I'd like to backport to suitable branches. Also OK for b