Commit bf3ddf8a by Feng Wang Committed by Feng Wang

re PR fortran/20883 (unassigned integer used as format)

2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>

        PR fortran/20883
        * fortran/io.c (resolve_tag): Fix error message.

2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>

        PR fortran/20883
        * gfortran/assign_4.f90: New test.
        * gfortran/assign_2.f90: Change compile to run.

From-SVN: r100424
parent 5d1dcb0e
2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/20883
* fortran/io.c (resolve_tag): Fix error message.
2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2005-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fortran/trans-decl.c: Don't include errors.h. * fortran/trans-decl.c: Don't include errors.h.
......
...@@ -974,8 +974,9 @@ resolve_tag (const io_tag * tag, gfc_expr * e) ...@@ -974,8 +974,9 @@ resolve_tag (const io_tag * tag, gfc_expr * e)
/* Format label can be integer varibale. */ /* Format label can be integer varibale. */
if (tag != &tag_format || e->ts.type != BT_INTEGER) if (tag != &tag_format || e->ts.type != BT_INTEGER)
{ {
gfc_error ("%s tag at %L must be of type %s", tag->name, &e->where, gfc_error ("%s tag at %L must be of type %s or %s", tag->name,
gfc_basic_typename (tag->type)); &e->where, gfc_basic_typename (tag->type),
gfc_basic_typename (BT_INTEGER));
return FAILURE; return FAILURE;
} }
} }
......
2005-06-01 Feng Wang <fengwang@nudt.edu.cn>
PR fortran/20883
* gfortran/assign_4.f90: New test.
* gfortran/assign_2.f90: Change compile to run.
2005-05-31 Geoffrey Keating <geoffk@geoffk.org> 2005-05-31 Geoffrey Keating <geoffk@geoffk.org>
* lib/target-supports.exp * lib/target-supports.exp
......
! { dg-do compile } ! { dg-do run }
! Option passed to avoid excess errors from obsolete warning ! Option passed to avoid excess errors from obsolete warning
! { dg-options "-w" } ! { dg-options "-w" }
! PR18827 ! PR18827
......
! { dg-do compile }
! PR fortran/20883
write (*, a) b ! { dg-error "must be of type CHARACTER or INTEGER" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment