[Bug libfortran/80727] [7/8 Regression] Crash of runtime gfortran library during integer transformation

2017-05-17 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80727

Jerry DeLisle  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Jerry DeLisle  ---
Fixed on 7 and 8. Closing

Thanks for report.

[Bug libfortran/80727] [7/8 Regression] Crash of runtime gfortran library during integer transformation

2017-05-17 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80727

--- Comment #4 from Jerry DeLisle  ---
Author: jvdelisle
Date: Wed May 17 20:00:53 2017
New Revision: 248167

URL: https://gcc.gnu.org/viewcvs?rev=248167=gcc=rev
Log:
2017-05-17  Jerry DeLisle  

Backport from trunk
PR libgfortran/80727
* transfer.c (read_sf_internal): Remove bogus code to detect EOR.
(read_block_form): For internal units, generate EOR if no more
bytes left in unit and we are trying to read with ADVANCE='NO'.

* gfortran.dg/read_3.f90: New test.

Added:
branches/gcc-7-branch/gcc/testsuite/gfortran.dg/read_3.f90
Modified:
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/libgfortran/ChangeLog
branches/gcc-7-branch/libgfortran/io/transfer.c

[Bug libfortran/80727] [7/8 Regression] Crash of runtime gfortran library during integer transformation

2017-05-15 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80727

--- Comment #3 from Jerry DeLisle  ---
Author: jvdelisle
Date: Mon May 15 23:48:39 2017
New Revision: 248080

URL: https://gcc.gnu.org/viewcvs?rev=248080=gcc=rev
Log:
2017-05-15  Jerry DeLisle  

PR libgfortran/80727
* transfer.c (read_sf_internal): Remove bogus code to detect EOR.
(read_block_form): For internal units, generate EOR if no more
bytes left in unit and we are trying to read with ADVANCE='NO'.

* gfortran.dg/read_3.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/read_3.f90
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c

[Bug libfortran/80727] [7/8 Regression] Crash of runtime gfortran library during integer transformation

2017-05-14 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80727

Jerry DeLisle  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org

--- Comment #2 from Jerry DeLisle  ---
Mine, studying it.

[Bug libfortran/80727] [7/8 Regression] Crash of runtime gfortran library during integer transformation

2017-05-12 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80727

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
  Known to work||5.4.0, 6.3.0
   Keywords||wrong-code
   Last reconfirmed||2017-05-12
 CC||jvdelisle at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|Crash of runtime gfortran   |[7/8 Regression] Crash of
   |library during integer  |runtime gfortran library
   |transformation  |during integer
   ||transformation
   Target Milestone|--- |7.2
  Known to fail||7.1.0, 8.0

--- Comment #1 from Dominique d'Humieres  ---
Simplified test (the infamous IO of numerical values with the '(A)' format)

  PROGRAMGFORTRAN_710_IO_BUG
  CHARACTER  STR*4
  INTEGER*4  I4
  str =''
  i = 256
  write(str,fmt='(A)') I
  print *, ichar(str(1:1)), ichar(str(2:2)), ichar(str(3:3)),
ichar(str(4:4))
  READ ( UNIT=STR(1:4), FMT='(A)' ) I4
  WRITE ( 6, * ) ' I4= ', I4
  END  PROGRAM  GFORTRAN_710_IO_BUG 

Likely caused by r246478 (pr78881).