aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/arith.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/arith.c')
-rw-r--r--gcc/fortran/arith.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/arith.c b/gcc/fortran/arith.c
index 2e21b84..34780b6 100644
--- a/gcc/fortran/arith.c
+++ b/gcc/fortran/arith.c
@@ -1069,7 +1069,8 @@ gfc_arith_concat (gfc_expr *op1, gfc_expr *op2, gfc_expr **resultp)
gfc_expr *result;
int len;
- result = gfc_constant_result (BT_CHARACTER, gfc_default_character_kind,
+ gcc_assert (op1->ts.kind == op2->ts.kind);
+ result = gfc_constant_result (BT_CHARACTER, op1->ts.kind,
&op1->where);
len = op1->value.character.length + op2->value.character.length;