diff options
Diffstat (limited to 'gcc/fortran/convert.c')
-rw-r--r-- | gcc/fortran/convert.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/fortran/convert.c b/gcc/fortran/convert.c index 50e3a6a..0493f3f 100644 --- a/gcc/fortran/convert.c +++ b/gcc/fortran/convert.c @@ -80,7 +80,7 @@ convert (tree type, tree expr) return expr; if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (expr))) - return fold_build1 (NOP_EXPR, type, expr); + return fold_build1_loc (input_location, NOP_EXPR, type, expr); if (TREE_CODE (TREE_TYPE (expr)) == ERROR_MARK) return error_mark_node; if (TREE_CODE (TREE_TYPE (expr)) == VOID_TYPE) @@ -89,7 +89,7 @@ convert (tree type, tree expr) return error_mark_node; } if (code == VOID_TYPE) - return fold_build1 (CONVERT_EXPR, type, e); + return fold_build1_loc (input_location, CONVERT_EXPR, type, e); #if 0 /* This is incorrect. A truncation can't be stripped this way. Extensions will be stripped by the use of get_unwidened. */ @@ -105,9 +105,10 @@ convert (tree type, tree expr) /* If we have a NOP_EXPR, we must fold it here to avoid infinite recursion between fold () and convert (). */ if (TREE_CODE (e) == NOP_EXPR) - return fold_build1 (NOP_EXPR, type, TREE_OPERAND (e, 0)); + return fold_build1_loc (input_location, NOP_EXPR, type, + TREE_OPERAND (e, 0)); else - return fold_build1 (NOP_EXPR, type, e); + return fold_build1_loc (input_location, NOP_EXPR, type, e); } if (code == POINTER_TYPE || code == REFERENCE_TYPE) return fold (convert_to_pointer (type, e)); |