[Bug fortran/45425] Bounds check applied before MASK of WHERE construct

2021-12-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45425 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic Last

[Bug fortran/45425] Bounds check applied before MASK of WHERE construct

2010-08-28 Thread burnus at gcc dot gnu dot org
--- Comment #2 from burnus at gcc dot gnu dot org 2010-08-28 15:40 --- The error message is generated in gfc_conv_array_ref it's called via gfc_trans_where_3 - gfc_conv_loop_setup - gfc_add_loop_ss_code - gfc_conv_variable Thus, the condition (mask) ends up at gfc_add_ss_to_loop

[Bug fortran/45425] Bounds check applied before MASK of WHERE construct

2010-08-28 Thread mikael at gcc dot gnu dot org
--- Comment #3 from mikael at gcc dot gnu dot org 2010-08-28 17:42 --- Ouch! We need some sort of lazy evaluation. Like (pseudo-code) bool scalar_ever_evaluated = false; whatever_type scalar_value; while(1) { /* loop handling stuff */ if (scalar_ever_evaluated) {

[Bug fortran/45425] Bounds check applied before MASK of WHERE construct

2010-08-28 Thread tkoenig at gcc dot gnu dot org
-- tkoenig at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last

[Bug fortran/45425] Bounds check applied before MASK of WHERE construct

2010-08-27 Thread burnus at gcc dot gnu dot org
--- Comment #1 from burnus at gcc dot gnu dot org 2010-08-27 11:58 --- Confirm, the bounds checks are misplaces. Simplified test case: implicit none integer :: A(1), i,b(1) logical :: mask(1) mask = .false. b = 5 do i = 2, 2 where (mask) A = b(i) end where end do end If one