public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gerhard.steinmetz.fortran@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66724] New: ICE on input/output statements with wrong specifier data
Date: Wed, 01 Jul 2015 16:23:00 -0000	[thread overview]
Message-ID: <bug-66724-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 66724
           Summary: ICE on input/output statements with wrong specifier
                    data
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

For most input/output statements and for several specifiers
compilation aborts if assigned specifier key is not changeable
(is a constant) and/or is of wrong data type etc.
Several combinations are causing a segfault, some examples :


$ cat z_iostmt_iomsg_1.f90
program p
   backspace (1, iomsg=1)
   close (1, iomsg=1)
   endfile (1, iomsg=1)
   flush (1, iomsg=1)
   inquire (1, iomsg=1)
   open (1, iomsg=1)
   read (1, iomsg=1)
   rewind (1, iomsg=1)
   wait (1, iomsg=1)
   write (1, iomsg=1)
end


$ cat z_open_iomsg.f90
program p
   open (1, iomsg=1)
   open (1, iomsg=1e1)
   open (1, iomsg=1d1)
   open (1, iomsg='no')
   open (1, iomsg='')
   open (1, iomsg=.true.)
   open (1, iomsg=[1])
   open (1, iomsg=[''])
   ! ...
end

# analogous if "open" replaced with some other io-stmt


$ cat z_open_specifier.f90
program p
   open (1, access=.false.)
   open (1, action=.false.)
   open (1, asynchronous=.false.)
   open (1, blank=.false.)
   open (1, decimal=.false.)
   open (1, delim=.false.)
   open (1, encoding=.false.)
   open (1, form=.false.)
   open (1, pad=.false.)
   open (1, position=.false.)
   open (1, round=.false.)
   open (1, sign=.false.)
   open (1, status=.false.)
end

# analogous if "open" replaced with some other io-stmt


$ cat z_write_asynchronous.f90
program p
   write (1, asynchronous=1e1)
   write (1, asynchronous=1d1)
   write (1, asynchronous=.false.)
   write (1, asynchronous=null())
   write (1, asynchronous=[1])
   write (1, asynchronous=[''])
   write (1, asynchronous=['no'])
   ! ...
end

# analogous if "write" replaced with some other io-stmt

# and several more ...


Yields (with gfortran 5.1.1 on SUSE Linux 13.2, 64 bit)
f951: internal compiler error: Segmentation fault


             reply	other threads:[~2015-07-01 16:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 16:23 gerhard.steinmetz.fortran@t-online.de [this message]
2015-07-06 16:19 ` [Bug fortran/66724] " gerhard.steinmetz.fortran@t-online.de
2015-07-06 16:38 ` dominiq at lps dot ens.fr
2015-07-06 17:05 ` kargl at gcc dot gnu.org
2015-07-06 17:08 ` sgk at troutmask dot apl.washington.edu
2015-07-17  0:05 ` kargl at gcc dot gnu.org
2015-07-17  0:32 ` kargl at gcc dot gnu.org
2015-07-17  0:32 ` kargl at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-66724-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).