:ADDPATCH fortran:
This patch fixes this bug by enabling the DIM argument for these two
functions in their respective check routines.
Then in resolve.c, the DIM argument is marked so that later in
trans-intrinsic.c, the type can be cast to the default integer size so
that it matches with the respective runtime library function.
The previous insertion of the type conversion was messing up the
translation causing a segfault when a NULL (DIM argument not present) in
the calling routine optional argument was not present. See test case
for example.
Also fixed up some white space problems found along the way.
Regression tested on x86-64. OK for trunk?
Jerry
2007-11-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* trans-expr.c (gfc_conv_missing_dummy): Set the type of the dummy
argument to default integer if flagged to do so. Fix typo in comment.
* resolve.c (gfc_resolve_dim_arg): Whitespace cleanup.
* iresolve.c (gfc_resolve_cshift): Do not convert type, mark attribute
for converting the DIM type appropriately in trans-expr.c.
(gfc_resolve_eoshift): Likewise.
* check.c (dim_check): Remove pre-existing dead code.
(gfc_check_cshift): Enable dim_check to allow DIM as an optional.
(gfc_check_eoshift): Likewise.
* trans_intrinsic.c (gfc_conv_intrinsic_function_args): Fix whitespace.