cobol: ACCEPT <DATE> into subscripted and reference-modified variables.

The principal changes here are so that ACCEPT X(N) FROM <date-funcs> and
ACCEPT Y(A:B) FROM <date-funcs> work.

Another set of changes modifies SELECT ASSIGN to handle certain IBM
requirements about TO DEVICE syntax.

There are also changes here that improve the execution time of certain types
of MOVE statements.

gcc/cobol/ChangeLog:

	* cbldiag.h (struct cbl_loc_t): Mollify cppcheck.
	* gcobol.1: Documentation.
	* genapi.cc (parser_accept_date_yymmdd): Changes to ACCEPT.
	(parser_accept_date_yyyymmdd): Likewise.
	(parser_accept_date_yyddd): Likewise.
	(parser_accept_date_yyyyddd): Likewise.
	(parser_accept_date_dow): Likewise.
	(parser_accept_date_hhmmssff): Likewise.
	(walk_initialization): Propagate based_e attribute to child variables.
	(parser_file_open): SELECT ASSIGN TO DEVICE changes.
	(parser_call): Include function name in error message when the
	function name cannot be found.
	* genapi.h (parser_accept_date_yymmdd): Changes to ACCEPT.
	(parser_accept_date_yyyymmdd): Likewise.
	(parser_accept_date_yyddd): Likewise.
	(parser_accept_date_yyyyddd): Likewise.
	(parser_accept_date_dow): Likewise.
	(parser_accept_date_hhmmssff): Likewise.
	* genutil.cc (FIXED_WIDE_INT): Potential improvement to MOVE
	statements involving intermediate_e variables.
	(get_power_of_two): Likewise.
	* genutil.h (FIXED_WIDE_INT): Likewise.
	* lexio.h (struct filespan_t): Mollify cppcheck.
	* move.cc (mh_identical): Improve MOVE execution speed.
	(copy_native_into_place): Likewise.
	(copy_intermediate_into_place): Likewise.
	(mh_to_binary): Likewise.
	(move_helper): Likewise.
	* parse.y: Changes to ACCEPT.
	* symbols.cc (symbol_table_init): Add external_e attribute to
	DEBUG-ITEM and children.
	(new_temporary_impl): Mollify cppcheck.
	* symfind.cc (struct funcname): Likewise.
	* util.cc (determine_intermediate_type): Set output.data.digits to
	zero.

libgcobol/ChangeLog:

	* constants.cc (struct cblc_field_t):  Add external_e attribute to
	DEBUG-ITEM and children.
	* libgcobol.cc (field_from_ascii): Changes to ACCEPT.
	(__gg__get_date_yymmdd): Likewise.
	(__gg__get_date_yyyymmdd): Likewise.
	(__gg__get_date_yyddd): Likewise.
	(__gg__get_yyyyddd): Likewise.
	(__gg__get_date_dow): Likewise.
	(__gg__get_date_hhmmssff): Likewise.
	(format_for_display_internal): Initialize an automatic variable.
	(default_exception_handler): Include function name in "missing
	function" run-time error.
	(__gg__set_exception_code): Likewise.
	(__gg__set_exception_call): Likewise.

gcc/testsuite/ChangeLog:

	* cobol.dg/group2/ACCEPT_FROM__date__with_subscripts_and_refmods.cob: New test.
	* cobol.dg/group2/ACCEPT_FROM__date__with_subscripts_and_refmods.out: New test.
	* cobol.dg/group2/MOVE__identical__operations.cob: New test.
	* cobol.dg/group2/MOVE__identical__operations.out: New test.
	* cobol.dg/group2/RT3574_PR__40-_Repository_section_intrinsic_funcs.cob: New test.
19 files changed