aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-04-21 17:17:13 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-04-21 17:17:13 +0000
commitca80e52b017482baf0bc3b91ce59af78a86785ba (patch)
tree4af8030719296e992a9c12adcef79ed4833b2ff8 /gcc/ada
parent71b495a2ac3a1c89a2f6a1a789dde32d337ef654 (diff)
downloadgcc-ca80e52b017482baf0bc3b91ce59af78a86785ba.zip
gcc-ca80e52b017482baf0bc3b91ce59af78a86785ba.tar.gz
gcc-ca80e52b017482baf0bc3b91ce59af78a86785ba.tar.bz2
c-common.c (c_common_truthvalue_conversion): Use LOCATION to build NE_EXPR operations as well.
* c-common.c (c_common_truthvalue_conversion): Use LOCATION to build NE_EXPR operations as well. * c-parser.c (c_parser_condition): Do not set location information on the condition. (c_parser_conditional_expression): Likewise. (c_parser_binary_expression): Set location information on operators. * c-typeck.c (build_unary_op) <TRUTH_NOT_EXPR>: Reset the location if TRUTH_NOT_EXPR has been folded. * fold-const.c (fold_truth_not_expr): Copy location information from the incoming expression to the outgoing one. * gimplify.c (shortcut_cond_r): Add locus parameter. Pass it to recursive calls on the LHS of the operator but pass that of the operator to recursive calls on the RHS of the operator. Set it on the COND_EXPR. (shortcut_cond_expr): Set the locus of the operator on the second COND_EXPR and that of the expression on the first in degenerate cases. Pass the locus of the expression to calls to shortcut_cond_r. Set the locus of the 'then' block on the associated jump, if any. (gimplify_boolean_expr): Add locus parameter. Set it on the COND_EXPR. (gimplify_expr) <TRUTH_ANDIF_EXPR>: Pass the locus of the outer expression to call to gimplify_boolean_expr. ada/ * gcc-interface/trans.c (gnat_to_gnu): Do not overwrite location info. From-SVN: r146532
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/gcc-interface/trans.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index a8e01f0..6f31dbd 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,9 @@
2009-04-21 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/trans.c (gnat_to_gnu): Do not overwrite location info.
+
+2009-04-21 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/ada-tree.h (TYPE_RM_SIZE_NUM): Delete.
(TYPE_RM_SIZE): Access TYPE_LANG_SLOT_1 directly for integral types.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 50e3fca..84aa396 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -5303,7 +5303,8 @@ gnat_to_gnu (Node_Id gnat_node)
if (gnu_result
&& EXPR_P (gnu_result)
&& TREE_CODE (gnu_result) != NOP_EXPR
- && !REFERENCE_CLASS_P (gnu_result))
+ && !REFERENCE_CLASS_P (gnu_result)
+ && !EXPR_HAS_LOCATION (gnu_result))
set_expr_location_from_node (gnu_result, gnat_node);
/* If we're supposed to return something of void_type, it means we have