PR fortran/41359
* trans-stmt.c (gfc_trans_if_1): Use correct line for
expressions in the if condition.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170394
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-02-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/41359
+ * trans-stmt.c (gfc_trans_if_1): Use correct line for
+ expressions in the if condition.
+
2011-02-20 Tobias Burnus <burnus@net-b.de>
PR fortran/47797
2011-02-20 Tobias Burnus <burnus@net-b.de>
PR fortran/47797
{
gfc_se if_se;
tree stmt, elsestmt;
{
gfc_se if_se;
tree stmt, elsestmt;
location_t loc;
/* Check for an unconditional ELSE clause. */
location_t loc;
/* Check for an unconditional ELSE clause. */
gfc_start_block (&if_se.pre);
/* Calculate the IF condition expression. */
gfc_start_block (&if_se.pre);
/* Calculate the IF condition expression. */
+ if (code->expr1->where.lb)
+ {
+ gfc_save_backend_locus (&saved_loc);
+ gfc_set_backend_locus (&code->expr1->where);
+ }
+
gfc_conv_expr_val (&if_se, code->expr1);
gfc_conv_expr_val (&if_se, code->expr1);
+ if (code->expr1->where.lb)
+ gfc_restore_backend_locus (&saved_loc);
+
/* Translate the THEN clause. */
stmt = gfc_trans_code (code->next);
/* Translate the THEN clause. */
stmt = gfc_trans_code (code->next);