This is the mail archive of the gcc-patches@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]

[patch, committed] Fix fortran/20883


Change error message and add new test. Committed to 4.1 and 4.0 as obvious.
Tested with no regression on i686-linux.



Best Regards,
Feng Wang

--
Creative Compiler Research Group,
National University of Defense Technology, China.

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
Index: testsuite/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.5568
diff -c -3 -p -r1.5568 ChangeLog
*** testsuite/ChangeLog	31 May 2005 23:07:07 -0000	1.5568
--- testsuite/ChangeLog	1 Jun 2005 03:10:06 -0000
***************
*** 1,3 ****
--- 1,9 ----
+ 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  Zdenek Dvorak  <dvorakz@suse.cz>
  
  	PR tree-optimization/21817
Index: testsuite/gfortran.dg/assign_2.f90
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gfortran.dg/assign_2.f90,v
retrieving revision 1.1
diff -c -3 -p -r1.1 assign_2.f90
*** testsuite/gfortran.dg/assign_2.f90	15 Mar 2005 02:52:33 -0000	1.1
--- testsuite/gfortran.dg/assign_2.f90	1 Jun 2005 03:10:06 -0000
***************
*** 1,4 ****
! ! { dg-do compile }
  ! Option passed to avoid excess errors from obsolete warning
  ! { dg-options "-w" }
  ! PR18827
--- 1,4 ----
! ! { dg-do run }
  ! Option passed to avoid excess errors from obsolete warning
  ! { dg-options "-w" }
  ! PR18827
Index: testsuite/gfortran.dg/assign_4.f90
===================================================================
RCS file: testsuite/gfortran.dg/assign_4.f90
diff -N testsuite/gfortran.dg/assign_4.f90
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/gfortran.dg/assign_4.f90	1 Jun 2005 03:10:06 -0000
***************
*** 0 ****
--- 1,4 ----
+ ! { dg-do compile }
+ ! PR fortran/20883
+       write (*, a) b ! { dg-error "must be of type CHARACTER or INTEGER" }
+       end
Index: fortran/ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/ChangeLog,v
retrieving revision 1.445
diff -c -3 -p -r1.445 ChangeLog
*** fortran/ChangeLog	31 May 2005 17:19:09 -0000	1.445
--- fortran/ChangeLog	1 Jun 2005 03:10:29 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2005-06-01  Feng Wang  <fengwang@nudt.edu.cn>
+ 
+ 	PR fortran/20883
+ 	* fortran/io.c (resolve_tag): Fix error message.
+ 
  2005-05-31  Paul Thomas  <pault@gcc.gnu.org>
  
  	PR fortran/18109
Index: fortran/io.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/io.c,v
retrieving revision 1.24
diff -c -3 -p -r1.24 io.c
*** fortran/io.c	30 May 2005 00:17:03 -0000	1.24
--- fortran/io.c	1 Jun 2005 03:11:59 -0000
*************** resolve_tag (const io_tag * tag, gfc_exp
*** 974,981 ****
        /* Format label can be integer varibale.  */
        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_basic_typename (tag->type));
            return FAILURE;
          }
      }
--- 974,982 ----
        /* Format label can be integer varibale.  */
        if (tag != &tag_format || e->ts.type != BT_INTEGER)
          {
!           gfc_error ("%s tag at %L must be of type %s or %s", tag->name,
! 		&e->where, gfc_basic_typename (tag->type),
! 		gfc_basic_typename (BT_INTEGER));
            return FAILURE;
          }
      }

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