[Bug fortran/86945] BUG with optimisation of select case statement in gfortran v8.x

2018-08-15 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86945 --- Comment #4 from Harald Anlauf --- (In reply to Harald Anlauf from comment #3) > Self contained alternative testcase: > With -Og, -O1 and higher: > > id= 1 > ierr1, OK =0 T > ierr2, OK =1 F The magic opti

[Bug fortran/86945] BUG with optimisation of select case statement in gfortran v8.x

2018-08-14 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86945 --- Comment #3 from Harald Anlauf --- Self contained alternative testcase: program test implicit none integer, volatile :: id,ierr id = 1 print*,'id=',id call foo1 () print*,'ierr1, OK = ',ierr, ierr == 0 call foo2 () print*,'ier

[Bug fortran/86945] BUG with optimisation of select case statement in gfortran v8.x

2018-08-14 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86945 --- Comment #2 from Harald Anlauf --- Changing the line: case(:-1) to case(-HUGE(0):-1) makes the bug disappear; changing it to case(-HUGE(0)-1:-1) makes it reappear.

[Bug fortran/86945] BUG with optimisation of select case statement in gfortran v8.x

2018-08-14 Thread anlauf at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86945 Harald Anlauf changed: What|Removed |Added CC||anlauf at gmx dot de --- Comment #1 from