[Patch Modified] re: Enable Hollerith constant and character arrayin format tag (take 3).
Feng Wang
wf_cs@yahoo.com
Mon Jul 4 14:10:00 GMT 2005
Thanks for your reviewing.
--- Steven Bosscher <stevenb@suse.de>ôµÃ:
> On Friday 01 July 2005 12:13, Feng Wang wrote:
> > Handle allocatable array assiged Hollerith constant and more test.
> >
> > Please remove the diff on trans-io.c in the patch:
> > http://gcc.gnu.org/ml/fortran/2005-06/msg00475.html
> > And use this diff attached.
>
> Wrt. http://gcc.gnu.org/ml/gcc-patches/2005-06/msg02163.html I only
> have one remark:
>
> > ! /* Numeric can be converted to any other numeric. And Hollerith can
> be
> > ! converted to any other type. */
> > ! if ((gfc_numeric_ts (&lvalue->ts) && gfc_numeric_ts (&rvalue->ts))
> > ! || rvalue->ts.type == BT_HOLLERITH)
> > return SUCCESS;
>
> Please use proper indentation. The rest looks reasonable to me. Could
> someone double-check the io.c changes please?
>
Ok. Corrected. If there are no objections in two days, I want to commit them.
>
> > *************** set_string (stmtblock_t * block, stmtblo
> > *** 400,406 ****
> > }
> > else
> > {
> > ! gfc_conv_expr (&se, e);
> > gfc_conv_string_parameter (&se);
> > gfc_add_modify_expr (&se.pre, io, fold_convert (TREE_TYPE (io),
> se.expr));
> > gfc_add_modify_expr (&se.pre, len, se.string_length);
> > --- 462,474 ----
> > }
> > else
> > {
> > ! /* General character. */
> > ! if (e->ts.type == BT_CHARACTER && e->rank == 0)
> > ! gfc_conv_expr (&se, e);
> > ! /* Array assigned Hollerith constant or character array. */
> > ! else if (e->symtree && (e->symtree->n.sym->as->rank > 0))
> > ! gfc_convert_array_to_string (&se, e);
>
> You should add an extra "else gcc_unreachable ()" clause.
Ok. Corrected.
>
> > !
> > gfc_conv_string_parameter (&se);
> > gfc_add_modify_expr (&se.pre, io, fold_convert (TREE_TYPE (io),
> se.expr));
> > gfc_add_modify_expr (&se.pre, len, se.string_length);
>
> Thanks for working on this.
>
Best Regards,
Feng Wang
--
Creative Compiler Research Group,
National University of Defense Technology, China.
___________________________________________________________
ÃÃ
ȢÃÃÃ䳬ÿÃöõ·þÃñ£Â2G³¬´ó¿Ã¼ä¡¢pop3ÃÃÃÃ
¡¢ÃÃÃÃÿÃüþÃáÃÃ
http://cn.mail.yahoo.com/mail_alert/promo1.html
More information about the Fortran
mailing list