This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/82007] New: DTIO write format stored in a string leads to severe errors


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

            Bug ID: 82007
           Summary: DTIO write format stored in a string leads to severe
                    errors
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Edouard.Canot@univ-rennes1.fr
  Target Milestone: ---

Created attachment 42061
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42061&action=edit
Source file of dtio_bug_1.f90

Many tests of the DTIO feature (in .../gcc/testsuite/gfortran.dg/dtio_*.f90)
use inline format like in:
   write( unit=10, fmt="(DT'zeroth')", iostat=myiostat, iomsg=astring) member

When I attempted to put the DTIO format string "(DT'zeroth')" in a character
string, I got many kinds of error, from ICE (Internal Compiler Error) to bad
execution.

See the attached file (which comes from the Gfortran testsuite dtio_1.f90,
simplified as much as possible) : dtio_bug_1.f90

According the length of the character string, it may lead to some errors. I
think the bug is related to how is read the DTIO format string.

The bug occurs either from GCC-7.2 compiled by myself on Ubuntu-16.10, either
from GCC-7.2 packaged in Ubuntu-17.10.

Regards,
Édouard

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]