Commit e84589e1 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/41359 (Wrong line numbers for debugging/profiling)

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.

From-SVN: r170394
parent 1b4a8aae
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
......
......@@ -718,6 +718,7 @@ gfc_trans_if_1 (gfc_code * code)
{
gfc_se if_se;
tree stmt, elsestmt;
locus saved_loc;
location_t loc;
/* Check for an unconditional ELSE clause. */
......@@ -729,8 +730,17 @@ gfc_trans_if_1 (gfc_code * code)
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);
if (code->expr1->where.lb)
gfc_restore_backend_locus (&saved_loc);
/* Translate the THEN clause. */
stmt = gfc_trans_code (code->next);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment