diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-17 16:40:04 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-17 16:40:04 +0000 |
commit | 9803f9eba498072d9ad3d6825e495e0f848f7c92 (patch) | |
tree | 23e2787f7d0155929b67cd3343d7534b7b864ad6 /gcc/fortran | |
parent | f6eaddf66fe06ac3fb053daf6cb6439f0427f056 (diff) | |
download | gcc-9803f9eba498072d9ad3d6825e495e0f848f7c92.tar.gz |
2014-08-17 Tobias Burnus <burnus@net-b.de>
* trans-io.c (gfc_build_io_library_fndecls): Fix decl of
IOCALL_SET_NML_VAL.
(transfer_namelist_element): Use proper int type as argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-io.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ec126b9aa63..ce6857e30bc 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2014-08-17 Tobias Burnus <burnus@net-b.de> + + * trans-io.c (gfc_build_io_library_fndecls): Fix decl of + IOCALL_SET_NML_VAL. + (transfer_namelist_element): Use proper int type as argument. + 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/62142 diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index cbe54ab7fc2..4340afb1e25 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -467,7 +467,7 @@ gfc_build_io_library_fndecls (void) iocall[IOCALL_SET_NML_VAL] = gfc_build_library_function_decl_with_spec ( get_identifier (PREFIX("st_set_nml_var")), ".w.R", void_type_node, 6, dt_parm_type, pvoid_type_node, pvoid_type_node, - void_type_node, gfc_charlen_type_node, gfc_int4_type_node); + gfc_int4_type_node, gfc_charlen_type_node, gfc_int4_type_node); iocall[IOCALL_SET_NML_VAL_DIM] = gfc_build_library_function_decl_with_spec ( get_identifier (PREFIX("st_set_nml_var_dim")), ".w", @@ -1557,6 +1557,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, tree dtype; tree dt_parm_addr; tree decl = NULL_TREE; + tree gfc_int4_type_node = gfc_get_int_type (4); int n_dim; int itype; int rank = 0; @@ -1605,7 +1606,8 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, tmp = build_call_expr_loc (input_location, iocall[IOCALL_SET_NML_VAL], 6, dt_parm_addr, addr_expr, string, - IARG (ts->kind), tmp, dtype); + build_int_cst (gfc_int4_type_node, ts->kind), + tmp, dtype); gfc_add_expr_to_block (block, tmp); /* If the object is an array, transfer rank times: @@ -1616,7 +1618,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name, tmp = build_call_expr_loc (input_location, iocall[IOCALL_SET_NML_VAL_DIM], 5, dt_parm_addr, - IARG (n_dim), + build_int_cst (gfc_int4_type_node, n_dim), gfc_conv_array_stride (decl, n_dim), gfc_conv_array_lbound (decl, n_dim), gfc_conv_array_ubound (decl, n_dim)); |