aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>2011-02-08 11:15:53 +0000
committerAndreas Krebbel <krebbel@gcc.gnu.org>2011-02-08 11:15:53 +0000
commit0efb9d64adf43e0022940478d7ffcf70a92f4305 (patch)
treeeb9f8ee051045f0da17a63b2ffc3ac8df688b5e1 /gcc/gimple-low.c
parent034b8ae4f8c89314b13879ef2d403c14daa5c4fd (diff)
downloadgcc-0efb9d64adf43e0022940478d7ffcf70a92f4305.zip
gcc-0efb9d64adf43e0022940478d7ffcf70a92f4305.tar.gz
gcc-0efb9d64adf43e0022940478d7ffcf70a92f4305.tar.bz2
gimple-low.c (lower_function_body): Don't remove the location of the return statement here.
2011-02-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * gimple-low.c (lower_function_body): Don't remove the location of the return statement here. (lower_gimple_return): Do it here instead but only if the return statement is actually used twice. From-SVN: r169918
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 4e49241..67087a0 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -148,11 +148,6 @@ lower_function_body (void)
x = gimple_build_label (t.label);
gsi_insert_after (&i, x, GSI_CONTINUE_LINKING);
-
- /* Remove the line number from the representative return statement.
- It now fills in for many such returns. Failure to remove this
- will result in incorrect results for coverage analysis. */
- gimple_set_location (t.stmt, UNKNOWN_LOCATION);
gsi_insert_after (&i, t.stmt, GSI_CONTINUE_LINKING);
}
@@ -746,7 +741,14 @@ lower_gimple_return (gimple_stmt_iterator *gsi, struct lower_data *data)
tmp_rs = *VEC_index (return_statements_t, data->return_statements, i);
if (gimple_return_retval (stmt) == gimple_return_retval (tmp_rs.stmt))
- goto found;
+ {
+ /* Remove the line number from the representative return statement.
+ It now fills in for many such returns. Failure to remove this
+ will result in incorrect results for coverage analysis. */
+ gimple_set_location (tmp_rs.stmt, UNKNOWN_LOCATION);
+
+ goto found;
+ }
}
/* Not found. Create a new label and record the return statement. */