This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Fwd: [PATCH] Fix middle-end/32813 ICE in annotate_all_with_locus


I forgot to CC this to fortran@ as this patch effects the testsuite of
fortran more than just adding a new testcase.

Thanks,
Andrew Pinski

---------- Forwarded message ----------
From: Andrew Pinski <pinskia@gmail.com>
Date: Aug 4, 2007 7:41 AM
Subject: [PATCH] Fix middle-end/32813 ICE in annotate_all_with_locus
To: gcc-patches <gcc-patches@gcc.gnu.org>


Hi,
  The fortran front-end calls annotate_all_with_locus with a statement
list which included coumpound statement which was generated by fold
and annotate_all_with_locus does not like the compound expression at
all.  The compound expression was generated when fold was folding
COND_EXPR<SAVE_EXPR, EMPTY_STMT, EMPTY_STMT> and decided it needed to
keep around the SAVE_EXPR (which is correct).  Since we really don't
need to generate a compound expression here, I changed
omit_one_operand and pedantic_omit_one_operand for this case to just
return a cast to void type of the ommited expression.

I also had to fix up gfortran.fortran-torture/compile to run through
all the options instead of just -O.

OK?  Bootstrapped and tested on i686-apple-darwin8.10 with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

* fold-const.c (omit_one_operand): Return only the ommitted expression
if the result is an empty statement.
(pedantic_omit_one_operand): Likewise.


* gfortran.fortran-torture/compile/emptyif-1.f90: New test.
* lib/fortran-torture.exp (fortran-torture): Use TORTURE_OPTIONS instead
of just -O.

Attachment: fixpr32813.diff.txt
Description: Text document


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