re PR fortran/37076 (Concatenation of KIND=4 strings with KIND=4 parameters fails)
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
This commit is contained in:
parent
12ba225d76
commit
3434e9a415
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
14
gcc/testsuite/gfortran.dg/widechar_9.f90
Normal file
14
gcc/testsuite/gfortran.dg/widechar_9.f90
Normal file
@ -0,0 +1,14 @@
|
||||
! { 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
|
Loading…
Reference in New Issue
Block a user