public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/33055]  New: ignoring iostat= with -fdefault-integer-8
@ 2007-08-12 14:21 tkoenig at gcc dot gnu dot org
  2007-08-12 19:47 ` [Bug libfortran/33055] " jvdelisle at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-08-12 14:21 UTC (permalink / raw)
  To: gcc-bugs

This is strange.

gfortran.dg/negative_unit.f fails with -fdefault-integer-8.  A
call to generate_error() is issued, which doesn't really make sense:


$ gfortran -fdump-tree-original -fdefault-integer-8 negative_unit.f
$ ./a.out
At line 19 of file negative_unit.f
Fortran runtime error: Negative unit number in I/O statement
$ head -30 negative_unit.f.003t.original 
MAIN__ ()
{
  logical8 l;
  int8 i;
  static int4 options.0[7] = {68, 127, 0, 0, 0, 1, 0};

  _gfortran_set_options (7, (void *) &options.0);
  i = 0;
  {
    int4 iostat.2;
    struct __st_parameter_dt dt_parm.1;

    dt_parm.1.common.filename = &"negative_unit.f"[1]{lb: 1 sz: 1};
    dt_parm.1.common.line = 12;
    iostat.2 = 0;
    dt_parm.1.common.iostat = &iostat.2;
    dt_parm.1.common.flags = 160;
    _gfortran_generate_error (&dt_parm.1, 5005, &"Negative unit number in I/O
statement"[1]{lb: 1 sz: 1});
    dt_parm.1.common.unit = -1;
    _gfortran_st_write (&dt_parm.1);
    _gfortran_transfer_character (&dt_parm.1, &"Hello"[1]{lb: 1 sz: 1}, 5);
    _gfortran_st_write_done (&dt_parm.1);
    i = (int8) iostat.2;
  }
  if (i <= 0)
    {
      _gfortran_abort ();
    }
  i = 0;
  {


-- 
           Summary: ignoring iostat= with -fdefault-integer-8
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
OtherBugsDependingO 32770
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33055


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-10-15 14:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-12 14:21 [Bug libfortran/33055] New: ignoring iostat= with -fdefault-integer-8 tkoenig at gcc dot gnu dot org
2007-08-12 19:47 ` [Bug libfortran/33055] " jvdelisle at gcc dot gnu dot org
2007-08-14  5:26 ` jvdelisle at gcc dot gnu dot org
2007-08-25  4:11 ` [Bug libfortran/33055] Runtime error in INQUIRE unit existance " patchapp at dberlin dot org
2007-08-26 22:05 ` jvdelisle at gcc dot gnu dot org
2007-08-26 22:19 ` jvdelisle at gcc dot gnu dot org
2007-08-26 22:24 ` jvdelisle at gcc dot gnu dot org
2007-08-29  2:26 ` jvdelisle at gcc dot gnu dot org
2007-08-29 19:02 ` tkoenig at gcc dot gnu dot org
2007-08-30  5:01 ` jvdelisle at gcc dot gnu dot org
2007-10-06 15:11 ` patchapp at dberlin dot org
2007-10-15 13:56 ` jvdelisle at gcc dot gnu dot org
2007-10-15 13:59 ` jvdelisle at gcc dot gnu dot org
2007-10-15 14:05 ` jvdelisle at gcc dot gnu dot org
2007-10-15 14:05 ` jvdelisle at gcc dot gnu dot org

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).