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]

Re: Do not fold statements in gfc_add_expr_to_block


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.


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