2008-08-23 Tobias Burnus <burnus@net-b.de>
PR fortran/37076
* arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
2008-08-23 Tobias Burnus <burnus@net-b.de>
PR fortran/37076
* gfortran.dg/widechar_9.f90: New.
From-SVN: r139521
+2008-08-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37076
+ * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
+
2008-08-23 Tobias Burnus <burnus@net-b.de>
PR fortran/37025
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;
+2008-08-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37076
+ * gfortran.dg/widechar_9.f90: New.
+
2008-08-23 Tobias Burnus <burnus@net-b.de>
PR fortran/37025
--- /dev/null
+! { dg-do compile }
+!
+! PR fortran/37076
+!
+! Before the result of concatenations was always a kind=1 string
+!
+program test3
+ integer,parameter :: u = 4
+ character(1,u),parameter :: nen=char(int(z'5e74'),u) !year
+ character(25,u) :: string
+ string = u_"2008"//nen
+ print *, u_"2008"//nen ! Compiles OK
+ print *, u_"2008"//nen//u_"8" ! Rejects this.
+end program test3