aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.h
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2004-08-25 16:50:13 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-08-25 16:50:13 +0000
commit40f201864ffd59ee5936db9ba75bc918227a6798 (patch)
tree894c624fd13417c22a3668caf4fef82e9246c6b6 /gcc/fortran/trans.h
parent923ab88cb2f07d36569c71cf53f8a0529ca1c2d4 (diff)
downloadgcc-40f201864ffd59ee5936db9ba75bc918227a6798.zip
gcc-40f201864ffd59ee5936db9ba75bc918227a6798.tar.gz
gcc-40f201864ffd59ee5936db9ba75bc918227a6798.tar.bz2
re PR fortran/17144 (Not Implemented: Character string array constructors / Assignment to char array)
PR fortran/17144 * trans-array.c (gfc_trans_allocate_temp_array): Remove string_length argument. (gfc_trans_array_ctor_element): New function. (gfc_trans_array_constructor_subarray): Use it. (gfc_trans_array_constructor_value): Ditto. Handle constant character arrays. (get_array_ctor_var_strlen, get_array_ctor_strlen): New functions. (gfc_trans_array_constructor): Use them. (gfc_add_loop_ss_code): Update to new gfc_ss layout. (gfc_conv_ss_descriptor): Remember section string length. (gfc_conv_scalarized_array_ref): Ditto. Remove dead code. (gfc_conv_resolve_dependencies): Update to new gfc_ss layout. (gfc_conv_expr_descriptor): Ditto. (gfc_conv_loop_setup): Ditto. Spelling fixes. * trans-array.h (gfc_trans_allocate_temp_array): Update prototype. * trans-const.c (gfc_conv_constant): Update to new gfc_ss layout. * trans-expr.c (gfc_conv_component_ref): Turn error into ICE. (gfc_conv_variable): Set string_length from section. (gfc_conv_function_call): Remove extra argument. (gfc_conv_expr, gfc_conv_expr_reference): Update to new gfc_ss layout. * trans-types.c (gfc_get_character_type_len): New function. (gfc_get_character_type): Use it. (gfc_get_dtype): Return zero for internal types. * trans-types.h (gfc_get_character_type_len): Add prototype. * trans.h (struct gfc_ss): Move string_length out of union. testsuite/ * gfortran.dg/string_ctor_1.f90: New test. From-SVN: r86558
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r--gcc/fortran/trans.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index b9b467b..5045046 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -162,13 +162,13 @@ typedef struct gfc_ss
gfc_ss_type type;
gfc_expr *expr;
mpz_t *shape;
+ tree string_length;
union
{
/* If type is GFC_SS_SCALAR or GFC_SS_REFERENCE. */
struct
{
tree expr;
- tree string_length;
}
scalar;
@@ -179,7 +179,6 @@ typedef struct gfc_ss
assigned expression. */
int dimen;
tree type;
- tree string_length;
}
temp;
/* All other types. */