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]

[gfortran,patch] Fix Fortran/18827


This patch fix PR18827. 
Allows variables in a common block to be assigned a label. Do not set symbol's
assign attribute when match assigned goto statement and i/o statements using
label assigned variable. We should set it only when match assign statment. And
add checking on this attribute when resolving.

Tested on ia64 with no regression. If it is ok, please commit.
Best Regards,
Feng Wang

fortran/ChangeLog entry:
2004-12-14  Feng Wang  <fengwang@nudt.edu.cn>

	PR fortran/18827
	* io.c (resolve_tag): Add checking on assigned label.
	(match_dt_format): Does not set symbol assign attribute.
	* match.c (gfc_match_goto):Does not set symbol assign attribute.
	* resolve.c (resolve_code): Add checking on assigned label.
	* trans-common.c (build_field): Deals with common variable assigned
	a label.
	* trans-stmt.c (gfc_conv_label_variable): New function.
	(gfc_trans_label_assign): Use it.
	(gfc_trans_goto): Ditto.
	* trans-io.c (set_string): Ditto.
	* trans.h (gfc_conv_label_variable): Add prototype.

testsuites/ChangeLog entry:
2004-12-14  Feng Wang  <fengwang@nudt.edu.cn>

	PR fortran/18827
	* gfortran.dg/assign_2.f90: New test.
	* gfortran.dg/assign_3.f90: New test.



_________________________________________________________
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/

Attachment: pr18827.diff
Description: pr18827.diff

Attachment: assign_2.f90
Description: assign_2.f90

Attachment: assign_3.f90
Description: assign_3.f90


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