@@ -2681,7 +2681,7 @@ typedef struct
int flag_preprocessed;
int flag_d_lines;
int flag_init_integer;
- int flag_init_integer_value;
+ long flag_init_integer_value;
int flag_init_logical;
int flag_init_character;
char flag_init_character_value;
@@ -1779,6 +1779,11 @@ use @option{-finit-real=snan}; note, however, that compile-time
optimizations may convert them into quiet NaN and that trapping
needs to be enabled (e.g. via @option{-ffpe-trap}).
+The @option{-finit-integer} option will parse the value into an
+integer of type @code{INTEGER(kind=C_LONG)} on the host. Said value
+is then assigned to the integer variables in the Fortran code, which
+might result in wraparound if the value is too large for the kind.
+
Finally, note that enabling any of the @option{-finit-*} options will
silence warnings that would have been emitted by @option{-Wuninitialized}
for the affected local variables.
@@ -708,7 +708,7 @@ gfc_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
case OPT_finit_integer_:
gfc_option.flag_init_integer = GFC_INIT_INTEGER_ON;
- gfc_option.flag_init_integer_value = atoi (arg);
+ gfc_option.flag_init_integer_value = strtol (arg, NULL, 10);
break;
case OPT_finit_character_: