aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2009-10-26 10:08:03 +0100
committerJanus Weil <janus@gcc.gnu.org>2009-10-26 10:08:03 +0100
commit60f5ed26b3f6935f26df139c7be127024eedd2c5 (patch)
tree68e7035f44ef5bedcb6aab787fc1a8b286a0a8e4 /gcc/gimplify.c
parentb0418319a0bbb73569df8a266d36f9558fb8e1e2 (diff)
downloadgcc-60f5ed26b3f6935f26df139c7be127024eedd2c5.zip
gcc-60f5ed26b3f6935f26df139c7be127024eedd2c5.tar.gz
gcc-60f5ed26b3f6935f26df139c7be127024eedd2c5.tar.bz2
re PR fortran/41714 ([OOP] ALLOCATE SOURCE= does not properly copy the value from SOURCE)
2009-10-26 Janus Weil <janus@gcc.gnu.org> PR fortran/41714 * gimple.h (tree_annotate_all_with_location): Remove prototype. * gimplify.c (tree_should_carry_location_p, tree_annotate_one_with_location,tree_annotate_all_with_location): Remove obsolete functions. 2009-10-26 Janus Weil <janus@gcc.gnu.org> PR fortran/41714 * trans.c (gfc_trans_code): Remove call to 'tree_annotate_all_with_location'. Location should already be set. * trans-openmp.c (gfc_trans_omp_workshare): Ditto. * trans-stmt.c (gfc_trans_allocate): Do correct data initialization for CLASS variables with SOURCE tag, plus some cleanup. 2009-10-26 Janus Weil <janus@gcc.gnu.org> PR fortran/41714 * gfortran.dg/class_allocate_4.f03: New test. From-SVN: r153547
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c0cab20..d68aacd 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -777,23 +777,6 @@ should_carry_location_p (gimple gs)
return true;
}
-/* Same, but for a tree. */
-
-static bool
-tree_should_carry_location_p (const_tree stmt)
-{
- /* Don't emit a line note for a label. We particularly don't want to
- emit one for the break label, since it doesn't actually correspond
- to the beginning of the loop/switch. */
- if (TREE_CODE (stmt) == LABEL_EXPR)
- return false;
-
- /* Do not annotate empty statements, since it confuses gcov. */
- if (!TREE_SIDE_EFFECTS (stmt))
- return false;
-
- return true;
-}
/* Return true if a location should not be emitted for this statement
by annotate_one_with_location. */
@@ -826,16 +809,6 @@ annotate_one_with_location (gimple gs, location_t location)
gimple_set_location (gs, location);
}
-/* Same, but for tree T. */
-
-static void
-tree_annotate_one_with_location (tree t, location_t location)
-{
- if (CAN_HAVE_LOCATION_P (t)
- && ! EXPR_HAS_LOCATION (t) && tree_should_carry_location_p (t))
- SET_EXPR_LOCATION (t, location);
-}
-
/* Set LOCATION for all the statements after iterator GSI in sequence
SEQ. If GSI is pointing to the end of the sequence, start with the
@@ -872,29 +845,6 @@ annotate_all_with_location (gimple_seq stmt_p, location_t location)
}
}
-/* Same, but for statement or statement list in *STMT_P. */
-
-void
-tree_annotate_all_with_location (tree *stmt_p, location_t location)
-{
- tree_stmt_iterator i;
-
- if (!*stmt_p)
- return;
-
- for (i = tsi_start (*stmt_p); !tsi_end_p (i); tsi_next (&i))
- {
- tree t = tsi_stmt (i);
-
- /* Assuming we've already been gimplified, we shouldn't
- see nested chaining constructs anymore. */
- gcc_assert (TREE_CODE (t) != STATEMENT_LIST
- && TREE_CODE (t) != COMPOUND_EXPR);
-
- tree_annotate_one_with_location (t, location);
- }
-}
-
/* Similar to copy_tree_r() but do not copy SAVE_EXPR or TARGET_EXPR nodes.
These nodes model computations that should only be done once. If we