Re: [PATCH] Fortran: error recovery for invalid types in array constructors [PR107000]

2022-10-05 Thread Mikael Morin
Le 05/10/2022 à 10:51, Mikael Morin a écrit : Unfortunately, it doesn't fix the bogus incommensurate arrays errors. The following does. diff --git a/gcc/fortran/arith.cc b/gcc/fortran/arith.cc index e6e35ef3c42..2c57c796270 100644 --- a/gcc/fortran/arith.cc +++ b/gcc/fortran/arith.cc @@

Re: [PATCH] Fortran: error recovery for invalid types in array constructors [PR107000]

2022-10-05 Thread Mikael Morin
Hello Le 04/10/2022 à 23:19, Harald Anlauf via Fortran a écrit : Dear all, we did not recover well from bad expressions in array constructors, especially when there was a typespec and a unary '+' or '-', and when the array constructor was used in an arithmetic expression. The attached patch

[PATCH] Fortran: error recovery for invalid types in array constructors [PR107000]

2022-10-04 Thread Harald Anlauf via Gcc-patches
] Fortran: error recovery for invalid types in array constructors [PR107000] gcc/fortran/ChangeLog: PR fortran/107000 * arith.cc (gfc_arith_error): Define error message for ARITH_INVALID_TYPE. (reduce_unary): Catch arithmetic expressions with invalid type. (reduce_binary_ac): Likewise