[PATCH] Add PAREN_EXPR
Richard Guenther
rguenther@suse.de
Wed Feb 20 09:52:00 GMT 2008
On Tue, 19 Feb 2008, Tobias Burnus wrote:
> FX wrote:
> > > * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
> > > as unary PAREN_EXPR for real and complex typed expressions.
> > > * options.c (gfc_init_options): Enable flag_associative_math if
> > > it isn't disabled automatically.
> > >
> > > * gfortran.dg/reassoc_1.f90: New testcase.
> > > * gfortran.dg/reassoc_2.f90: Likewise.
> > >
> > Fortran part is OK. Thanks!
> >
> Thanks also from me. Is it possible to add a flag for disabling the
> PAREN_EXPR? I'm sure some users want to have this to gain some speed. (For
> a/(b*c) the () are often only used because it is easier to read than a/b/c;
> for such programs it might be useful to be able to disable it.)
>
> (ifort has such an option: -assume noprotect_parens; unfortunately it is
> enabled by default.)
Sure, I think this should be done by the frontend though as we might
want to use PAREN_EXPR internally in the middle-end where it is critical
for correctness (like expanding lround to (long)((x + 2e52) - 2e52) or
similar things).
Richard.
More information about the Fortran
mailing list