https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100227

            Bug ID: 100227
           Summary: write with implicit loop
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: priv123 at hotmail dot fr
  Target Milestone: ---

Created attachment 50657
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50657&action=edit
example code

The code in attachment runs properly with gfortran 6.3.0 with -O1 and with
gfortran 8.3.0 with -O0, but fails with gfortran 8.3.0 with -O1:

+ gfortran --version
GNU Fortran (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

+ gfortran -Wall -Wextra -O1 pb_write.F90
+ ./a.out
 KO if -O1/gcc8   4.57776182E-41  -773.585938       3.06225753E-41
 OK: add index            1   1.00000000               5   5.00000000          
    9   9.00000000
 OK: rearranged   1.00000000       5.00000000       9.00000000
 OK: two vars     1.00000000       5.00000000       9.00000000

+ gfortran -Wall -Wextra -O0 pb_write.F90
+ ./a.out
 KO if -O1/gcc8   1.00000000       5.00000000       9.00000000
 OK: add index            1   1.00000000               5   5.00000000          
    9   9.00000000
 OK: rearranged   1.00000000       5.00000000       9.00000000
 OK: two vars     1.00000000       5.00000000       9.00000000

As see in bug 86837, it is also ok with -O1 -fno-frontend-optimize.

I'm emitting a new bug since it should have been fixed in 8.2.1 and it seems in
failure with 8.3.0.

I will check and post results with last available docker images to see if it is
fixed after 8.3.0...

Thanks for reading!

Reply via email to