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

            Bug ID: 78150
           Summary: Runtime segmentation fault when write variable on
                    string
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mirco.valentini at polimi dot it
  Target Milestone: ---

Environment:
-----------

 - Debian 8
 - gfortran 7.0.0 20161023


Problem:
-------
When I try to write a variable on a string the result is a 
runtime segmentation fault in small programs and an empty 
string in bigger programs. 

The problem was not present in gfortran 6.0.0 20160320, 
maybe it is related to UDTIO. 


Example:
-------
Here is a small example program that expose the problem:
!================================================================
PROGRAM write_on_string
CHARACTER(LEN=10) :: str
INTEGER :: a
a = 4
WRITE(str,'(I2)') a
END PROGRAM write_on_string
!================================================================

Reply via email to