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:

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-28 Thread Harald Anlauf
Hi Paul, Am 28.11.24 um 13:55 schrieb Paul Richard Thomas: Hi Harald, I'll wait until tomorrow to see if Paul intervenes. Otherwise I will proceed and push. I succeeded in breaking things even more! Please proceed and push. I'm sort of glad you failed, too! ;-) Pushed as r15-5766 .

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

2024-11-28 Thread Paul Richard Thomas
Hi Harald, > >> I'll wait until tomorrow to see if Paul intervenes. Otherwise I will >> proceed and push. >> > I succeeded in breaking things even more! Please proceed and push. Thanks Paul

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

2024-11-28 Thread Paul Richard Thomas
Hi Harald and Jerry, I cannot see why the segfault is occurring of course: _gfortran_transfer_character_write (&dt_parm.9, &"line 4:"[1]{lb: 1 sz: 1}, 7); { struct array01_integer(kind=4) parm.10; integer(kind=8) D.4841; struct array01_intege

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

2024-11-27 Thread Harald Anlauf
Am 27.11.24 um 21:56 schrieb Jerry D: On 11/27/24 12:31 PM, Harald Anlauf wrote: Dear all, the attached patch fixes a wrong-code issue with bounds-checking enabled when doing I/O of an array section and an index is either an expression or a function result.  The problem does not occur without b

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

2024-11-27 Thread Jerry D
On 11/27/24 12:31 PM, Harald Anlauf wrote: Dear all, the attached patch fixes a wrong-code issue with bounds-checking enabled when doing I/O of an array section and an index is either an expression or a function result. The problem does not occur without bounds-checking. When looking at the or

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

2024-11-27 Thread Harald Anlauf
14/15 regression, so a backport is advisable. Thanks, Harald From fa47a04e74a862ea4b85fa6f74b4b6ce21b61716 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Wed, 27 Nov 2024 21:11:16 +0100 Subject: [PATCH] Fortran: fix crash with bounds check writing array section [PR117791] PR fortran