[patch, fortran] PR33317 CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
Jerry DeLisle
jvdelisle@verizon.net
Fri Nov 23 18:22:00 GMT 2007
:ADDPATCH fortran:
This patch resolves the issues found by Dominique on PowerPC and Darwin
platforms. The problem was a matter of getting the correct type for conversion
of DIM communicated to trans_expr.c
To do this, I use the representation structure in gfc_expr to pass a kind value
forward from the resolve stage to the translation stage. This seems consistent
with the intended use of this structure from reading the comments in gfortran.h.
Regression tested on x86-64 and ppc.
OK for trunk?
Jerry
2007-11-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33317
* trans.h: Modify prototype for gfc_conv_missing_dummy.
* trans-expr.c (gfc_conv_missing_dummy): Modify to pass an integer kind
parameter in. Set the type of the dummy to the kind given.
(gfc_conv_function_call): Pass representation.length to
gfc_conv_missing_dummy.
* iresolve.c (gfc_resolve_cshift): Determine the correct kind to use and
if appropriate set representation.length to this kind value.
(gfc_resolve_eoshift): Likewise.
* check.c (gfc_check_cshift): Enable dim_check to allow DIM as an
optional argument. (gfc_check_eoshift): Likewise.
* trans_intrinsic.c (gfc_conv_intrinsic_function_args): Update call to
gfc_conv_missing_dummy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr33317-3.diff
Type: text/x-patch
Size: 6934 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071123/72d863aa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: optional_dim_2.f90
Type: text/x-fortran
Size: 776 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20071123/72d863aa/attachment-0001.bin>
More information about the Fortran
mailing list