This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/33055] New: ignoring iostat= with -fdefault-integer-8
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2007 14:20:50 -0000
- Subject: [Bug libfortran/33055] New: ignoring iostat= with -fdefault-integer-8
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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