[Bug fortran/33317] CSHIFT/EOSHIFT: Rejects optional dummy for DIM=
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Nov 17 18:22:00 GMT 2007
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-11-17 18:22 -------
The problem here is that when we resolve cshift and eoshift we convert dim from
a EXPR_VARIABLE to a EXPR_FUNCTION that converts the type to match up with the
runtime function.
Later in trans-expr.c, code is not built to test for NULL and set dim to the
default of 1 since dim is no longer a variable and there is nothing in
gfc_conv_function_call to handle it. It is normally handled by
gfc_conv_missing_dummy.
Further complicating this, the conversion of type function, such as
convert_i8_i4 which gets simplified to a cast segfaults when dim is NULL.
I think the solution is to build the type conversion later in
gfc_conv_missing_dummy after building the test for NULL.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33317
More information about the Gcc-bugs
mailing list