Re: [PATCH] Fortran: fix crash with bounds check writing array section [PR117791]

2024-11-29 Thread Andreas Schwab
../../gcc/fortran/trans-io.cc: In function 'tree_node* gfc_trans_transfer(gfc_code*)': ../../gcc/fortran/trans-io.cc:2662:24: error: enumeration value 'EXPR_UNKNOWN' not handled in switch [-Werror=switch] 2662 | switch (ref->u.ar.start[n]->expr_type) |

Re: [PATCH] Fortran: fix crash with bounds check writing array section [PR117791]

2024-11-29 Thread Tobias Burnus
H Harald, hi Paul, Harald Anlauf wrote: Pushed as r15-5766 . This caused a build fail; see also: https://gcc.gnu.org/PR117843 It looks as if a 'default: break;' is missing. …/gcc/fortran/trans-io.cc: In function 'tree_node* gfc_trans_transfer(gfc_code*)': …/gcc/fortran/trans-io.cc:2662:24:

[PUSHED] fortran: Add default to switch in gfc_trans_transfer [PR117843]

2024-11-29 Thread Andrew Pinski
This fixes a bootstrap failure due to a warning on enum values not being handled. In this case, it is just checking two values and the rest should are not handled so adding a default case fixes the issue. Pushed as obvious. PR fortran/117843 gcc/fortran/ChangeLog: * trans-io.cc (

[Patch, fortran] PR102689 revisited - Segfault with RESHAPE of CLASS as actual argument

2024-11-29 Thread Paul Richard Thomas
Hi All, This patch was originally pushed as r15-2739. Subsequently memory faults were found and so the patch was reverted. At the time, I could find where the problem lay. This morning I had another look and found it almost immediately :-) The fix is the 'gfc_resize_class_size_with_len' in the ch

Re: [PUSHED] fortran: Add default to switch in gfc_trans_transfer [PR117843]

2024-11-29 Thread Harald Anlauf
Thanks, Andrew, for fixing this! I did not get any reports from the pre-commit testers; I only saw the fallout later. And sorry for breaking bootstrap! Harald Am 29.11.24 um 10:16 schrieb Andrew Pinski: This fixes a bootstrap failure due to a warning on enum values not being handled. In this

Re: [Patch, fortran] PR102689 revisited - Segfault with RESHAPE of CLASS as actual argument

2024-11-29 Thread Harald Anlauf
Hi Paul, the patch seems to contain stuff that has already been pushed (gcc/testsuite/gfortran.dg/pr117768.f90, and the chunks in class.cc and resolve.cc). Can you please check? Cheers, Harald Am 29.11.24 um 17:34 schrieb Paul Richard Thomas: Hi All, This patch was originally pushed as r15-2

Re: [Patch, fortran] PR102689 revisited - Segfault with RESHAPE of CLASS as actual argument

2024-11-29 Thread Paul Richard Thomas
Hi Harald, Sorry about that - it was the standard HEAD versus HEAD~ mistake. Thanks for pointing it out. Paul On Fri, 29 Nov 2024 at 17:31, Harald Anlauf wrote: > Hi Paul, > > the patch seems to contain stuff that has already been pushed > (gcc/testsuite/gfortran.dg/pr117768.f90, and the chu