This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do not fold statements in gfc_add_expr_to_block
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Jan 2006 15:22:37 +0100
- Subject: Re: Do not fold statements in gfc_add_expr_to_block
- References: <200601130847.17302.dnovillo@redhat.com>
On 1/13/06, Diego Novillo <dnovillo@redhat.com> wrote:
>
> When adding statements to a statement block, gfc_add_expr_to_block calls
> fold() if the expression is not a STATEMENT_LIST. However, with the new
> OpenMP IL, we will have statements that fold cannot handle because they
> may have NULL operands.
>
> Furthermore, even if fold() were to handle NULL operands, it does not make
> much sense to be calling fold() with a tcc_statement. This patch prevents
> that. It fixes all the compile-time regressions in the gomp branch and
> causes no new failures in the other Fortran tests.
>
> Tested on x86, x86-64, ppc64 and ia64. OK for mainline?
I wonder if not calling fold at all here is the most appropriate fix. Though
fortran> grep '[^_]build. (' *.c | wc -l
183
which is half of build that is not called as fold_build.
Richard.