diff options
Diffstat (limited to 'gcc/fortran/iresolve.c')
| -rw-r--r-- | gcc/fortran/iresolve.c | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 3cf84db..f81488a 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -1574,14 +1574,10 @@ gfc_resolve_reshape (gfc_expr * f, gfc_expr * source, gfc_expr * shape, case 8: case 10: case 16: - if (source->ts.type == BT_COMPLEX) + if (source->ts.type == BT_COMPLEX || source->ts.type == BT_REAL) f->value.function.name = gfc_get_string (PREFIX("reshape_%c%d"), - gfc_type_letter (BT_COMPLEX), source->ts.kind); - else if (source->ts.type == BT_REAL && (kind == 10 || kind == 16)) - f->value.function.name = - gfc_get_string (PREFIX("reshape_%c%d"), - gfc_type_letter (BT_REAL), source->ts.kind); + gfc_type_letter (source->ts.type), source->ts.kind); else f->value.function.name = gfc_get_string (PREFIX("reshape_%d"), source->ts.kind); @@ -2025,8 +2021,6 @@ gfc_resolve_transfer (gfc_expr * f, gfc_expr * source ATTRIBUTE_UNUSED, void gfc_resolve_transpose (gfc_expr * f, gfc_expr * matrix) { - int kind; - f->ts = matrix->ts; f->rank = 2; if (matrix->shape) @@ -2036,9 +2030,7 @@ gfc_resolve_transpose (gfc_expr * f, gfc_expr * matrix) mpz_init_set (f->shape[1], matrix->shape[0]); } - kind = matrix->ts.kind; - - switch (kind) + switch (matrix->ts.kind) { case 4: case 8: @@ -2046,30 +2038,20 @@ gfc_resolve_transpose (gfc_expr * f, gfc_expr * matrix) case 16: switch (matrix->ts.type) { + case BT_REAL: case BT_COMPLEX: f->value.function.name = - gfc_get_string (PREFIX("transpose_c%d"), kind); + gfc_get_string (PREFIX("transpose_%c%d"), + gfc_type_letter (matrix->ts.type), + matrix->ts.kind); break; - case BT_REAL: - /* There is no kind=10 integer type and on 32-bit targets - there is usually no kind=16 integer type. We need to - call the real version. */ - if (kind == 10 || kind == 16) - { - f->value.function.name = - gfc_get_string (PREFIX("transpose_r%d"), kind); - break; - } - - /* Fall through */ - case BT_INTEGER: case BT_LOGICAL: /* Use the integer routines for real and logical cases. This assumes they all have the same alignment requirements. */ f->value.function.name = - gfc_get_string (PREFIX("transpose_i%d"), kind); + gfc_get_string (PREFIX("transpose_i%d"), matrix->ts.kind); break; default: |
