diff options
53 files changed, 2679 insertions, 1728 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4aa01b..33d10ef 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,59 @@ +2025-05-10 H.J. Lu <hjl.tools@gmail.com> + + PR target/92080 + PR target/117839 + * config/i386/i386-features.cc (replace_vector_const): Change + dest to src. + +2025-05-10 Jan Hubicka <hubicka@ucw.cz> + + * config/i386/i386-features.cc + (general_scalar_chain::vector_const_cost): Add BB parameter; handle + size costs; use COSTS_N_INSNS to compute move costs. + (general_scalar_chain::compute_convert_gain): Use optimize_bb_for_size + instead of optimize_insn_for size; use COSTS_N_INSNS to compute move costs; + update calls of general_scalar_chain::vector_const_cost; use + ix86_cost->integer_to_sse. + (timode_immed_const_gain): Add bb parameter; use + optimize_bb_for_size_p. + (timode_scalar_chain::compute_convert_gain): Use optimize_bb_for_size_p. + * config/i386/i386-features.h (class general_scalar_chain): Update + prototype of vector_const_cost. + * config/i386/i386.h (struct processor_costs): Add integer_to_sse. + * config/i386/x86-tune-costs.h (struct processor_costs): Copy + sse_to_integer to integer_to_sse everywhere. + +2025-05-10 Filip Kastl <fkastl@suse.cz> + + PR tree-optimization/120080 + * tree-switch-conversion.cc (bit_test_cluster::find_bit_tests): + Replace assert with return. + +2025-05-10 Shreya Munnangi <smunnangi1@ventanamicro.com> + + * config/riscv/iterators.md (OPTAB): New iterator. + * config/riscv/predicates.md (arith_or_zbs_operand): Remove. + (reg_or_const_int_operand): New predicate. + * config/riscv/riscv-protos.h (synthesize_ior_xor): Prototype. + * config/riscv/riscv.cc (synthesize_ior_xor): New function. + * config/riscv/riscv.md (ior/xor expander): Use synthesize_ior_xor. + +2025-05-10 LIU Hao <lh_mouse@126.com> + + PR target/111107 + * config/i386/cygming.h (PREFERRED_STACK_BOUNDARY_DEFAULT): Override + definition from i386.h. + (STACK_REALIGN_DEFAULT): Undefine, as it no longer has an effect. + * config/i386/i386.cc (ix86_update_stack_boundary): Force minimum + 128-bit alignment if `force_align_arg_pointer`. + +2025-05-10 Anton Blanchard <antonb@tenstorrent.com> + + * config/riscv/bitmanip.md (crc_rev<ANYI1:mode><ANYI:mode>4): Check + TARGET_ZVBC. + * config/riscv/riscv.cc (expand_crc_using_clmul): Emit code using + vclmul if TARGET_ZVBC. + 2025-05-09 Eric Botcazou <ebotcazou@adacore.com> * vr-values.cc (simplify_using_ranges::simplify) <BIT_AND_EXPR>: diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 21a86ae..b11e7ca 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20250510 +20250511 diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog index 9f6a58c..87aeaba 100644 --- a/gcc/cobol/ChangeLog +++ b/gcc/cobol/ChangeLog @@ -1,3 +1,56 @@ +2025-05-10 Robert Dubner <rdubner@symas.com> + + PR cobol/119337 + * Make-lang.in: Change how $(FLEX) is invoked. + * cdf.y: Change parser tokens. + * gcobc: Changed how name is inferred for PR119337 + * gcobol.1: Documentation for SOURCE format heuristic + * genapi.cc: Eliminate __gg__odo_violation. + (parser_display_field): Change comment. + * genutil.cc:Eliminate __gg__odo_violation. + (REFER): New macro for analyzing subscript/refmod calculations. + (get_integer_value): Likewise. + (get_data_offset): Eliminate __gg__odo_violation. + (scale_by_power_of_ten_N): Eliminate unnecessary var_decl_rdigits operation. + (refer_is_clean): Check for FldLiteralN. + (REFER_CHECK): Eliminate. + (refer_refmod_length): Streamline var_decl_rdigits processing. + (refer_fill_depends): Likewise. + (refer_offset): Streamline processing when FldLiteralN. + (refer_size): Tag with REFER macro. + (refer_size_dest): Likewise. + (refer_size_source): Likewise. + * genutil.h (get_integer_value): Delete declaration for odo_violation; + change comment for get_integer_value + (REFER_CHECK): Delete declaration. + (refer_check): Delete #define. + * lexio.cc (is_fixed_format): Changes for source format auto-detect. + (is_reference_format): Likewise. + (check_source_format_directive): Likewise. + (valid_sequence_area): Likewise. + (is_p): Likewise. + (is_program_id): Likewise. + (likely_nist_file): Likewise. + (infer_reference_format): Likewise. + (cdftext::free_form_reference_format): Likewise. + * parse.y: Token changes. + * parse_ante.h (class tokenset_t): Likewise. + (class current_tokens_t): Likewise. + (cmd_or_env_special_of): Likewise. + * scan.l: Likewise. + * scan_ante.h (bcomputable): Likewise. + (keyword_alias_add): Likewise. + (struct bint_t): Likewise. + (binary_integer_usage): Likewise. + (binary_integer_usage_of): Likewise. + * scan_post.h (start_condition_str): Likewise. + * symbols.cc (symbol_table_init): Formatting. + * symbols.h (struct cbl_field_data_t): Add "input" method to field_data_t. + (keyword_alias_add): Add forward declaration. + (binary_integer_usage_of): Likewise. + * token_names.h: Change list of tokens. + * util.cc (iso_cobol_word): Change list of COBOL reserved words. + 2025-05-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR cobol/119217 diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in index 9b74dd3..a474123 100644 --- a/gcc/cobol/Make-lang.in +++ b/gcc/cobol/Make-lang.in @@ -157,7 +157,7 @@ cobol/cdf.cc: cobol/cdf.y FLEX_WARNING = warning, dangerous trailing context cobol/scan.cc: cobol/scan.l - $(FLEX) -o$@ $(LFLAGS) $< >$@~ 2>&1 + $(FLEX) -o$@ $(LFLAGS) $< 2>$@~ || { cat $@~ >&1; exit 1; } awk '! /$(FLEX_WARNING)/ {print > "/dev/stderr"; nerr++} \ END {print "$(FLEX):", NR, "messages" > "/dev/stderr"; \ exit nerr}' $@~ diff --git a/gcc/cobol/cdf.y b/gcc/cobol/cdf.y index 994bf6a..7680f48 100644 --- a/gcc/cobol/cdf.y +++ b/gcc/cobol/cdf.y @@ -193,7 +193,7 @@ apply_cdf_turn( const exception_turn_t& turn ) { %type <cdfarg> namelit name_any name_one %type <string> name subscript subscripts inof %token <boolean> BOOL -%token <number> FEATURE 363 NUMBER 302 EXCEPTION_NAME 280 "EXCEPTION NAME" +%token <number> FEATURE 365 NUMBER 303 EXCEPTION_NAME 280 "EXCEPTION NAME" %type <cdfval> cdf_expr %type <cdfval> cdf_relexpr cdf_reloper cdf_and cdf_bool_expr @@ -203,48 +203,48 @@ apply_cdf_turn( const exception_turn_t& turn ) { %type <file> filename %type <files> filenames -%token BY 476 -%token COPY 360 -%token CDF_DISPLAY 382 ">>DISPLAY" -%token IN 595 +%token BY 478 +%token COPY 362 +%token CDF_DISPLAY 384 ">>DISPLAY" +%token IN 597 %token NAME 286 -%token NUMSTR 304 "numeric literal" -%token OF 676 -%token PSEUDOTEXT 711 -%token REPLACING 733 -%token LITERAL 297 -%token SUPPRESS 374 - -%token LSUB 365 "(" -%token SUBSCRIPT 373 RSUB 370 ")" - -%token CDF_DEFINE 381 ">>DEFINE" -%token CDF_IF 383 ">>IF" -%token CDF_ELSE 384 ">>ELSE" -%token CDF_END_IF 385 ">>END-IF" -%token CDF_EVALUATE 386 ">>EVALUATE" -%token CDF_WHEN 387 ">>WHEN" -%token CDF_END_EVALUATE 388 ">>END-EVALUATE" - -%token AS 458 CONSTANT 359 DEFINED 361 +%token NUMSTR 305 "numeric literal" +%token OF 678 +%token PSEUDOTEXT 713 +%token REPLACING 735 +%token LITERAL 298 +%token SUPPRESS 376 + +%token LSUB 367 "(" +%token SUBSCRIPT 375 RSUB 372 ")" + +%token CDF_DEFINE 383 ">>DEFINE" +%token CDF_IF 385 ">>IF" +%token CDF_ELSE 386 ">>ELSE" +%token CDF_END_IF 387 ">>END-IF" +%token CDF_EVALUATE 388 ">>EVALUATE" +%token CDF_WHEN 389 ">>WHEN" +%token CDF_END_EVALUATE 390 ">>END-EVALUATE" + +%token AS 460 CONSTANT 361 DEFINED 363 %type <boolean> DEFINED -%token OTHER 688 PARAMETER_kw 366 "PARAMETER" -%token OFF 677 OVERRIDE 367 -%token THRU 929 -%token TRUE_kw 803 "True" +%token OTHER 690 PARAMETER_kw 368 "PARAMETER" +%token OFF 679 OVERRIDE 369 +%token THRU 931 +%token TRUE_kw 805 "True" -%token CALL_COBOL 389 "CALL" -%token CALL_VERBATIM 390 "CALL (as C)" +%token CALL_COBOL 391 "CALL" +%token CALL_VERBATIM 392 "CALL (as C)" -%token TURN 805 CHECKING 486 LOCATION 639 ON 679 WITH 831 +%token TURN 807 CHECKING 488 LOCATION 641 ON 681 WITH 833 -%left OR 930 -%left AND 931 -%right NOT 932 -%left '<' '>' '=' NE 933 LE 934 GE 935 +%left OR 932 +%left AND 933 +%right NOT 934 +%left '<' '>' '=' NE 935 LE 936 GE 937 %left '-' '+' %left '*' '/' -%right NEG 937 +%right NEG 939 %define api.prefix {ydf} %define api.token.prefix{YDF_} @@ -448,7 +448,6 @@ cdf_if: CDF_IF cdf_cond_expr { scanner_parsing(YDF_CDF_IF, $2); } | CDF_IF error { - ////if( scanner_parsing() ) yyerrok; } CDF_END_IF { // not pushed, don't pop if( ! scanner_parsing() ) YYACCEPT; } @@ -467,18 +466,17 @@ cdf_eval_obj: cdf_cond_expr ; cdf_cond_expr: BOOL - | NAME DEFINED[maybe] + | NAME DEFINED { auto p = dictionary.find($1); bool found = p != dictionary.end(); - if( !$maybe ) found = ! found; - if( ! found ) { - $$ = !$2; - dbgmsg("CDF: %s not found in dictionary (result %s)", + if( !$DEFINED ) found = ! found; + $$ = found; + if( found ) { + dbgmsg("CDF: %s found in dictionary (result %s)", $1, $$? "true" : "false"); } else { - $$ = $2; - dbgmsg("CDF: %s found in dictionary (result %s)", + dbgmsg("CDF: %s not found in dictionary (result %s)", $1, $$? "true" : "false"); } } diff --git a/gcc/cobol/gcobc b/gcc/cobol/gcobc index 93e1bd302..1d469ed 100755 --- a/gcc/cobol/gcobc +++ b/gcc/cobol/gcobc @@ -142,6 +142,11 @@ do if [ "$pending_arg" ] then + case $pending_arg in + -o) output_name="$opt" # capture named output file + ;; + esac + opts="$opts $pending_arg $opt" pending_arg= continue @@ -392,7 +397,13 @@ do ;; # -main # -nomain - # -o + + -o) pending_arg=$opt + ;; + -o*) output_name=$opt ## non-empty means do not infer + opts="$opts $opt" + ;; + # -O0, -Ox -O | -O2 | -Os) warn "$opt" ;; @@ -432,7 +443,23 @@ do -x) mode= ;; - *) opts="$opts $opt" # pass through + -) output_name=a.out # nonnull to prevent overriding gcc default + opts="$opts /dev/stdin" + ;; + + *) if [ -z "$output_name" ] # first non-option argument is source file name + then + output_name=$(basename ${opt%.*}) + case $mode in + -c) output_name="$output_name".o + ;; + -shared) + output_name="$output_name".so + ;; + esac + opts="$opts -o $output_name" + fi + opts="$opts $opt" # pass through ;; esac done diff --git a/gcc/cobol/gcobol.1 b/gcc/cobol/gcobol.1 index 4377c14..0c3d2c1 100644 --- a/gcc/cobol/gcobol.1 +++ b/gcc/cobol/gcobol.1 @@ -97,8 +97,9 @@ Define a CDF name (for use with to have the value of .Ar expr . .It Fl E -Write the CDF-processed \*[lang] input to standard output in free-form -reference format. Certain non-\*[lang] markers are included in the +Write the CDF-processed \*[lang] input to standard output in +.Em "free-form reference format". +Certain non-\*[lang] markers are included in the output to indicate where copybook files were included. For line-number consistency with the input, blank lines are retained. .Pp @@ -147,13 +148,13 @@ and in that order. .It Fl ffixed-form Use strict -.Em "Reference Format" +.Em "fixed-form reference format" in reading the \*[lang] input: 72-character lines, with a 6-character sequence area, and an indicator column. Data past column 72 are ignored. .It Fl ffree-form Force the \*[lang] input to be interpreted as -.Em "free format" . +.Em "free-form reference format". Line breaks are insignificant, except that .Ql * at the start of a line acts as a comment marker. @@ -187,12 +188,23 @@ the entire program could appear on one line. .Pp By default, .Nm -auto-detects the source code format by examining the -.Em "sequence number area" -of the first line of the first file: if those characters are all -digits or blanks, the file is assumed to be in -.Em "reference format" , +auto-detects the source code format by examining the line that +contains the text "program-id". When there are characters on past column 72 +on that line, the file is assumed to be in +.Em "extended source format", with the indicator area in column 7. +Otherwise, columns 1-6 are examined. If those characters are all digits +or blanks, the file is assumed to be in +.Em "fixed-form reference format", +also with the indicator in column 7. + +If not auto-detected as +.Em "fixed-form reference format" +or +.Em "extended source format", +the file is assumed to be in +.Em "free-form reference format". + .Pp . .It Fl fcobol-exceptions Ar exception Op Ns , Ns Ar exception Ns ... @@ -1000,9 +1012,12 @@ to standard error as a warning message. may be one of: .Bl -tag -compact .It Sy FIXED -Source conforms to \*[lang] Reference Format with unlimited line length. +Source conforms to \*[lang] +.Em "fixed-form reference format" +with unlimited line length. .It Sy FREE -Line endings and indentation are ignored by the compiler, except that a +Source conforms to \*[lang] +.Em "free-form reference format". .Ql "*" at the beginning of a line is recognized as a comment. .El diff --git a/gcc/cobol/genapi.cc b/gcc/cobol/genapi.cc index 204b1ae..70df86a 100644 --- a/gcc/cobol/genapi.cc +++ b/gcc/cobol/genapi.cc @@ -3564,7 +3564,6 @@ parser_enter_file(const char *filename) SET_VAR_DECL(var_decl_default_compute_error , INT , "__gg__default_compute_error"); SET_VAR_DECL(var_decl_rdigits , INT , "__gg__rdigits"); - SET_VAR_DECL(var_decl_odo_violation , INT , "__gg__odo_violation"); SET_VAR_DECL(var_decl_unique_prog_id , SIZE_T , "__gg__unique_prog_id"); SET_VAR_DECL(var_decl_entry_location , VOID_P , "__gg__entry_pointer"); @@ -5100,6 +5099,16 @@ parser_display_field(cbl_field_t *field) DISPLAY_NO_ADVANCE); } +/* + * The first parameter to parser_display is the "device" upon which to display + * the data. Besides normal devices, these may include elements that define the + * Unix command line and environment: + * 1. ARG_NUM_e, the ARGUMENT-NUMBER + * 2. ARG_VALUE_e, the ARGUMENT-VALUE + * 3. ENV_NAME_e, the ENVIRONMENT-NAME + * 4. ENV_VALUE_e, the ENVIRONMENT-VALUE + * that need special care and feeding. + */ void parser_display( const struct cbl_special_name_t *upon, struct cbl_refer_t refs[], diff --git a/gcc/cobol/genutil.cc b/gcc/cobol/genutil.cc index 94e57f4..3235c38 100644 --- a/gcc/cobol/genutil.cc +++ b/gcc/cobol/genutil.cc @@ -68,7 +68,6 @@ tree var_decl_exception_paragraph; // const char *__gg__exception_paragraph; tree var_decl_default_compute_error; // int __gg__default_compute_error; tree var_decl_rdigits; // int __gg__rdigits; -tree var_decl_odo_violation; // int __gg__odo_violation; tree var_decl_unique_prog_id; // size_t __gg__unique_prog_id; tree var_decl_entry_location; // This is for managing ENTRY statements @@ -107,6 +106,18 @@ tree var_decl_treeplet_4s; // SIZE_T_P , "__gg__treeplet_4s" tree var_decl_nop; // int __gg__nop; tree var_decl_main_called; // int __gg__main_called; +#if 0 +#define REFER +#else +#define REFER do \ + { \ + if( getenv("REFER") ) \ + { \ + fprintf(stderr, "REFER %s\n", __func__); \ + } \ + }while(0); +#endif + int get_scaled_rdigits(cbl_field_t *field) { @@ -231,8 +242,6 @@ get_integer_value(tree value, } - - Analyze(); // Call this routine when you know the result has to be an integer with no // rdigits. This routine became necessary the first time I saw an @@ -287,6 +296,11 @@ static tree get_data_offset(cbl_refer_t &refer, int *pflags = NULL) { + REFER; + if( getenv("REFER") ) + { + fprintf(stderr, " %s %s\n", refer.field->name, refer.field->data.initial); + } Analyze(); // This routine returns a tree which is the size_t offset to the data in the // refer/field @@ -351,6 +365,7 @@ get_data_offset(cbl_refer_t &refer, { // The subscript isn't an integer set_exception_code(ec_bound_subscript_e); + gg_assign(var_decl_rdigits, integer_zero_node); } ELSE { @@ -408,7 +423,7 @@ get_data_offset(cbl_refer_t &refer, get_integer_value(value64, depending_on); IF( subscript, ge_op, value64 ) { - gg_assign(var_decl_odo_violation, integer_one_node); + set_exception_code(ec_bound_odo_e); } ELSE ENDIF @@ -439,6 +454,7 @@ get_data_offset(cbl_refer_t &refer, { // refmod offset is not an integer, and has to be set_exception_code(ec_bound_ref_mod_e); + gg_assign(var_decl_rdigits, integer_zero_node); } ELSE ENDIF @@ -1139,17 +1155,9 @@ scale_by_power_of_ten_N(tree value, Analyzer.Message("takes int N"); if( N == 0 ) { - if( check_for_fractional ) - { - gg_assign(var_decl_rdigits, integer_zero_node); - } } else if( N > 0 ) { - if( check_for_fractional ) - { - gg_assign(var_decl_rdigits, integer_zero_node); - } tree value_type = TREE_TYPE(value); FIXED_WIDE_INT(128) power_of_ten = get_power_of_ten(N); gg_assign(value, gg_multiply(value, wide_int_to_tree( value_type, @@ -1169,7 +1177,6 @@ scale_by_power_of_ten_N(tree value, gg_assign(var_decl_rdigits, integer_one_node); } ELSE - gg_assign(var_decl_rdigits, integer_zero_node); ENDIF } gg_assign(value, gg_divide(value, wide_int_to_tree( value_type, @@ -1722,11 +1729,14 @@ get_literal_string(cbl_field_t *field) bool refer_is_clean(cbl_refer_t &refer) { - if( !refer.field ) + if( !refer.field || refer.field->type == FldLiteralN ) { // It is routine for a refer to have no field. It happens when the parser - // passes us a refer for an optional parameter that has been ommitted, for + // passes us a refer for an optional parameter that has been omitted, for // example. + + // It is also the case that a FldLiteralN will never have suscripts, or the + // like. return true; } @@ -1739,38 +1749,6 @@ refer_is_clean(cbl_refer_t &refer) ; } -void -REFER_CHECK(const char *func, - int line, - cbl_refer_t &refer - ) - { - static int counter=1; - - if( counter == 5 ) - { - fprintf(stderr, "DING! %d\n", counter); - } - - - fprintf(stderr, - "ct REFER_CHECK(%d): %s():%d %s\n", - counter, - func, - line, - refer.field->name); - - gg_printf("rt REFER_CHECK(%d): %s():%d %s (%s)\n", - build_int_cst_type(INT, counter), - gg_string_literal(func), - build_int_cst_type(INT, line), - gg_string_literal(refer.field->name), - gg_string_literal(cbl_field_type_str(refer.field->type)), - NULL_TREE); - counter+=1; - } - - /* This routine returns the length portion of a refmod(start:length) reference. It extracts both the start and the length so that it can add them together to make sure that result falls within refer.capacity. @@ -1779,6 +1757,7 @@ static tree // size_t refer_refmod_length(cbl_refer_t &refer) { + REFER; Analyze(); if( refer.refmod.from || refer.refmod.len ) { @@ -1797,6 +1776,7 @@ refer_refmod_length(cbl_refer_t &refer) { set_exception_code(ec_bound_ref_mod_e); gg_assign(refstart, gg_cast(LONG, integer_one_node)); + gg_assign(var_decl_rdigits, integer_zero_node); } ELSE ENDIF @@ -1835,6 +1815,7 @@ refer_refmod_length(cbl_refer_t &refer) // length is not an integer set_exception_code(ec_bound_ref_mod_e); gg_assign(reflen, gg_cast(LONG, integer_one_node)); + gg_assign(var_decl_rdigits, integer_zero_node); } ELSE { @@ -1898,6 +1879,7 @@ static tree // size_t refer_fill_depends(cbl_refer_t &refer) { + REFER; // This returns a positive number which is the amount a depends-limited // capacity needs to be reduced. Analyze(); @@ -1928,6 +1910,7 @@ refer_fill_depends(cbl_refer_t &refer) // This needs to evaluate to an integer set_exception_code(ec_bound_odo_e); gg_assign(value64, build_int_cst_type(TREE_TYPE(value64), odo->occurs.bounds.upper)); + gg_assign(var_decl_rdigits, integer_zero_node); } ELSE ENDIF @@ -1973,27 +1956,27 @@ tree // size_t refer_offset(cbl_refer_t &refer, int *pflags) { + // This routine calculates the effect of a refer offset on the + // refer.field->data location. When there are subscripts, the data location + // gets augmented by the (subscript-1)*element_size calculation. And when + // there is a refmod, the data location additionally gets augmented by + // (refmod.from-1) + + REFER; if( !refer.field ) { + // It's common for the field to be missing. It generally means that an + // optional parameter wasn't supplied. return size_t_zero_node; } - if( !refer.nsubscript ) - { - return get_data_offset(refer); - } - - Analyze(); - - tree retval = gg_define_variable(SIZE_T); - gg_assign(var_decl_odo_violation, integer_zero_node); - gg_assign(retval, get_data_offset(refer, pflags)); - IF( var_decl_odo_violation, ne_op, integer_zero_node ) + if( refer.field->type == FldLiteralN || refer.field->type == FldLiteralA ) { - set_exception_code(ec_bound_odo_e); + // We know that literals have no offset + return size_t_zero_node; } - ELSE - ENDIF + + tree retval = get_data_offset(refer, pflags); return retval; } @@ -2001,6 +1984,7 @@ static tree refer_size(cbl_refer_t &refer, refer_type_t refer_type) { + REFER; Analyze(); static tree retval = gg_define_variable(SIZE_T, "..rs_retval", vs_file_static); @@ -2042,12 +2026,14 @@ refer_size(cbl_refer_t &refer, refer_type_t refer_type) tree // size_t refer_size_dest(cbl_refer_t &refer) { + REFER; return refer_size(refer, refer_dest); } tree // size_t refer_size_source(cbl_refer_t &refer) { + REFER; /* There are oddities involved with refer_size_source and refer_size_dest. See the comments in refer_has_depends for some explanation. There are other considerations, as well. For example, consider a move, where you diff --git a/gcc/cobol/genutil.h b/gcc/cobol/genutil.h index c216dba..8244481 100644 --- a/gcc/cobol/genutil.h +++ b/gcc/cobol/genutil.h @@ -56,7 +56,6 @@ extern tree var_decl_exception_paragraph; // const char *__gg__exception_para extern tree var_decl_default_compute_error; // int __gg__default_compute_error; extern tree var_decl_rdigits; // int __gg__rdigits; -extern tree var_decl_odo_violation; // int __gg__odo_violation; extern tree var_decl_unique_prog_id; // size_t __gg__unique_prog_id; extern tree var_decl_entry_location; // This is for managing ENTRY statements @@ -121,7 +120,7 @@ void set_exception_code_func(ec_type_t ec, #define set_exception_code(ec) set_exception_code_func(ec, __LINE__) bool process_this_exception(ec_type_t ec); #define CHECK_FOR_FRACTIONAL_DIGITS true -void get_integer_value(tree value, +void get_integer_value(tree value, // This is always a LONG cbl_field_t *field, tree offset=NULL, // size_t bool check_for_fractional_digits=false); @@ -146,12 +145,6 @@ tree refer_offset(cbl_refer_t &refer, tree refer_size_source(cbl_refer_t &refer); tree refer_size_dest(cbl_refer_t &refer); -void REFER_CHECK( const char *func, - int line, - cbl_refer_t &refer - ); -#define refer_check(a) REFER_CHECK(__func__, __LINE__, a) - tree qualified_data_location(cbl_refer_t &refer); void build_array_of_treeplets( int ngroup, diff --git a/gcc/cobol/lexio.cc b/gcc/cobol/lexio.cc index a992166..2db1af2 100644 --- a/gcc/cobol/lexio.cc +++ b/gcc/cobol/lexio.cc @@ -46,8 +46,22 @@ static struct { first_file = false; return tf; } + inline bool is_fixed() const { return column == 7; } + inline bool is_reffmt() const { return is_fixed() && right_margin == 73; } + inline bool is_free() const { return ! is_fixed(); } + + const char * description() const { + if( is_reffmt() ) return "REFERENCE"; + if( is_fixed() ) return "FIXED"; + if( is_free() ) return "FREE"; + gcc_unreachable(); + } } indicator = { true, false, 0, 0 }; +// public source format test functions +bool is_fixed_format() { return indicator.is_fixed(); } +bool is_reference_format() { return indicator.is_reffmt(); } + static bool debug_mode = false; /* @@ -86,10 +100,6 @@ cobol_set_indicator_column( int column ) indicator.column = column; } -bool is_fixed_format() { return indicator.column == 7; } -bool is_reference_format() { - return indicator.column == 7 && indicator.right_margin == 73; -} bool include_debug() { return indicator.column == 7 && debug_mode; } bool set_debug( bool tf ) { return debug_mode = tf && is_fixed_format(); } @@ -348,13 +358,14 @@ check_source_format_directive( filespan_t& mfile ) { gcc_assert(cm[3].length() == 4 || cm[3].length() == 5); break; } - mfile.cur = const_cast<char*>(cm[0].second); + dbgmsg( "%s:%d: %s format set, on line " HOST_SIZE_T_PRINT_UNSIGNED, __func__, __LINE__, indicator.column == 7? "FIXED" : "FREE", (fmt_size_t)mfile.lineno() ); - erase_line(const_cast<char*>(cm[0].first), - const_cast<char*>(cm[0].second)); + char *bol = indicator.is_fixed()? mfile.cur : const_cast<char*>(cm[0].first); + erase_line(bol, const_cast<char*>(cm[0].second)); + mfile.cur = const_cast<char*>(cm[0].second); } } @@ -393,33 +404,22 @@ struct buffer_t : public bytespan_t { } }; -static bool -valid_sequence_area( const char *p, const char *eodata ) { - const char *pend = p + 6; - if ( eodata < pend ) return false; +static inline bool is_p( char ch ) { return TOUPPER(ch) == 'P'; } - for( ; p < pend; p++ ) { - if( ! (ISDIGIT(*p) || *p == SPACE) ) { - return false; +static bool +is_program_id( const char *p, const char *eol ) { + static const std::string program_id("PROGRAM-ID"); + auto eop = p + program_id.size(); + if( eop < eol ) { + // PROGRAM-ID must be followed by a dot, perhaps with intervening whitespace. + for( const char *dot=eop; dot < eol && *dot != '.'; dot++ ) { + if( !ISSPACE(*dot) ) return false; } + std::string line (p, eop); + std::transform(line.begin(), line.end(), line.begin(), ::toupper); + return line == program_id; } - return true; // characters either digits or blanks -} - -// Inspect the 2nd line for telltale signs of a NIST file. -// If true, caller sets right margin to 73, indicating Reference Format -static bool -likely_nist_file( const char *p, const char *eodata ) { - if( (p = std::find(p, eodata, '\n')) == eodata ) return false; - if ( eodata < ++p + 80 ) return false; - p += 72; - - return - ISALPHA(p[0]) && ISALPHA(p[1]) && - ISDIGIT(p[2]) && ISDIGIT(p[3]) && ISDIGIT(p[4]) && - p[5] == '4' && - p[6] == '.' && - p[7] == '2'; + return false; } const char * esc( size_t len, const char input[] ); @@ -1620,6 +1620,54 @@ cdftext::map_file( int fd ) { bool lexio_dialect_mf(); +/* + * A valid sequence area is 6 digits or blanks at the begining of the line that + * contains PROGRAM-ID. Return NULL if no valid sequence area, else return + * pointer to BOL. + */ +static const char * +valid_sequence_area( const char *data, const char *eodata ) { + + for( const char *p = data; + (p = std::find_if(p, eodata, is_p)) != eodata; + p++ ) + { + auto eol = std::find(p, eodata, '\n'); + if( p == data || ISSPACE(p[-1]) ) { + if( is_program_id(p, eol) ) { // found program-id token + const char *bol = p; + for( ; data <= bol-1 && bol[-1] != '\n'; --bol ) + ; + if( 6 < p - bol ) { + if( std::all_of(bol, bol+6, ::isdigit) ) { + return bol; + } + if( std::all_of(bol, bol+6, ::isblank) ) { + return bol; + } + break; + } + } + } + } + return nullptr; +} + +/* + * Reference Format -- valid COBOL between columns 8 and 72 -- has data after + * column 72 on the PROGRAM-ID line. Extended Reference Format (that allows + * longer lines) has no reason to follow the PROGRAM-ID with more stuff. + */ +static bool +infer_reference_format( const char *bol, const char *eodata ) { + assert(bol); + auto eol = std::find(bol, eodata, '\n'); + if( 72 < eol - bol ) { + return ! std::all_of(bol + 72, eol, ::isspace); + } + return false; +} + filespan_t cdftext::free_form_reference_format( int input ) { filespan_t source_buffer = map_file(input); @@ -1638,27 +1686,19 @@ cdftext::free_form_reference_format( int input ) { } current( mfile.data ); /* - * If the format is not explicitly set on the command line, test the - * first 6 bytes of the first file to determine the format - * heuristically. If the first 6 characters are only digits or - * blanks, then the file is in fixed format. + * Infer source code format. */ - if( indicator.inference_pending() ) { - const char *p = mfile.data; - while( p < mfile.eodata ) { - const char * pend = - std::find(p, const_cast<const char *>(mfile.eodata), '\n'); - if( 6 < pend - p ) break; - p = pend; - if( p < mfile.eodata) p++; + const char *bol = valid_sequence_area(mfile.data, mfile.eodata); + if( bol ) { + indicator.column = 7; + if( infer_reference_format(bol, mfile.eodata) ) { + indicator.right_margin = 73; + } } - if( valid_sequence_area(p, mfile.eodata) ) indicator.column = 7; - if( likely_nist_file(p, mfile.eodata) ) indicator.right_margin = 73; - dbgmsg("%s:%d: %s%s format detected", __func__, __LINE__, - indicator.column == 7? "FIXED" : "FREE", - indicator.right_margin == 73? "" : "-extended"); + dbgmsg("%s:%d: %s format detected", __func__, __LINE__, + indicator.description()); } while( mfile.next_line() ) { diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y index c6b40fa..cecdd22 100644 --- a/gcc/cobol/parse.y +++ b/gcc/cobol/parse.y @@ -332,7 +332,7 @@ NUMED "NUMERIC-EDITED picture" NUMED_CR "NUMERIC-EDITED CR picture" NUMED_DB "NUMERIC-EDITED DB picture" -%token <number> NINEDOT NINES NINEV PIC_P +%token <number> NINEDOT NINES NINEV PIC_P ONES %token <string> SPACES %token <literal> LITERAL %token <number> END EOP @@ -341,7 +341,7 @@ %token <number> NUMBER NEGATIVE %token <numstr> NUMSTR "numeric literal" %token <number> OVERFLOW_kw "OVERFLOW" -%token <computational> COMPUTATIONAL +%token <computational> BINARY_INTEGER COMPUTATIONAL %token <boolean> PERFORM BACKWARD %token <number> POSITIVE @@ -573,12 +573,12 @@ THAN TIME TIMES TO TOP TOP_LEVEL - TRACKS TRACK_AREA TRAILING TRANSFORM TRIM TRUE_kw "True" TRY - TURN TYPE TYPEDEF + TRACKS TRACK_AREA TRAILING TRANSFORM TRIM TRUE_kw "True" + TRY TURN TYPE TYPEDEF - ULENGTH UNBOUNDED UNIT UNITS UNIT_RECORD UNTIL UP UPON - UPOS UPPER_CASE USAGE USING USUBSTR USUPPLEMENTARY - UTILITY UUID4 UVALID UWIDTH + ULENGTH UNBOUNDED UNIT UNITS UNIT_RECORD UNTIL + UP UPON UPOS UPPER_CASE USAGE USING + USUBSTR USUPPLEMENTARY UTILITY UUID4 UVALID UWIDTH VALUE VARIANCE VARYING VOLATILE @@ -659,7 +659,7 @@ %type <number> star_cbl_opt close_how %type <number> test_before usage_clause1 might_be -%type <boolean> all optional sign_leading on_off initialized strong +%type <boolean> all optional sign_leading on_off initialized strong is_signed %type <number> count data_clauses data_clause %type <number> nine nines nps relop spaces_etc reserved_value signed %type <number> variable_type @@ -801,7 +801,7 @@ %type <switches> upsi_entry -%type <special> acceptable disp_target +%type <special> acceptable disp_upon %type <display> disp_body %type <false_domain> domains domain @@ -2508,23 +2508,14 @@ dev_mnemonic: device_name is NAME } | NAME[device] is NAME[name] { - static const std::map< std::string, special_name_t > fujitsus - { // Fujitsu calls these "function names", not device names - { "ARGUMENT-NUMBER", ARG_NUM_e }, - { "ARGUMENT-VALUE", ARG_VALUE_e } , - { "ENVIRONMENT-NAME", ENV_NAME_e }, - { "ENVIRONMENT-VALUE", ENV_VALUE_e }, - }; - std::string device($device); - std::transform($device, $device + strlen($device), - device.begin(), toupper); - auto p = fujitsus.find(device.c_str()); - if( p == fujitsus.end() ) { + auto p = cmd_or_env_special_of($device); + if( !p ) { error_msg(@device, "%s is not a device name"); + YYERROR; } - cbl_special_name_t special = { 0, p->second }; - if( !namcpy(@name, special.name, $name) ) YYERROR; + cbl_special_name_t special = { 0, *p }; + namcpy(@name, special.name, $name); symbol_special_add(PROGRAM, &special); } @@ -3286,7 +3277,7 @@ index_field1: ctx_name[name] field.data = data; if( !namcpy(@name, field.name, $name) ) YYERROR; - auto symbol = symbol_field(PROGRAM, 0, $name); + auto symbol = symbol_field(PROGRAM, field.parent, $name); if( symbol ) { auto field( cbl_field_of(symbol) ); error_msg(@name, "'%s' already defined on line %d", @@ -4104,7 +4095,13 @@ picture_clause: PIC signed nps[fore] nines nps[aft] gcc_unreachable(); } } + | PIC ones ; +ones: ONES + { + cbl_unimplemented("Boolean type not implemented"); + } + ; alphanum_pic: alphanum_part { current_field()->set_attr($1.attr); @@ -4213,8 +4210,99 @@ usage_clause: usage_clause1[type] } } ; -usage_clause1: usage COMPUTATIONAL[comp] native +usage_clause1: usage BIT + { + cbl_unimplemented("Boolean type not implemented"); + } +| usage BINARY_INTEGER [comp] is_signed { + // action for BINARY_INTEGER is repeated for COMPUTATIONAL, below. + // If it changes, consolidate in a function. + bool infer = true; + cbl_field_t *field = current_field(); + + if( ! $is_signed ) { + $comp.signable = false; + } + + // Some binary types have defined capacity; + switch($comp.type) { + // COMPUTATIONAL and COMP-5 rely on PICTURE. + case FldNumericBinary: + field->attr |= big_endian_e; + __attribute__((fallthrough)); + case FldNumericBin5: + // If no capacity yet, then no picture, infer $comp.capacity. + // If field has capacity, ensure USAGE is compatible. + if( field->data.capacity > 0 ) { // PICTURE before USAGE + infer = false; + switch( field->type ) { + case FldAlphanumeric: // PIC X COMP-5 or COMP-X + assert( field->data.digits == 0 ); + assert( field->data.rdigits == 0 ); + if( dialect_mf() ) { + field->type = $comp.type; + field->clear_attr(signable_e); + } else { + error_msg(@comp, "numeric USAGE invalid " + "with Alpnanumeric PICTURE"); + dialect_error(@1, "Alpnanumeric COMP-5 or COMP-X", "mf"); + YYERROR; + } + break; + case FldNumericDisplay: // PIC 9 COMP-5 or COMP-X + if( $comp.capacity == 0xFF ) { // comp-x is a bit like comp-5 + assert( field->data.digits == field->data.capacity ); + if( ! dialect_mf() ) { + dialect_error(@1, "COMP-X", "mf"); + } + } + field->type = $comp.type; + field->data.capacity = type_capacity(field->type, + field->data.digits); + break; + default: break; + } + } + break; + case FldPacked: // comp-6 is unsigned comp-3 + assert(! $comp.signable); // else PACKED_DECIMAL from scanner + field->attr |= separate_e; + if( ! dialect_mf() ) { + dialect_error(@1, "COMP-6", "mf"); + } + if( field->type == FldNumericDisplay ) {// PICTURE before USAGE + infer = false; + assert(field->data.capacity > 0); + field->type = $comp.type; + field->data.capacity = type_capacity(field->type, + field->data.digits); + } + break; + default: + break; + } + + if( infer ) { + if( $comp.capacity > 0 ) { + if( field->data.capacity > 0 ) { + error_msg(@comp, "%s is BINARY type, incompatible with PICTURE", + field->name); + YYERROR; + } + field->data.capacity = $comp.capacity; + field->type = $comp.type; + if( $comp.signable ) { + field->attr = (field->attr | signable_e); + } + } + } + $$ = $comp.type; + } + | usage COMPUTATIONAL[comp] native + { + // logic below duplicates BINARY_INTEGER, above. + // If it changes, consolidate in a function. bool infer = true; cbl_field_t *field = current_field(); @@ -4238,7 +4326,8 @@ usage_clause1: usage COMPUTATIONAL[comp] native field->clear_attr(signable_e); } else { error_msg(@comp, "numeric USAGE invalid " - "with Alpnanumeric PICTURE"); + "with Alpnanumeric PICTURE"); + dialect_error(@1, "Alpnanumeric COMP-5 or COMP-X", "mf"); YYERROR; } break; @@ -5429,7 +5518,7 @@ disp_body: disp_vargs[vargs] $$.special = NULL; $$.vargs = $vargs; } - | disp_vargs[vargs] UPON disp_target[special] + | disp_vargs[vargs] UPON disp_upon[special] { $$.special = $special; $$.vargs = $vargs; @@ -5441,17 +5530,25 @@ disp_vargs: DISPLAY vargs { } ; -disp_target: device_name { +disp_upon: device_name { $$ = symbol_special($1.id); } | NAME { - symbol_elem_t *e = symbol_special(PROGRAM, $1); + symbol_elem_t *e = symbol_special(PROGRAM, $NAME); if( !e ) { - error_msg(@NAME, "no such special name '%s'", $NAME); - YYERROR; - } - $$ = cbl_special_name_of(e); + const special_name_t *special_type = cmd_or_env_special_of($NAME); + if( !special_type ) { + error_msg(@NAME, "no such special name '%s'", $NAME); + YYERROR; + } + // Add the name now, as a convenience. + cbl_special_name_t special = { 0, *special_type }; + namcpy(@NAME, special.name, $NAME); + + e = symbol_special_add(PROGRAM, &special); + } + $$ = cbl_special_name_of(e); } ; @@ -8961,6 +9058,19 @@ inspect: INSPECT backward inspected TALLYING tallies error_msg(@all, "ALL must be part of a figurative constant"); YYERROR; } + } else { + cbl_field_t *match = $match->field, + *replace = $replace_oper->field; + if( is_literal(match) && is_literal(replace) ) { + if( !$match->all && !$replace_oper->all) { + if( match->data.capacity != replace->data.capacity ) { + error_msg(@match, "'%s', size %u NOT EQUAL '%s', size %u", + nice_name_of(match), match->data.capacity, + nice_name_of(replace), replace->data.capacity); + YYERROR; + } + } + } } if( is_constant($inspected->field) ) { auto name = nice_name_of($inspected->field); @@ -10918,6 +11028,11 @@ sign: %empty | SIGN ; +is_signed: %empty { $$ = true; } + | SIGNED_kw { $$ = true; } + | UNSIGNED_kw { $$ = false; } + ; + start_after: %empty %prec AFTER | START AFTER varg ; @@ -11245,7 +11360,7 @@ tokenset_t::tokenset_t() { #include "token_names.h" } -bool iso_cobol_word( const std::string& name, bool include_intrinsics ); +bool iso_cobol_word( const std::string& name, bool include_context ); // Look up the lowercase form of a keyword, excluding some CDF names. int @@ -11276,8 +11391,13 @@ tokenset_t::find( const cbl_name_t name, bool include_intrinsics ) { } } - //// if( ! iso_cobol_word(uppercase(name), include_intrinsics) ) return 0; - + /* + * The input name may be one of: + * 1. an intrinsic function name (OK if include_intrinsics) + * 2. an ISO/GCC reserved word or context-sensitive word (OK) + * 3. a token in our token list for convenience, such as BINARY_INTEGER (bzzt) + */ + cbl_name_t lname; std::transform(name, name + strlen(name) + 1, lname, ftolower); auto p = tokens.find(lname); @@ -11286,9 +11406,10 @@ tokenset_t::find( const cbl_name_t name, bool include_intrinsics ) { if( token == SECTION ) yylval.number = 0; - if( include_intrinsics ) return token; - - return intrinsic_cname(token)? 0 : token; + if( include_intrinsics && intrinsic_cname(token) ) return token; + if( iso_cobol_word(uppercase(name), true) ) return token; + + return 0; } int diff --git a/gcc/cobol/parse_ante.h b/gcc/cobol/parse_ante.h index f3a002a..0369f7b 100644 --- a/gcc/cobol/parse_ante.h +++ b/gcc/cobol/parse_ante.h @@ -928,10 +928,11 @@ teed_up_names() { } class tokenset_t { - std::vector<const char *>token_names; - std::map <std::string, int> tokens; - std::set<std::string> cobol_words; - + // token_names is initialized from a generated header file. + std::vector<const char *>token_names; // position indicates token value + std::map <std::string, int> tokens; // aliases + std::set<std::string> cobol_words; // Anything in COBOL-WORDS may appear only once. + public: static std::string lowercase( const cbl_name_t name ) { cbl_name_t lname; @@ -949,40 +950,56 @@ class tokenset_t { tokenset_t(); int find( const cbl_name_t name, bool include_intrinsics ); - bool equate( const YYLTYPE& loc, int token, const cbl_name_t name ) { + bool equate( const YYLTYPE& loc, int token, + const cbl_name_t name, const cbl_name_t verb = "EQUATE") { auto lname( lowercase(name) ); auto cw = cobol_words.insert(lname); if( ! cw.second ) { - error_msg(loc, "COBOL-WORDS EQUATE: %s may appear but once", name); + error_msg(loc, "COBOL-WORDS %s: %s may appear but once", verb, name); return false; } auto p = tokens.find(lowercase(name)); bool fOK = p == tokens.end(); if( fOK ) { // name not already in use tokens[lname] = token; + dbgmsg("%s:%d: %d has alias %s", __func__, __LINE__, token, name); } else { - error_msg(loc, "EQUATE: %s already defined as a token", name); + error_msg(loc, "%s: %s already defined as a token", verb, name); } return fOK; } - bool undefine( const YYLTYPE& loc, const cbl_name_t name ) { + bool undefine( const YYLTYPE& loc, + const cbl_name_t name, const cbl_name_t verb = "UNDEFINE" ) { auto lname( lowercase(name) ); auto cw = cobol_words.insert(lname); if( ! cw.second ) { - error_msg(loc, "COBOL-WORDS UNDEFINE: %s may appear but once", name); + error_msg(loc, "COBOL-WORDS %s: %s may appear but once", verb, name); return false; } + + // Do not erase generic, multi-type tokens COMPUTATIONAL and BINARY_INTEGER. + if( binary_integer_usage_of(name) ) { + dbgmsg("%s:%d: generic %s remains valid as a token", __func__, __LINE__, name); + return true; + } + auto p = tokens.find(lname); bool fOK = p != tokens.end(); if( fOK ) { // name in use tokens.erase(p); } else { - error_msg(loc, "UNDEFINE: %s not defined as a token", name); + error_msg(loc, "%s: %s not defined as a token", verb, name); } + dbgmsg("%s:%d: %s removed as a valid token name", __func__, __LINE__, name); return fOK; } - bool substitute( const YYLTYPE& loc, const cbl_name_t extant, int token, const cbl_name_t name ) { - return equate( loc, token, name ) && undefine( loc, extant ); + + bool substitute( const YYLTYPE& loc, + const cbl_name_t extant, int token, const cbl_name_t name ) { + return + equate( loc, token, name, "SUBSTITUTE" ) + && + undefine( loc, extant, "SUBSTITUTE" ); } bool reserve( const YYLTYPE& loc, const cbl_name_t name ) { auto lname( lowercase(name) ); @@ -1018,24 +1035,42 @@ class current_tokens_t { int find( const cbl_name_t name, bool include_intrinsics ) { return tokens.find(name, include_intrinsics); } - bool equate( const YYLTYPE& loc, cbl_name_t keyword, const cbl_name_t name ) { - int token = keyword_tok(keyword); - if( 0 == token ) { - error_msg(loc, "EQUATE %s: not a valid token", keyword); - return false; + bool equate( const YYLTYPE& loc, cbl_name_t keyword, const cbl_name_t alias ) { + int token; + if( 0 == (token = binary_integer_usage_of(keyword)) ) { + if( 0 == (token = keyword_tok(keyword)) ) { + error_msg(loc, "EQUATE %s: not a valid token", keyword); + return false; + } } - return tokens.equate(loc, token, name); + auto name = keyword_alias_add(tokens.uppercase(keyword), + tokens.uppercase(alias)); + if( name != keyword ) { + error_msg(loc, "EQUATE: %s is already an alias for %s", alias, name.c_str()); + return false; + } + return tokens.equate(loc, token, alias); } bool undefine( const YYLTYPE& loc, cbl_name_t keyword ) { return tokens.undefine(loc, keyword); } - bool substitute( const YYLTYPE& loc, cbl_name_t keyword, const cbl_name_t name ) { - int token = keyword_tok(keyword); - if( 0 == token ) { - error_msg(loc, "SUBSTITUTE %s: not a valid token", keyword); - return false; + bool substitute( const YYLTYPE& loc, cbl_name_t keyword, const cbl_name_t alias ) { + int token; + if( 0 == (token = binary_integer_usage_of(keyword)) ) { + if( 0 == (token = keyword_tok(keyword)) ) { + error_msg(loc, "SUBSTITUTE %s: not a valid token", keyword); + return false; + } } - return tokens.substitute(loc, keyword, token, name); + auto name = keyword_alias_add(tokens.uppercase(keyword), + tokens.uppercase(alias)); + if( name != keyword ) { + error_msg(loc, "SUBSTITUTE: %s is already an alias for %s", alias, name.c_str()); + return false; + } + + dbgmsg("%s:%d: %s (%d) will have alias %s", __func__, __LINE__, keyword, token, alias); + return tokens.substitute(loc, keyword, token, alias); } bool reserve( const YYLTYPE& loc, const cbl_name_t name ) { return tokens.reserve(loc, name); @@ -3118,6 +3153,21 @@ special_of( const char F[], int L, const char name[] ) { } #define special_of( F ) special_of(__func__, __LINE__, (F)) +static const special_name_t * +cmd_or_env_special_of( std::string name ) { + static const std::map< std::string, special_name_t > fujitsus + { // Fujitsu calls these "function names", not device names + { "ARGUMENT-NUMBER", ARG_NUM_e }, + { "ARGUMENT-VALUE", ARG_VALUE_e } , + { "ENVIRONMENT-NAME", ENV_NAME_e }, + { "ENVIRONMENT-VALUE", ENV_VALUE_e }, + }; + + std::transform(name.begin(), name.end(), name.begin(), ::toupper); + auto p = fujitsus.find(name.c_str()); + return p != fujitsus.end()? &p->second : nullptr; +} + static inline void parser_add2( struct cbl_num_result_t& to, struct cbl_refer_t from ) { diff --git a/gcc/cobol/scan.l b/gcc/cobol/scan.l index f2a0bbe..dfc0c30 100644 --- a/gcc/cobol/scan.l +++ b/gcc/cobol/scan.l @@ -98,7 +98,6 @@ NP P+|(P{COUNT}) UNSIGNED [[:space:]]+UNSIGNED SIGNED [[:space:]]+SIGNED -DBLLONG (LONG-LONG|DOUBLE) ALNUM [AX9]+ @@ -976,20 +975,19 @@ USE({SPC}FOR)? { return USE; } COMP(UTATIONAL)? { return ucomputable(FldNumericBinary, 0); } BINARY { return scomputable(FldNumericBinary, 0); } - BINARY-CHAR{SIGNED} { return scomputable(FldNumericBin5, 1); } - BINARY-CHAR{UNSIGNED} { return ucomputable(FldNumericBin5, 1); } - BINARY-CHAR { return scomputable(FldNumericBin5, 1); } - BINARY-SHORT{SIGNED} { return scomputable(FldNumericBin5, 2); } - BINARY-SHORT{UNSIGNED} { return ucomputable(FldNumericBin5, 2); } - BINARY-SHORT { return scomputable(FldNumericBin5, 2); } - BINARY-LONG{SIGNED} { return scomputable(FldNumericBin5, 4); } - BINARY-LONG{UNSIGNED} { return ucomputable(FldNumericBin5, 4); } - BINARY-LONG { return scomputable(FldNumericBin5, 4); } - BINARY-{DBLLONG}{SIGNED} { return scomputable(FldNumericBin5, 8); } - BINARY-{DBLLONG}{UNSIGNED} { return ucomputable(FldNumericBin5, 8); } - BINARY-{DBLLONG} { return scomputable(FldNumericBin5, 8); } + BINARY-CHAR { return bcomputable(FldNumericBin5, 1); } + BINARY-SHORT { return bcomputable(FldNumericBin5, 2); } + BINARY-LONG { return bcomputable(FldNumericBin5, 4); } + BINARY-DOUBLE { return bcomputable(FldNumericBin5, 8); } + BINARY-LONG-LONG { if( ! dialect_mf() ) { + error_msg(yylloc, "%s requires -dialect mf", yytext); + } + return bcomputable(FldNumericBin5, 8); + } + BIT { not_implemented("USAGE type: BIT"); return BIT; } + FLOAT-BINARY-32 { return ucomputable(FldFloat, 4); } FLOAT-BINARY-64 { return ucomputable(FldFloat, 8); } FLOAT-BINARY-128 { return ucomputable(FldFloat, 16); } @@ -1003,6 +1001,9 @@ USE({SPC}FOR)? { return USE; } FLOAT-LONG { return ucomputable(FldFloat, 8); } FLOAT-SHORT { return ucomputable(FldFloat, 4); } + SIGNED { return SIGNED_kw; } + UNSIGNED { return UNSIGNED_kw; } + INDEX { return INDEX; } MESSAGE-TAG { not_implemented("USAGE type: MESSAGE-TAG"); } NATIONAL { not_implemented("USAGE type: NATIONAL"); @@ -1117,10 +1118,14 @@ USE({SPC}FOR)? { return USE; } FD/[[:blank:]]+ { parsing.need_level(false); return FD; } SD/[[:blank:]]+ { parsing.need_level(false); return SD; } - {NAME} { // NAME here is never a token name + {NAME} { // NAME here might be a token alias + int token; + if( 0 != (token = binary_integer_usage(yytext)) ) { + return token; + } if( is_integer_token() ) return numstr_of(yytext); ydflval.string = yylval.string = xstrdup(yytext); - auto token = typed_name(yytext); + token = typed_name(yytext); return token == NAME88? NAME : token; } @@ -1204,6 +1209,11 @@ USE({SPC}FOR)? { return USE; } {N9}/{N9}*[,.]? { yylval.number = ndigit(yyleng); return picset(NINES); } P+/[,.]?\r?\n { yylval.number = yyleng; return picset(PIC_P); } + 1{1,31}/({COUNT}|[(]{NAME}[)]) { + yy_push_state(picture_count); + yylval.string = xstrdup(yytext); return picset(ONES); } + 1{1,31} { yylval.string = xstrdup(yytext); return picset(ONES); } + {ALNUM}/{COUNT}({ALNUM}{COUNT}?)+ { yy_push_state(picture_count); yylval.string = xstrdup(yytext); return picset(ALNUM); } @@ -1613,15 +1623,17 @@ USE({SPC}FOR)? { return USE; } *--p = '\0'; } - int token = keyword_tok(yylval.string); - if( token ) return token; + int token; + if( 0 != (token = binary_integer_usage(yylval.string)) )return token; + if( 0 != (token = keyword_tok(yylval.string)) ) return token; if( is_integer_token() ) return numstr_of(yylval.string); return typed_name(yylval.string); } {NAME}/{OSPC}{DOTSEP} { assert(YY_START == procedure_div); - int token = keyword_tok(yytext); - if( token ) return token; + int token; + if( 0 != (token = binary_integer_usage(yytext)) ) return token; + if( 0 != (token = keyword_tok(yytext)) ) return token; if( is_integer_token() ) return numstr_of(yytext); ydflval.string = yylval.string = xstrdup(yytext); @@ -2468,6 +2480,7 @@ BASIS { yy_push_state(basis); return BASIS; } if( YY_START == quoted1 || YY_START == quoted2 ) { error_msg(yylloc, "syntax error: unterminated string '%s'", tmpstring); + return NO_CONDITION; cbl_internal_error(""); } yypop_buffer_state(); diff --git a/gcc/cobol/scan_ante.h b/gcc/cobol/scan_ante.h index 784c9b0..c8c93ed 100644 --- a/gcc/cobol/scan_ante.h +++ b/gcc/cobol/scan_ante.h @@ -498,6 +498,10 @@ update_location_col( const char str[], int correction = 0) { result = YY_NULL; \ } +#define bcomputable(T, C) \ + yylval.computational.type=T, \ + yylval.computational.capacity=C, \ + yylval.computational.signable=true, BINARY_INTEGER #define scomputable(T, C) \ yylval.computational.type=T, \ yylval.computational.capacity=C, \ @@ -511,6 +515,99 @@ static char *tmpstring = NULL; #define PROGRAM current_program_index() +// map of alias => canonical +static std::map <std::string, std::string> keyword_aliases; + +const std::string& +keyword_alias_add( const std::string& keyword, const std::string& alias ) { + auto p = keyword_aliases.find(alias); + if( p != keyword_aliases.end() ) return p->second; // error: do not overwrite + return keyword_aliases[alias] = keyword; +} + +/* + * Because numeric USAGE types don't have distinct tokens and may have aliases, + * we keep a table of their canonical names, which we use if we encounter an + * alias. + */ +struct bint_t { + int token; + cbl_field_type_t type; + uint32_t capacity; + bool signable; +}; +static const std::map <std::string, bint_t > binary_integers { + { "COMP-X", { COMPUTATIONAL, FldNumericBin5, 0xFF, false } }, + { "COMP-6", { COMPUTATIONAL, FldPacked, 0, false } }, + { "COMP-5", { COMPUTATIONAL, FldNumericBin5, 0, false } }, + { "COMP-4", { COMPUTATIONAL, FldNumericBinary, 0, true } }, + { "COMP-2", { COMPUTATIONAL, FldFloat, 8, false } }, + { "COMP-1", { COMPUTATIONAL, FldFloat, 4, false } }, + { "COMP", { COMPUTATIONAL, FldNumericBinary, 0, false } }, + { "COMPUTATIONAL-X", { COMPUTATIONAL, FldNumericBin5, 0xFF, false } }, + { "COMPUTATIONAL-6", { COMPUTATIONAL, FldPacked, 0, false } }, + { "COMPUTATIONAL-5", { COMPUTATIONAL, FldNumericBin5, 0, false } }, + { "COMPUTATIONAL-4", { COMPUTATIONAL, FldNumericBinary, 0, true } }, + { "COMPUTATIONAL-2", { COMPUTATIONAL, FldFloat, 8, false } }, + { "COMPUTATIONAL-1", { COMPUTATIONAL, FldFloat, 4, false } }, + { "COMPUTATIONAL", { COMPUTATIONAL, FldNumericBinary, 0, false } }, + { "BINARY", { BINARY_INTEGER, FldNumericBinary, 0, true } }, + { "BINARY-CHAR", { BINARY_INTEGER, FldNumericBin5, 1, true } }, + { "BINARY-SHORT", { BINARY_INTEGER, FldNumericBin5, 2, true } }, + { "BINARY-LONG", { BINARY_INTEGER, FldNumericBin5, 4, true } }, + { "BINARY-DOUBLE", { BINARY_INTEGER, FldNumericBin5, 8, true } }, + { "BINARY-LONG-LONG", { BINARY_INTEGER, FldNumericBin5, 8, true } }, + { "FLOAT-BINARY-32", { COMPUTATIONAL, FldFloat, 4, false } }, + { "FLOAT-BINARY-64", { COMPUTATIONAL, FldFloat, 8, false } }, + { "FLOAT-BINARY-128", { COMPUTATIONAL, FldFloat, 16, false } }, + { "FLOAT-EXTENDED", { COMPUTATIONAL, FldFloat, 16, false } }, + { "FLOAT-LONG", { COMPUTATIONAL, FldFloat, 8, false } }, + { "FLOAT-SHORT", { COMPUTATIONAL, FldFloat, 4, false } }, +}; + +static int +binary_integer_usage( const char name[]) { + cbl_name_t uname = {}; + std::transform(name, name + strlen(name), uname, ftoupper); + + dbgmsg("%s:%d: checking %s in %zu keyword_aliases", + __func__, __LINE__, uname, keyword_aliases.size() ); + + std::string key = uname; + auto alias = keyword_aliases.find(key); + if( alias != keyword_aliases.end() ) key = alias->second; + + auto p = binary_integers.find(key); + if( p == binary_integers.end() ) return 0; + + yylval.computational.type = p->second.type; + yylval.computational.capacity = p->second.capacity; + yylval.computational.signable = p->second.signable; + dbgmsg("%s:%d: %s has type %d", __func__, __LINE__, + uname, p->second.type ); + return p->second.token; +} + +int +binary_integer_usage_of( const char name[] ) { + cbl_name_t uname = {}; + std::transform(name, name + strlen(name), uname, ftoupper); + + auto p = binary_integers.find(uname); + if( p != binary_integers.end() ) { + int token = p->second.token; + switch( token ) { + case COMPUTATIONAL: + case BINARY_INTEGER: + return token; + default: + gcc_unreachable(); + assert(false); + } + } + return 0; +} + static uint32_t level_of( const char input[] ) { unsigned int output = 0; diff --git a/gcc/cobol/scan_post.h b/gcc/cobol/scan_post.h index dabb168..85feac8 100644 --- a/gcc/cobol/scan_post.h +++ b/gcc/cobol/scan_post.h @@ -33,13 +33,15 @@ start_condition_str( int sc ) { const char *state = "???"; switch(sc) { case INITIAL: state = "INITIAL"; break; + case addr_of: state = "addr_of"; break; case author_state: state = "author_state"; break; case basis: state = "basis"; break; case bool_state: state = "bool_state"; break; case cdf_state: state = "cdf_state"; break; case classify: state = "classify"; break; - case copy_state: state = "copy_state"; break; + case cobol_words: state = "cobol_words"; break; case comment_entries: state = "comment_entries"; break; + case copy_state: state = "copy_state"; break; case date_state: state = "date_state"; break; case datetime_fmt: state = "datetime_fmt"; break; case dot_state: state = "dot_state"; break; @@ -62,8 +64,8 @@ start_condition_str( int sc ) { case quoted2: state = "quoted2"; break; case quoteq: state = "quoteq"; break; case raising: state = "raising"; break; - case subscripts: state = "subscripts"; break; case sort_state: state = "sort_state"; break; + case subscripts: state = "subscripts"; break; } return state; } diff --git a/gcc/cobol/symbols.cc b/gcc/cobol/symbols.cc index 13e78ee..1d0acf90 100644 --- a/gcc/cobol/symbols.cc +++ b/gcc/cobol/symbols.cc @@ -2294,7 +2294,7 @@ symbol_table_init(void) { "FILLER", 0, {}, {1,1,0,0, " "}, NULL }, { 0, FldAlphanumeric, FldInvalid, signable_e | global_e, 0,0,2, nonarray, 0, "DEBUG-CONTENTS", 0, {}, {76,76,0,0, NULL}, NULL }, -}; + }; // debug registers assert(table.nelem + COUNT_OF(debug_registers) < table.capacity); diff --git a/gcc/cobol/symbols.h b/gcc/cobol/symbols.h index 50c5d48..e272907 100644 --- a/gcc/cobol/symbols.h +++ b/gcc/cobol/symbols.h @@ -348,9 +348,7 @@ struct cbl_field_data_t { cbl_field_data_t& valify() { assert(initial); - const size_t len = strlen(initial); - std::string input(len + 1, '\0'); // add a NUL - std::copy(initial, initial + len, input.begin()); + std::string input(initial); if( decimal_is_comma() ) { std::replace(input.begin(), input.end(), ',', '.'); } @@ -2211,6 +2209,10 @@ class name_queue_t : private std::queue<cbl_namelocs_t> }; +const std::string& keyword_alias_add( const std::string& keyword, + const std::string& alias ); +int binary_integer_usage_of( const char name[] ); + void tee_up_empty(); void tee_up_name( const YYLTYPE& loc, const char name[] ); cbl_namelist_t teed_up_names(); diff --git a/gcc/cobol/token_names.h b/gcc/cobol/token_names.h index d1e3b5d..682d68d 100644 --- a/gcc/cobol/token_names.h +++ b/gcc/cobol/token_names.h @@ -1,1373 +1,1377 @@ // generated by ./token_names.h.gen ../../build/gcc/cobol/parse.h -// Fri Mar 21 10:13:54 CET 2025 +// Thu May 8 18:53:33 EDT 2025 tokens = { - { "identification", IDENTIFICATION_DIV }, // 258 - { "environment", ENVIRONMENT_DIV }, // 259 - { "procedure", PROCEDURE_DIV }, // 260 - { "data", DATA_DIV }, // 261 - { "file", FILE_SECT }, // 262 - { "input-output", INPUT_OUTPUT_SECT }, // 263 - { "linkage", LINKAGE_SECT }, // 264 - { "local-storage", LOCAL_STORAGE_SECT }, // 265 - { "working-storage", WORKING_STORAGE_SECT }, // 266 - { "object-computer", OBJECT_COMPUTER }, // 267 - { "display-of", DISPLAY_OF }, // 268 - { "end-function", END_FUNCTION }, // 269 - { "end-program", END_PROGRAM }, // 270 - { "end-subprogram", END_SUBPROGRAM }, // 271 - { "justified", JUSTIFIED }, // 272 - { "returning", RETURNING }, // 273 - { "no-condition", NO_CONDITION }, // 274 - { "alnum", ALNUM }, // 275 - { "alphed", ALPHED }, // 276 - { "error", ERROR }, // 277 - { "exception", EXCEPTION }, // 278 - { "size-error", SIZE_ERROR }, // 279 - { "exception-name", EXCEPTION_NAME }, // 280 - { "level", LEVEL }, // 281 - { "level66", LEVEL66 }, // 282 - { "level78", LEVEL78 }, // 283 - { "level88", LEVEL88 }, // 284 - { "class-name", CLASS_NAME }, // 285 - { "name", NAME }, // 286 - { "name88", NAME88 }, // 287 - { "nume", NUME }, // 288 - { "numed", NUMED }, // 289 - { "numed-cr", NUMED_CR }, // 290 - { "numed-db", NUMED_DB }, // 291 - { "ninedot", NINEDOT }, // 292 - { "nines", NINES }, // 293 - { "ninev", NINEV }, // 294 - { "pic-p", PIC_P }, // 295 - { "spaces", SPACES }, // 296 - { "space", SPACES }, // 296 - { "literal", LITERAL }, // 297 - { "end", END }, // 298 - { "eop", EOP }, // 299 - { "filename", FILENAME }, // 300 - { "invalid", INVALID }, // 301 - { "number", NUMBER }, // 302 - { "negative", NEGATIVE }, // 303 - { "numstr", NUMSTR }, // 304 - { "overflow", OVERFLOW_kw }, // 305 - { "computational", COMPUTATIONAL }, // 306 - { "perform", PERFORM }, // 307 - { "backward", BACKWARD }, // 308 - { "positive", POSITIVE }, // 309 - { "pointer", POINTER }, // 310 - { "section", SECTION }, // 311 - { "standard-alphabet", STANDARD_ALPHABET }, // 312 - { "switch", SWITCH }, // 313 - { "upsi", UPSI }, // 314 - { "zero", ZERO }, // 315 - { "zeros", ZERO }, // 315 - { "zeroes", ZERO }, // 315 - { "sysin", SYSIN }, // 316 - { "sysipt", SYSIPT }, // 317 - { "sysout", SYSOUT }, // 318 - { "syslist", SYSLIST }, // 319 - { "syslst", SYSLST }, // 320 - { "syspunch", SYSPUNCH }, // 321 - { "syspch", SYSPCH }, // 322 - { "console", CONSOLE }, // 323 - { "c01", C01 }, // 324 - { "c02", C02 }, // 325 - { "c03", C03 }, // 326 - { "c04", C04 }, // 327 - { "c05", C05 }, // 328 - { "c06", C06 }, // 329 - { "c07", C07 }, // 330 - { "c08", C08 }, // 331 - { "c09", C09 }, // 332 - { "c10", C10 }, // 333 - { "c11", C11 }, // 334 - { "c12", C12 }, // 335 - { "csp", CSP }, // 336 - { "s01", S01 }, // 337 - { "s02", S02 }, // 338 - { "s03", S03 }, // 339 - { "s04", S04 }, // 340 - { "s05", S05 }, // 341 - { "afp-5a", AFP_5A }, // 342 - { "stdin", STDIN }, // 343 - { "stdout", STDOUT }, // 344 - { "stderr", STDERR }, // 345 - { "list", LIST }, // 346 - { "map", MAP }, // 347 - { "nolist", NOLIST }, // 348 - { "nomap", NOMAP }, // 349 - { "nosource", NOSOURCE }, // 350 - { "might-be", MIGHT_BE }, // 351 - { "function-udf", FUNCTION_UDF }, // 352 - { "function-udf-0", FUNCTION_UDF_0 }, // 353 - { "date-fmt", DATE_FMT }, // 354 - { "time-fmt", TIME_FMT }, // 355 - { "datetime-fmt", DATETIME_FMT }, // 356 - { "basis", BASIS }, // 357 - { "cbl", CBL }, // 358 - { "constant", CONSTANT }, // 359 - { "copy", COPY }, // 360 - { "defined", DEFINED }, // 361 - { "enter", ENTER }, // 362 - { "feature", FEATURE }, // 363 - { "insertt", INSERTT }, // 364 - { "lsub", LSUB }, // 365 - { "parameter", PARAMETER_kw }, // 366 - { "override", OVERRIDE }, // 367 - { "ready", READY }, // 368 - { "reset", RESET }, // 369 - { "rsub", RSUB }, // 370 - { "service-reload", SERVICE_RELOAD }, // 371 - { "star-cbl", STAR_CBL }, // 372 - { "subscript", SUBSCRIPT }, // 373 - { "suppress", SUPPRESS }, // 374 - { "title", TITLE }, // 375 - { "trace", TRACE }, // 376 - { "use", USE }, // 377 - { "cobol-words", COBOL_WORDS }, // 378 - { "equate", EQUATE }, // 379 - { "undefine", UNDEFINE }, // 380 - { "cdf-define", CDF_DEFINE }, // 381 - { "cdf-display", CDF_DISPLAY }, // 382 - { "cdf-if", CDF_IF }, // 383 - { "cdf-else", CDF_ELSE }, // 384 - { "cdf-end-if", CDF_END_IF }, // 385 - { "cdf-evaluate", CDF_EVALUATE }, // 386 - { "cdf-when", CDF_WHEN }, // 387 - { "cdf-end-evaluate", CDF_END_EVALUATE }, // 388 - { "call-cobol", CALL_COBOL }, // 389 - { "call-verbatim", CALL_VERBATIM }, // 390 - { "if", IF }, // 391 - { "then", THEN }, // 392 - { "else", ELSE }, // 393 - { "sentence", SENTENCE }, // 394 - { "accept", ACCEPT }, // 395 - { "add", ADD }, // 396 - { "alter", ALTER }, // 397 - { "call", CALL }, // 398 - { "cancel", CANCEL }, // 399 - { "close", CLOSE }, // 400 - { "compute", COMPUTE }, // 401 - { "continue", CONTINUE }, // 402 - { "delete", DELETE }, // 403 - { "display", DISPLAY }, // 404 - { "divide", DIVIDE }, // 405 - { "evaluate", EVALUATE }, // 406 - { "exit", EXIT }, // 407 - { "filler", FILLER_kw }, // 408 - { "goback", GOBACK }, // 409 - { "goto", GOTO }, // 410 - { "initialize", INITIALIZE }, // 411 - { "inspect", INSPECT }, // 412 - { "merge", MERGE }, // 413 - { "move", MOVE }, // 414 - { "multiply", MULTIPLY }, // 415 - { "open", OPEN }, // 416 - { "paragraph", PARAGRAPH }, // 417 - { "read", READ }, // 418 - { "release", RELEASE }, // 419 - { "return", RETURN }, // 420 - { "rewrite", REWRITE }, // 421 - { "search", SEARCH }, // 422 - { "set", SET }, // 423 - { "select", SELECT }, // 424 - { "sort", SORT }, // 425 - { "sort-merge", SORT_MERGE }, // 426 - { "string", STRING_kw }, // 427 - { "stop", STOP }, // 428 - { "subtract", SUBTRACT }, // 429 - { "start", START }, // 430 - { "unstring", UNSTRING }, // 431 - { "write", WRITE }, // 432 - { "when", WHEN }, // 433 - { "abs", ABS }, // 434 - { "access", ACCESS }, // 435 - { "acos", ACOS }, // 436 - { "actual", ACTUAL }, // 437 - { "advancing", ADVANCING }, // 438 - { "after", AFTER }, // 439 - { "all", ALL }, // 440 - { "allocate", ALLOCATE }, // 441 - { "alphabet", ALPHABET }, // 442 - { "alphabetic", ALPHABETIC }, // 443 - { "alphabetic-lower", ALPHABETIC_LOWER }, // 444 - { "alphabetic-upper", ALPHABETIC_UPPER }, // 445 - { "alphanumeric", ALPHANUMERIC }, // 446 - { "alphanumeric-edited", ALPHANUMERIC_EDITED }, // 447 - { "also", ALSO }, // 448 - { "alternate", ALTERNATE }, // 449 - { "annuity", ANNUITY }, // 450 - { "anum", ANUM }, // 451 - { "any", ANY }, // 452 - { "anycase", ANYCASE }, // 453 - { "apply", APPLY }, // 454 - { "are", ARE }, // 455 - { "area", AREA }, // 456 - { "areas", AREAS }, // 457 - { "as", AS }, // 458 - { "ascending", ASCENDING }, // 459 - { "activating", ACTIVATING }, // 460 - { "asin", ASIN }, // 461 - { "assign", ASSIGN }, // 462 - { "at", AT }, // 463 - { "atan", ATAN }, // 464 - { "based", BASED }, // 465 - { "baseconvert", BASECONVERT }, // 466 - { "before", BEFORE }, // 467 - { "binary", BINARY }, // 468 - { "bit", BIT }, // 469 - { "bit-of", BIT_OF }, // 470 - { "bit-to-char", BIT_TO_CHAR }, // 471 - { "blank", BLANK }, // 472 - { "block", BLOCK_kw }, // 473 - { "boolean-of-integer", BOOLEAN_OF_INTEGER }, // 474 - { "bottom", BOTTOM }, // 475 - { "by", BY }, // 476 - { "byte", BYTE }, // 477 - { "byte-length", BYTE_LENGTH }, // 478 - { "cf", CF }, // 479 - { "ch", CH }, // 480 - { "changed", CHANGED }, // 481 - { "char", CHAR }, // 482 - { "char-national", CHAR_NATIONAL }, // 483 - { "character", CHARACTER }, // 484 - { "characters", CHARACTERS }, // 485 - { "checking", CHECKING }, // 486 - { "class", CLASS }, // 487 - { "cobol", COBOL }, // 488 - { "code", CODE }, // 489 - { "code-set", CODESET }, // 490 - { "collating", COLLATING }, // 491 - { "column", COLUMN }, // 492 - { "combined-datetime", COMBINED_DATETIME }, // 493 - { "comma", COMMA }, // 494 - { "command-line", COMMAND_LINE }, // 495 - { "command-line-count", COMMAND_LINE_COUNT }, // 496 - { "commit", COMMIT }, // 497 - { "common", COMMON }, // 498 - { "concat", CONCAT }, // 499 - { "condition", CONDITION }, // 500 - { "configuration", CONFIGURATION_SECT }, // 501 - { "contains", CONTAINS }, // 502 - { "content", CONTENT }, // 503 - { "control", CONTROL }, // 504 - { "controls", CONTROLS }, // 505 - { "convert", CONVERT }, // 506 - { "converting", CONVERTING }, // 507 - { "corresponding", CORRESPONDING }, // 508 - { "cos", COS }, // 509 - { "count", COUNT }, // 510 - { "currency", CURRENCY }, // 511 - { "current", CURRENT }, // 512 - { "current-date", CURRENT_DATE }, // 513 - { "data", DATA }, // 514 - { "date", DATE }, // 515 - { "date-compiled", DATE_COMPILED }, // 516 - { "date-of-integer", DATE_OF_INTEGER }, // 517 - { "date-to-yyyymmdd", DATE_TO_YYYYMMDD }, // 518 - { "date-written", DATE_WRITTEN }, // 519 - { "day", DAY }, // 520 - { "day-of-integer", DAY_OF_INTEGER }, // 521 - { "day-of-week", DAY_OF_WEEK }, // 522 - { "day-to-yyyyddd", DAY_TO_YYYYDDD }, // 523 - { "dbcs", DBCS }, // 524 - { "de", DE }, // 525 - { "debugging", DEBUGGING }, // 526 - { "decimal-point", DECIMAL_POINT }, // 527 - { "declaratives", DECLARATIVES }, // 528 - { "default", DEFAULT }, // 529 - { "delimited", DELIMITED }, // 530 - { "delimiter", DELIMITER }, // 531 - { "depending", DEPENDING }, // 532 - { "descending", DESCENDING }, // 533 - { "detail", DETAIL }, // 534 - { "direct", DIRECT }, // 535 - { "direct-access", DIRECT_ACCESS }, // 536 - { "down", DOWN }, // 537 - { "duplicates", DUPLICATES }, // 538 - { "dynamic", DYNAMIC }, // 539 - { "e", E }, // 540 - { "ebcdic", EBCDIC }, // 541 - { "ec", EC }, // 542 - { "egcs", EGCS }, // 543 - { "entry", ENTRY }, // 544 - { "environment", ENVIRONMENT }, // 545 - { "equal", EQUAL }, // 546 - { "every", EVERY }, // 547 - { "examine", EXAMINE }, // 548 - { "exhibit", EXHIBIT }, // 549 - { "exp", EXP }, // 550 - { "exp10", EXP10 }, // 551 - { "extend", EXTEND }, // 552 - { "external", EXTERNAL }, // 553 - { "exception-file", EXCEPTION_FILE }, // 554 - { "exception-file-n", EXCEPTION_FILE_N }, // 555 - { "exception-location", EXCEPTION_LOCATION }, // 556 - { "exception-location-n", EXCEPTION_LOCATION_N }, // 557 - { "exception-statement", EXCEPTION_STATEMENT }, // 558 - { "exception-status", EXCEPTION_STATUS }, // 559 - { "factorial", FACTORIAL }, // 560 - { "false", FALSE_kw }, // 561 - { "fd", FD }, // 562 - { "file-control", FILE_CONTROL }, // 563 - { "file", FILE_KW }, // 564 - { "file-limit", FILE_LIMIT }, // 565 - { "final", FINAL }, // 566 - { "finally", FINALLY }, // 567 - { "find-string", FIND_STRING }, // 568 - { "first", FIRST }, // 569 - { "fixed", FIXED }, // 570 - { "footing", FOOTING }, // 571 - { "for", FOR }, // 572 - { "formatted-current-date", FORMATTED_CURRENT_DATE }, // 573 - { "formatted-date", FORMATTED_DATE }, // 574 - { "formatted-datetime", FORMATTED_DATETIME }, // 575 - { "formatted-time", FORMATTED_TIME }, // 576 - { "form-overflow", FORM_OVERFLOW }, // 577 - { "free", FREE }, // 578 - { "fraction-part", FRACTION_PART }, // 579 - { "from", FROM }, // 580 - { "function", FUNCTION }, // 581 - { "generate", GENERATE }, // 582 - { "giving", GIVING }, // 583 - { "global", GLOBAL }, // 584 - { "go", GO }, // 585 - { "group", GROUP }, // 586 - { "heading", HEADING }, // 587 - { "hex", HEX }, // 588 - { "hex-of", HEX_OF }, // 589 - { "hex-to-char", HEX_TO_CHAR }, // 590 - { "high-values", HIGH_VALUES }, // 591 - { "highest-algebraic", HIGHEST_ALGEBRAIC }, // 592 - { "hold", HOLD }, // 593 - { "ibm-360", IBM_360 }, // 594 - { "in", IN }, // 595 - { "include", INCLUDE }, // 596 - { "index", INDEX }, // 597 - { "indexed", INDEXED }, // 598 - { "indicate", INDICATE }, // 599 - { "initial", INITIAL_kw }, // 600 - { "initiate", INITIATE }, // 601 - { "input", INPUT }, // 602 - { "installation", INSTALLATION }, // 603 - { "interface", INTERFACE }, // 604 - { "integer", INTEGER }, // 605 - { "integer-of-boolean", INTEGER_OF_BOOLEAN }, // 606 - { "integer-of-date", INTEGER_OF_DATE }, // 607 - { "integer-of-day", INTEGER_OF_DAY }, // 608 - { "integer-of-formatted-date", INTEGER_OF_FORMATTED_DATE }, // 609 - { "integer-part", INTEGER_PART }, // 610 - { "into", INTO }, // 611 - { "intrinsic", INTRINSIC }, // 612 - { "invoke", INVOKE }, // 613 - { "i-o", IO }, // 614 - { "i-o-control", IO_CONTROL }, // 615 - { "is", IS }, // 616 - { "isnt", ISNT }, // 617 - { "kanji", KANJI }, // 618 - { "key", KEY }, // 619 - { "label", LABEL }, // 620 - { "last", LAST }, // 621 - { "leading", LEADING }, // 622 - { "left", LEFT }, // 623 - { "length", LENGTH }, // 624 - { "length-of", LENGTH_OF }, // 625 - { "limit", LIMIT }, // 626 - { "limits", LIMITS }, // 627 - { "line", LINE }, // 628 - { "lines", LINES }, // 629 - { "line-counter", LINE_COUNTER }, // 630 - { "linage", LINAGE }, // 631 - { "linkage", LINKAGE }, // 632 - { "locale", LOCALE }, // 633 - { "locale-compare", LOCALE_COMPARE }, // 634 - { "locale-date", LOCALE_DATE }, // 635 - { "locale-time", LOCALE_TIME }, // 636 - { "locale-time-from-seconds", LOCALE_TIME_FROM_SECONDS }, // 637 - { "local-storage", LOCAL_STORAGE }, // 638 - { "location", LOCATION }, // 639 - { "lock", LOCK }, // 640 - { "lock-on", LOCK_ON }, // 641 - { "log", LOG }, // 642 - { "log10", LOG10 }, // 643 - { "lower-case", LOWER_CASE }, // 644 - { "low-values", LOW_VALUES }, // 645 - { "lowest-algebraic", LOWEST_ALGEBRAIC }, // 646 - { "lparen", LPAREN }, // 647 - { "manual", MANUAL }, // 648 - { "maxx", MAXX }, // 649 - { "mean", MEAN }, // 650 - { "median", MEDIAN }, // 651 - { "midrange", MIDRANGE }, // 652 - { "minn", MINN }, // 653 - { "multiple", MULTIPLE }, // 654 - { "mod", MOD }, // 655 - { "mode", MODE }, // 656 - { "module-name", MODULE_NAME }, // 657 - { "named", NAMED }, // 658 - { "nat", NAT }, // 659 - { "national", NATIONAL }, // 660 - { "national-edited", NATIONAL_EDITED }, // 661 - { "national-of", NATIONAL_OF }, // 662 - { "native", NATIVE }, // 663 - { "nested", NESTED }, // 664 - { "next", NEXT }, // 665 - { "no", NO }, // 666 - { "note", NOTE }, // 667 - { "nulls", NULLS }, // 668 - { "null", NULLS }, // 668 - { "nullptr", NULLPTR }, // 669 - { "numeric", NUMERIC }, // 670 - { "numeric-edited", NUMERIC_EDITED }, // 671 - { "numval", NUMVAL }, // 672 - { "numval-c", NUMVAL_C }, // 673 - { "numval-f", NUMVAL_F }, // 674 - { "occurs", OCCURS }, // 675 - { "of", OF }, // 676 - { "off", OFF }, // 677 - { "omitted", OMITTED }, // 678 - { "on", ON }, // 679 - { "only", ONLY }, // 680 - { "optional", OPTIONAL }, // 681 - { "options", OPTIONS }, // 682 - { "ord", ORD }, // 683 - { "order", ORDER }, // 684 - { "ord-max", ORD_MAX }, // 685 - { "ord-min", ORD_MIN }, // 686 - { "organization", ORGANIZATION }, // 687 - { "other", OTHER }, // 688 - { "otherwise", OTHERWISE }, // 689 - { "output", OUTPUT }, // 690 - { "packed-decimal", PACKED_DECIMAL }, // 691 - { "padding", PADDING }, // 692 - { "page", PAGE }, // 693 - { "page-counter", PAGE_COUNTER }, // 694 - { "pf", PF }, // 695 - { "ph", PH }, // 696 - { "pi", PI }, // 697 - { "pic", PIC }, // 698 - { "picture", PICTURE }, // 699 - { "plus", PLUS }, // 700 - { "present-value", PRESENT_VALUE }, // 701 - { "print-switch", PRINT_SWITCH }, // 702 - { "procedure", PROCEDURE }, // 703 - { "procedures", PROCEDURES }, // 704 - { "proceed", PROCEED }, // 705 - { "process", PROCESS }, // 706 - { "program-id", PROGRAM_ID }, // 707 - { "program", PROGRAM_kw }, // 708 - { "property", PROPERTY }, // 709 - { "prototype", PROTOTYPE }, // 710 - { "pseudotext", PSEUDOTEXT }, // 711 - { "quotes", QUOTES }, // 712 - { "quote", QUOTES }, // 712 - { "random", RANDOM }, // 713 - { "random-seed", RANDOM_SEED }, // 714 - { "range", RANGE }, // 715 - { "raise", RAISE }, // 716 - { "raising", RAISING }, // 717 - { "rd", RD }, // 718 - { "record", RECORD }, // 719 - { "recording", RECORDING }, // 720 - { "records", RECORDS }, // 721 - { "recursive", RECURSIVE }, // 722 - { "redefines", REDEFINES }, // 723 - { "reel", REEL }, // 724 - { "reference", REFERENCE }, // 725 - { "relative", RELATIVE }, // 726 - { "rem", REM }, // 727 - { "remainder", REMAINDER }, // 728 - { "remarks", REMARKS }, // 729 - { "removal", REMOVAL }, // 730 - { "renames", RENAMES }, // 731 - { "replace", REPLACE }, // 732 - { "replacing", REPLACING }, // 733 - { "report", REPORT }, // 734 - { "reporting", REPORTING }, // 735 - { "reports", REPORTS }, // 736 - { "repository", REPOSITORY }, // 737 - { "rerun", RERUN }, // 738 - { "reserve", RESERVE }, // 739 - { "restricted", RESTRICTED }, // 740 - { "resume", RESUME }, // 741 - { "reverse", REVERSE }, // 742 - { "reversed", REVERSED }, // 743 - { "rewind", REWIND }, // 744 - { "rf", RF }, // 745 - { "rh", RH }, // 746 - { "right", RIGHT }, // 747 - { "rounded", ROUNDED }, // 748 - { "run", RUN }, // 749 - { "same", SAME }, // 750 - { "screen", SCREEN }, // 751 - { "sd", SD }, // 752 - { "seconds-from-formatted-time", SECONDS_FROM_FORMATTED_TIME }, // 753 - { "seconds-past-midnight", SECONDS_PAST_MIDNIGHT }, // 754 - { "security", SECURITY }, // 755 - { "separate", SEPARATE }, // 756 - { "sequence", SEQUENCE }, // 757 - { "sequential", SEQUENTIAL }, // 758 - { "sharing", SHARING }, // 759 - { "simple-exit", SIMPLE_EXIT }, // 760 - { "sign", SIGN }, // 761 - { "sin", SIN }, // 762 - { "size", SIZE }, // 763 - { "smallest-algebraic", SMALLEST_ALGEBRAIC }, // 764 - { "source", SOURCE }, // 765 - { "source-computer", SOURCE_COMPUTER }, // 766 - { "special-names", SPECIAL_NAMES }, // 767 - { "sqrt", SQRT }, // 768 - { "stack", STACK }, // 769 - { "standard", STANDARD }, // 770 - { "standard-1", STANDARD_1 }, // 771 - { "standard-deviation", STANDARD_DEVIATION }, // 772 - { "standard-compare", STANDARD_COMPARE }, // 773 - { "status", STATUS }, // 774 - { "strong", STRONG }, // 775 - { "substitute", SUBSTITUTE }, // 776 - { "sum", SUM }, // 777 - { "symbol", SYMBOL }, // 778 - { "symbolic", SYMBOLIC }, // 779 - { "synchronized", SYNCHRONIZED }, // 780 - { "tally", TALLY }, // 781 - { "tallying", TALLYING }, // 782 - { "tan", TAN }, // 783 - { "terminate", TERMINATE }, // 784 - { "test", TEST }, // 785 - { "test-date-yyyymmdd", TEST_DATE_YYYYMMDD }, // 786 - { "test-day-yyyyddd", TEST_DAY_YYYYDDD }, // 787 - { "test-formatted-datetime", TEST_FORMATTED_DATETIME }, // 788 - { "test-numval", TEST_NUMVAL }, // 789 - { "test-numval-c", TEST_NUMVAL_C }, // 790 - { "test-numval-f", TEST_NUMVAL_F }, // 791 - { "than", THAN }, // 792 - { "time", TIME }, // 793 - { "times", TIMES }, // 794 - { "to", TO }, // 795 - { "top", TOP }, // 796 - { "top-level", TOP_LEVEL }, // 797 - { "tracks", TRACKS }, // 798 - { "track-area", TRACK_AREA }, // 799 - { "trailing", TRAILING }, // 800 - { "transform", TRANSFORM }, // 801 - { "trim", TRIM }, // 802 - { "true", TRUE_kw }, // 803 - { "try", TRY }, // 804 - { "turn", TURN }, // 805 - { "type", TYPE }, // 806 - { "typedef", TYPEDEF }, // 807 - { "ulength", ULENGTH }, // 808 - { "unbounded", UNBOUNDED }, // 809 - { "unit", UNIT }, // 810 - { "units", UNITS }, // 811 - { "unit-record", UNIT_RECORD }, // 812 - { "until", UNTIL }, // 813 - { "up", UP }, // 814 - { "upon", UPON }, // 815 - { "upos", UPOS }, // 816 - { "upper-case", UPPER_CASE }, // 817 - { "usage", USAGE }, // 818 - { "using", USING }, // 819 - { "usubstr", USUBSTR }, // 820 - { "usupplementary", USUPPLEMENTARY }, // 821 - { "utility", UTILITY }, // 822 - { "uuid4", UUID4 }, // 823 - { "uvalid", UVALID }, // 824 - { "uwidth", UWIDTH }, // 825 - { "value", VALUE }, // 826 - { "variance", VARIANCE }, // 827 - { "varying", VARYING }, // 828 - { "volatile", VOLATILE }, // 829 - { "when-compiled", WHEN_COMPILED }, // 830 - { "with", WITH }, // 831 - { "working-storage", WORKING_STORAGE }, // 832 - { "xml", XML }, // 833 - { "xmlgenerate", XMLGENERATE }, // 834 - { "xmlparse", XMLPARSE }, // 835 - { "year-to-yyyy", YEAR_TO_YYYY }, // 836 - { "yyyyddd", YYYYDDD }, // 837 - { "yyyymmdd", YYYYMMDD }, // 838 - { "arithmetic", ARITHMETIC }, // 839 - { "attribute", ATTRIBUTE }, // 840 - { "auto", AUTO }, // 841 - { "automatic", AUTOMATIC }, // 842 - { "away-from-zero", AWAY_FROM_ZERO }, // 843 - { "background-color", BACKGROUND_COLOR }, // 844 - { "bell", BELL }, // 845 - { "binary-encoding", BINARY_ENCODING }, // 846 - { "blink", BLINK }, // 847 - { "capacity", CAPACITY }, // 848 - { "center", CENTER }, // 849 - { "classification", CLASSIFICATION }, // 850 - { "cycle", CYCLE }, // 851 - { "decimal-encoding", DECIMAL_ENCODING }, // 852 - { "entry-convention", ENTRY_CONVENTION }, // 853 - { "eol", EOL }, // 854 - { "eos", EOS }, // 855 - { "erase", ERASE }, // 856 - { "expands", EXPANDS }, // 857 - { "float-binary", FLOAT_BINARY }, // 858 - { "float-decimal", FLOAT_DECIMAL }, // 859 - { "foreground-color", FOREGROUND_COLOR }, // 860 - { "forever", FOREVER }, // 861 - { "full", FULL }, // 862 - { "highlight", HIGHLIGHT }, // 863 - { "high-order-left", HIGH_ORDER_LEFT }, // 864 - { "high-order-right", HIGH_ORDER_RIGHT }, // 865 - { "ignoring", IGNORING }, // 866 - { "implements", IMPLEMENTS }, // 867 - { "initialized", INITIALIZED }, // 868 - { "intermediate", INTERMEDIATE }, // 869 - { "lc-all", LC_ALL_kw }, // 870 - { "lc-collate", LC_COLLATE_kw }, // 871 - { "lc-ctype", LC_CTYPE_kw }, // 872 - { "lc-messages", LC_MESSAGES_kw }, // 873 - { "lc-monetary", LC_MONETARY_kw }, // 874 - { "lc-numeric", LC_NUMERIC_kw }, // 875 - { "lc-time", LC_TIME_kw }, // 876 - { "lowlight", LOWLIGHT }, // 877 - { "nearest-away-from-zero", NEAREST_AWAY_FROM_ZERO }, // 878 - { "nearest-even", NEAREST_EVEN }, // 879 - { "nearest-toward-zero", NEAREST_TOWARD_ZERO }, // 880 - { "none", NONE }, // 881 - { "normal", NORMAL }, // 882 - { "numbers", NUMBERS }, // 883 - { "prefixed", PREFIXED }, // 884 - { "previous", PREVIOUS }, // 885 - { "prohibited", PROHIBITED }, // 886 - { "relation", RELATION }, // 887 - { "required", REQUIRED }, // 888 - { "reverse-video", REVERSE_VIDEO }, // 889 - { "rounding", ROUNDING }, // 890 - { "seconds", SECONDS }, // 891 - { "secure", SECURE }, // 892 - { "short", SHORT }, // 893 - { "signed", SIGNED_kw }, // 894 - { "standard-binary", STANDARD_BINARY }, // 895 - { "standard-decimal", STANDARD_DECIMAL }, // 896 - { "statement", STATEMENT }, // 897 - { "step", STEP }, // 898 - { "structure", STRUCTURE }, // 899 - { "toward-greater", TOWARD_GREATER }, // 900 - { "toward-lesser", TOWARD_LESSER }, // 901 - { "truncation", TRUNCATION }, // 902 - { "ucs-4", UCS_4 }, // 903 - { "underline", UNDERLINE }, // 904 - { "unsigned", UNSIGNED_kw }, // 905 - { "utf-16", UTF_16 }, // 906 - { "utf-8", UTF_8 }, // 907 - { "address", ADDRESS }, // 908 - { "end-accept", END_ACCEPT }, // 909 - { "end-add", END_ADD }, // 910 - { "end-call", END_CALL }, // 911 - { "end-compute", END_COMPUTE }, // 912 - { "end-delete", END_DELETE }, // 913 - { "end-display", END_DISPLAY }, // 914 - { "end-divide", END_DIVIDE }, // 915 - { "end-evaluate", END_EVALUATE }, // 916 - { "end-multiply", END_MULTIPLY }, // 917 - { "end-perform", END_PERFORM }, // 918 - { "end-read", END_READ }, // 919 - { "end-return", END_RETURN }, // 920 - { "end-rewrite", END_REWRITE }, // 921 - { "end-search", END_SEARCH }, // 922 - { "end-start", END_START }, // 923 - { "end-string", END_STRING }, // 924 - { "end-subtract", END_SUBTRACT }, // 925 - { "end-unstring", END_UNSTRING }, // 926 - { "end-write", END_WRITE }, // 927 - { "end-if", END_IF }, // 928 - { "thru", THRU }, // 929 - { "through", THRU }, // 929 - { "or", OR }, // 930 - { "and", AND }, // 931 - { "not", NOT }, // 932 - { "ne", NE }, // 933 - { "le", LE }, // 934 - { "ge", GE }, // 935 - { "pow", POW }, // 936 - { "neg", NEG }, // 937 + { "identification", IDENTIFICATION_DIV }, // 258 + { "environment", ENVIRONMENT_DIV }, // 259 + { "procedure", PROCEDURE_DIV }, // 260 + { "data", DATA_DIV }, // 261 + { "file", FILE_SECT }, // 262 + { "input-output", INPUT_OUTPUT_SECT }, // 263 + { "linkage", LINKAGE_SECT }, // 264 + { "local-storage", LOCAL_STORAGE_SECT }, // 265 + { "working-storage", WORKING_STORAGE_SECT }, // 266 + { "object-computer", OBJECT_COMPUTER }, // 267 + { "display-of", DISPLAY_OF }, // 268 + { "end-function", END_FUNCTION }, // 269 + { "end-program", END_PROGRAM }, // 270 + { "end-subprogram", END_SUBPROGRAM }, // 271 + { "justified", JUSTIFIED }, // 272 + { "returning", RETURNING }, // 273 + { "no-condition", NO_CONDITION }, // 274 + { "alnum", ALNUM }, // 275 + { "alphed", ALPHED }, // 276 + { "error", ERROR }, // 277 + { "exception", EXCEPTION }, // 278 + { "size-error", SIZE_ERROR }, // 279 + { "exception-name", EXCEPTION_NAME }, // 280 + { "level", LEVEL }, // 281 + { "level66", LEVEL66 }, // 282 + { "level78", LEVEL78 }, // 283 + { "level88", LEVEL88 }, // 284 + { "class-name", CLASS_NAME }, // 285 + { "name", NAME }, // 286 + { "name88", NAME88 }, // 287 + { "nume", NUME }, // 288 + { "numed", NUMED }, // 289 + { "numed-cr", NUMED_CR }, // 290 + { "numed-db", NUMED_DB }, // 291 + { "ninedot", NINEDOT }, // 292 + { "nines", NINES }, // 293 + { "ninev", NINEV }, // 294 + { "pic-p", PIC_P }, // 295 + { "ones", ONES }, // 296 + { "spaces", SPACES }, // 297 + { "space", SPACES }, // 297 + { "literal", LITERAL }, // 298 + { "end", END }, // 299 + { "eop", EOP }, // 300 + { "filename", FILENAME }, // 301 + { "invalid", INVALID }, // 302 + { "number", NUMBER }, // 303 + { "negative", NEGATIVE }, // 304 + { "numstr", NUMSTR }, // 305 + { "overflow", OVERFLOW_kw }, // 306 + { "binary-integer", BINARY_INTEGER }, // 307 + { "computational", COMPUTATIONAL }, // 308 + { "perform", PERFORM }, // 309 + { "backward", BACKWARD }, // 310 + { "positive", POSITIVE }, // 311 + { "pointer", POINTER }, // 312 + { "section", SECTION }, // 313 + { "standard-alphabet", STANDARD_ALPHABET }, // 314 + { "switch", SWITCH }, // 315 + { "upsi", UPSI }, // 316 + { "zero", ZERO }, // 317 + { "zeros", ZERO }, // 317 + { "zeroes", ZERO }, // 317 + { "sysin", SYSIN }, // 318 + { "sysipt", SYSIPT }, // 319 + { "sysout", SYSOUT }, // 320 + { "syslist", SYSLIST }, // 321 + { "syslst", SYSLST }, // 322 + { "syspunch", SYSPUNCH }, // 323 + { "syspch", SYSPCH }, // 324 + { "console", CONSOLE }, // 325 + { "c01", C01 }, // 326 + { "c02", C02 }, // 327 + { "c03", C03 }, // 328 + { "c04", C04 }, // 329 + { "c05", C05 }, // 330 + { "c06", C06 }, // 331 + { "c07", C07 }, // 332 + { "c08", C08 }, // 333 + { "c09", C09 }, // 334 + { "c10", C10 }, // 335 + { "c11", C11 }, // 336 + { "c12", C12 }, // 337 + { "csp", CSP }, // 338 + { "s01", S01 }, // 339 + { "s02", S02 }, // 340 + { "s03", S03 }, // 341 + { "s04", S04 }, // 342 + { "s05", S05 }, // 343 + { "afp-5a", AFP_5A }, // 344 + { "stdin", STDIN }, // 345 + { "stdout", STDOUT }, // 346 + { "stderr", STDERR }, // 347 + { "list", LIST }, // 348 + { "map", MAP }, // 349 + { "nolist", NOLIST }, // 350 + { "nomap", NOMAP }, // 351 + { "nosource", NOSOURCE }, // 352 + { "might-be", MIGHT_BE }, // 353 + { "function-udf", FUNCTION_UDF }, // 354 + { "function-udf-0", FUNCTION_UDF_0 }, // 355 + { "date-fmt", DATE_FMT }, // 356 + { "time-fmt", TIME_FMT }, // 357 + { "datetime-fmt", DATETIME_FMT }, // 358 + { "basis", BASIS }, // 359 + { "cbl", CBL }, // 360 + { "constant", CONSTANT }, // 361 + { "copy", COPY }, // 362 + { "defined", DEFINED }, // 363 + { "enter", ENTER }, // 364 + { "feature", FEATURE }, // 365 + { "insertt", INSERTT }, // 366 + { "lsub", LSUB }, // 367 + { "parameter", PARAMETER_kw }, // 368 + { "override", OVERRIDE }, // 369 + { "ready", READY }, // 370 + { "reset", RESET }, // 371 + { "rsub", RSUB }, // 372 + { "service-reload", SERVICE_RELOAD }, // 373 + { "star-cbl", STAR_CBL }, // 374 + { "subscript", SUBSCRIPT }, // 375 + { "suppress", SUPPRESS }, // 376 + { "title", TITLE }, // 377 + { "trace", TRACE }, // 378 + { "use", USE }, // 379 + { "cobol-words", COBOL_WORDS }, // 380 + { "equate", EQUATE }, // 381 + { "undefine", UNDEFINE }, // 382 + { "cdf-define", CDF_DEFINE }, // 383 + { "cdf-display", CDF_DISPLAY }, // 384 + { "cdf-if", CDF_IF }, // 385 + { "cdf-else", CDF_ELSE }, // 386 + { "cdf-end-if", CDF_END_IF }, // 387 + { "cdf-evaluate", CDF_EVALUATE }, // 388 + { "cdf-when", CDF_WHEN }, // 389 + { "cdf-end-evaluate", CDF_END_EVALUATE }, // 390 + { "call-cobol", CALL_COBOL }, // 391 + { "call-verbatim", CALL_VERBATIM }, // 392 + { "if", IF }, // 393 + { "then", THEN }, // 394 + { "else", ELSE }, // 395 + { "sentence", SENTENCE }, // 396 + { "accept", ACCEPT }, // 397 + { "add", ADD }, // 398 + { "alter", ALTER }, // 399 + { "call", CALL }, // 400 + { "cancel", CANCEL }, // 401 + { "close", CLOSE }, // 402 + { "compute", COMPUTE }, // 403 + { "continue", CONTINUE }, // 404 + { "delete", DELETE }, // 405 + { "display", DISPLAY }, // 406 + { "divide", DIVIDE }, // 407 + { "evaluate", EVALUATE }, // 408 + { "exit", EXIT }, // 409 + { "filler", FILLER_kw }, // 410 + { "goback", GOBACK }, // 411 + { "goto", GOTO }, // 412 + { "initialize", INITIALIZE }, // 413 + { "inspect", INSPECT }, // 414 + { "merge", MERGE }, // 415 + { "move", MOVE }, // 416 + { "multiply", MULTIPLY }, // 417 + { "open", OPEN }, // 418 + { "paragraph", PARAGRAPH }, // 419 + { "read", READ }, // 420 + { "release", RELEASE }, // 421 + { "return", RETURN }, // 422 + { "rewrite", REWRITE }, // 423 + { "search", SEARCH }, // 424 + { "set", SET }, // 425 + { "select", SELECT }, // 426 + { "sort", SORT }, // 427 + { "sort-merge", SORT_MERGE }, // 428 + { "string", STRING_kw }, // 429 + { "stop", STOP }, // 430 + { "subtract", SUBTRACT }, // 431 + { "start", START }, // 432 + { "unstring", UNSTRING }, // 433 + { "write", WRITE }, // 434 + { "when", WHEN }, // 435 + { "abs", ABS }, // 436 + { "access", ACCESS }, // 437 + { "acos", ACOS }, // 438 + { "actual", ACTUAL }, // 439 + { "advancing", ADVANCING }, // 440 + { "after", AFTER }, // 441 + { "all", ALL }, // 442 + { "allocate", ALLOCATE }, // 443 + { "alphabet", ALPHABET }, // 444 + { "alphabetic", ALPHABETIC }, // 445 + { "alphabetic-lower", ALPHABETIC_LOWER }, // 446 + { "alphabetic-upper", ALPHABETIC_UPPER }, // 447 + { "alphanumeric", ALPHANUMERIC }, // 448 + { "alphanumeric-edited", ALPHANUMERIC_EDITED }, // 449 + { "also", ALSO }, // 450 + { "alternate", ALTERNATE }, // 451 + { "annuity", ANNUITY }, // 452 + { "anum", ANUM }, // 453 + { "any", ANY }, // 454 + { "anycase", ANYCASE }, // 455 + { "apply", APPLY }, // 456 + { "are", ARE }, // 457 + { "area", AREA }, // 458 + { "areas", AREAS }, // 459 + { "as", AS }, // 460 + { "ascending", ASCENDING }, // 461 + { "activating", ACTIVATING }, // 462 + { "asin", ASIN }, // 463 + { "assign", ASSIGN }, // 464 + { "at", AT }, // 465 + { "atan", ATAN }, // 466 + { "based", BASED }, // 467 + { "baseconvert", BASECONVERT }, // 468 + { "before", BEFORE }, // 469 + { "binary", BINARY }, // 470 + { "bit", BIT }, // 471 + { "bit-of", BIT_OF }, // 472 + { "bit-to-char", BIT_TO_CHAR }, // 473 + { "blank", BLANK }, // 474 + { "block", BLOCK_kw }, // 475 + { "boolean-of-integer", BOOLEAN_OF_INTEGER }, // 476 + { "bottom", BOTTOM }, // 477 + { "by", BY }, // 478 + { "byte", BYTE }, // 479 + { "byte-length", BYTE_LENGTH }, // 480 + { "cf", CF }, // 481 + { "ch", CH }, // 482 + { "changed", CHANGED }, // 483 + { "char", CHAR }, // 484 + { "char-national", CHAR_NATIONAL }, // 485 + { "character", CHARACTER }, // 486 + { "characters", CHARACTERS }, // 487 + { "checking", CHECKING }, // 488 + { "class", CLASS }, // 489 + { "cobol", COBOL }, // 490 + { "code", CODE }, // 491 + { "code-set", CODESET }, // 492 + { "collating", COLLATING }, // 493 + { "column", COLUMN }, // 494 + { "combined-datetime", COMBINED_DATETIME }, // 495 + { "comma", COMMA }, // 496 + { "command-line", COMMAND_LINE }, // 497 + { "command-line-count", COMMAND_LINE_COUNT }, // 498 + { "commit", COMMIT }, // 499 + { "common", COMMON }, // 500 + { "concat", CONCAT }, // 501 + { "condition", CONDITION }, // 502 + { "configuration", CONFIGURATION_SECT }, // 503 + { "contains", CONTAINS }, // 504 + { "content", CONTENT }, // 505 + { "control", CONTROL }, // 506 + { "controls", CONTROLS }, // 507 + { "convert", CONVERT }, // 508 + { "converting", CONVERTING }, // 509 + { "corresponding", CORRESPONDING }, // 510 + { "cos", COS }, // 511 + { "count", COUNT }, // 512 + { "currency", CURRENCY }, // 513 + { "current", CURRENT }, // 514 + { "current-date", CURRENT_DATE }, // 515 + { "data", DATA }, // 516 + { "date", DATE }, // 517 + { "date-compiled", DATE_COMPILED }, // 518 + { "date-of-integer", DATE_OF_INTEGER }, // 519 + { "date-to-yyyymmdd", DATE_TO_YYYYMMDD }, // 520 + { "date-written", DATE_WRITTEN }, // 521 + { "day", DAY }, // 522 + { "day-of-integer", DAY_OF_INTEGER }, // 523 + { "day-of-week", DAY_OF_WEEK }, // 524 + { "day-to-yyyyddd", DAY_TO_YYYYDDD }, // 525 + { "dbcs", DBCS }, // 526 + { "de", DE }, // 527 + { "debugging", DEBUGGING }, // 528 + { "decimal-point", DECIMAL_POINT }, // 529 + { "declaratives", DECLARATIVES }, // 530 + { "default", DEFAULT }, // 531 + { "delimited", DELIMITED }, // 532 + { "delimiter", DELIMITER }, // 533 + { "depending", DEPENDING }, // 534 + { "descending", DESCENDING }, // 535 + { "detail", DETAIL }, // 536 + { "direct", DIRECT }, // 537 + { "direct-access", DIRECT_ACCESS }, // 538 + { "down", DOWN }, // 539 + { "duplicates", DUPLICATES }, // 540 + { "dynamic", DYNAMIC }, // 541 + { "e", E }, // 542 + { "ebcdic", EBCDIC }, // 543 + { "ec", EC }, // 544 + { "egcs", EGCS }, // 545 + { "entry", ENTRY }, // 546 + { "environment", ENVIRONMENT }, // 547 + { "equal", EQUAL }, // 548 + { "every", EVERY }, // 549 + { "examine", EXAMINE }, // 550 + { "exhibit", EXHIBIT }, // 551 + { "exp", EXP }, // 552 + { "exp10", EXP10 }, // 553 + { "extend", EXTEND }, // 554 + { "external", EXTERNAL }, // 555 + { "exception-file", EXCEPTION_FILE }, // 556 + { "exception-file-n", EXCEPTION_FILE_N }, // 557 + { "exception-location", EXCEPTION_LOCATION }, // 558 + { "exception-location-n", EXCEPTION_LOCATION_N }, // 559 + { "exception-statement", EXCEPTION_STATEMENT }, // 560 + { "exception-status", EXCEPTION_STATUS }, // 561 + { "factorial", FACTORIAL }, // 562 + { "false", FALSE_kw }, // 563 + { "fd", FD }, // 564 + { "file-control", FILE_CONTROL }, // 565 + { "file", FILE_KW }, // 566 + { "file-limit", FILE_LIMIT }, // 567 + { "final", FINAL }, // 568 + { "finally", FINALLY }, // 569 + { "find-string", FIND_STRING }, // 570 + { "first", FIRST }, // 571 + { "fixed", FIXED }, // 572 + { "footing", FOOTING }, // 573 + { "for", FOR }, // 574 + { "formatted-current-date", FORMATTED_CURRENT_DATE }, // 575 + { "formatted-date", FORMATTED_DATE }, // 576 + { "formatted-datetime", FORMATTED_DATETIME }, // 577 + { "formatted-time", FORMATTED_TIME }, // 578 + { "form-overflow", FORM_OVERFLOW }, // 579 + { "free", FREE }, // 580 + { "fraction-part", FRACTION_PART }, // 581 + { "from", FROM }, // 582 + { "function", FUNCTION }, // 583 + { "generate", GENERATE }, // 584 + { "giving", GIVING }, // 585 + { "global", GLOBAL }, // 586 + { "go", GO }, // 587 + { "group", GROUP }, // 588 + { "heading", HEADING }, // 589 + { "hex", HEX }, // 590 + { "hex-of", HEX_OF }, // 591 + { "hex-to-char", HEX_TO_CHAR }, // 592 + { "high-values", HIGH_VALUES }, // 593 + { "highest-algebraic", HIGHEST_ALGEBRAIC }, // 594 + { "hold", HOLD }, // 595 + { "ibm-360", IBM_360 }, // 596 + { "in", IN }, // 597 + { "include", INCLUDE }, // 598 + { "index", INDEX }, // 599 + { "indexed", INDEXED }, // 600 + { "indicate", INDICATE }, // 601 + { "initial", INITIAL_kw }, // 602 + { "initiate", INITIATE }, // 603 + { "input", INPUT }, // 604 + { "installation", INSTALLATION }, // 605 + { "interface", INTERFACE }, // 606 + { "integer", INTEGER }, // 607 + { "integer-of-boolean", INTEGER_OF_BOOLEAN }, // 608 + { "integer-of-date", INTEGER_OF_DATE }, // 609 + { "integer-of-day", INTEGER_OF_DAY }, // 610 + { "integer-of-formatted-date", INTEGER_OF_FORMATTED_DATE }, // 611 + { "integer-part", INTEGER_PART }, // 612 + { "into", INTO }, // 613 + { "intrinsic", INTRINSIC }, // 614 + { "invoke", INVOKE }, // 615 + { "i-o", IO }, // 616 + { "i-o-control", IO_CONTROL }, // 617 + { "is", IS }, // 618 + { "isnt", ISNT }, // 619 + { "kanji", KANJI }, // 620 + { "key", KEY }, // 621 + { "label", LABEL }, // 622 + { "last", LAST }, // 623 + { "leading", LEADING }, // 624 + { "left", LEFT }, // 625 + { "length", LENGTH }, // 626 + { "length-of", LENGTH_OF }, // 627 + { "limit", LIMIT }, // 628 + { "limits", LIMITS }, // 629 + { "line", LINE }, // 630 + { "lines", LINES }, // 631 + { "line-counter", LINE_COUNTER }, // 632 + { "linage", LINAGE }, // 633 + { "linkage", LINKAGE }, // 634 + { "locale", LOCALE }, // 635 + { "locale-compare", LOCALE_COMPARE }, // 636 + { "locale-date", LOCALE_DATE }, // 637 + { "locale-time", LOCALE_TIME }, // 638 + { "locale-time-from-seconds", LOCALE_TIME_FROM_SECONDS }, // 639 + { "local-storage", LOCAL_STORAGE }, // 640 + { "location", LOCATION }, // 641 + { "lock", LOCK }, // 642 + { "lock-on", LOCK_ON }, // 643 + { "log", LOG }, // 644 + { "log10", LOG10 }, // 645 + { "lower-case", LOWER_CASE }, // 646 + { "low-values", LOW_VALUES }, // 647 + { "lowest-algebraic", LOWEST_ALGEBRAIC }, // 648 + { "lparen", LPAREN }, // 649 + { "manual", MANUAL }, // 650 + { "maxx", MAXX }, // 651 + { "mean", MEAN }, // 652 + { "median", MEDIAN }, // 653 + { "midrange", MIDRANGE }, // 654 + { "minn", MINN }, // 655 + { "multiple", MULTIPLE }, // 656 + { "mod", MOD }, // 657 + { "mode", MODE }, // 658 + { "module-name", MODULE_NAME }, // 659 + { "named", NAMED }, // 660 + { "nat", NAT }, // 661 + { "national", NATIONAL }, // 662 + { "national-edited", NATIONAL_EDITED }, // 663 + { "national-of", NATIONAL_OF }, // 664 + { "native", NATIVE }, // 665 + { "nested", NESTED }, // 666 + { "next", NEXT }, // 667 + { "no", NO }, // 668 + { "note", NOTE }, // 669 + { "nulls", NULLS }, // 670 + { "null", NULLS }, // 670 + { "nullptr", NULLPTR }, // 671 + { "numeric", NUMERIC }, // 672 + { "numeric-edited", NUMERIC_EDITED }, // 673 + { "numval", NUMVAL }, // 674 + { "numval-c", NUMVAL_C }, // 675 + { "numval-f", NUMVAL_F }, // 676 + { "occurs", OCCURS }, // 677 + { "of", OF }, // 678 + { "off", OFF }, // 679 + { "omitted", OMITTED }, // 680 + { "on", ON }, // 681 + { "only", ONLY }, // 682 + { "optional", OPTIONAL }, // 683 + { "options", OPTIONS }, // 684 + { "ord", ORD }, // 685 + { "order", ORDER }, // 686 + { "ord-max", ORD_MAX }, // 687 + { "ord-min", ORD_MIN }, // 688 + { "organization", ORGANIZATION }, // 689 + { "other", OTHER }, // 690 + { "otherwise", OTHERWISE }, // 691 + { "output", OUTPUT }, // 692 + { "packed-decimal", PACKED_DECIMAL }, // 693 + { "padding", PADDING }, // 694 + { "page", PAGE }, // 695 + { "page-counter", PAGE_COUNTER }, // 696 + { "pf", PF }, // 697 + { "ph", PH }, // 698 + { "pi", PI }, // 699 + { "pic", PIC }, // 700 + { "picture", PICTURE }, // 701 + { "plus", PLUS }, // 702 + { "present-value", PRESENT_VALUE }, // 703 + { "print-switch", PRINT_SWITCH }, // 704 + { "procedure", PROCEDURE }, // 705 + { "procedures", PROCEDURES }, // 706 + { "proceed", PROCEED }, // 707 + { "process", PROCESS }, // 708 + { "program-id", PROGRAM_ID }, // 709 + { "program", PROGRAM_kw }, // 710 + { "property", PROPERTY }, // 711 + { "prototype", PROTOTYPE }, // 712 + { "pseudotext", PSEUDOTEXT }, // 713 + { "quotes", QUOTES }, // 714 + { "quote", QUOTES }, // 714 + { "random", RANDOM }, // 715 + { "random-seed", RANDOM_SEED }, // 716 + { "range", RANGE }, // 717 + { "raise", RAISE }, // 718 + { "raising", RAISING }, // 719 + { "rd", RD }, // 720 + { "record", RECORD }, // 721 + { "recording", RECORDING }, // 722 + { "records", RECORDS }, // 723 + { "recursive", RECURSIVE }, // 724 + { "redefines", REDEFINES }, // 725 + { "reel", REEL }, // 726 + { "reference", REFERENCE }, // 727 + { "relative", RELATIVE }, // 728 + { "rem", REM }, // 729 + { "remainder", REMAINDER }, // 730 + { "remarks", REMARKS }, // 731 + { "removal", REMOVAL }, // 732 + { "renames", RENAMES }, // 733 + { "replace", REPLACE }, // 734 + { "replacing", REPLACING }, // 735 + { "report", REPORT }, // 736 + { "reporting", REPORTING }, // 737 + { "reports", REPORTS }, // 738 + { "repository", REPOSITORY }, // 739 + { "rerun", RERUN }, // 740 + { "reserve", RESERVE }, // 741 + { "restricted", RESTRICTED }, // 742 + { "resume", RESUME }, // 743 + { "reverse", REVERSE }, // 744 + { "reversed", REVERSED }, // 745 + { "rewind", REWIND }, // 746 + { "rf", RF }, // 747 + { "rh", RH }, // 748 + { "right", RIGHT }, // 749 + { "rounded", ROUNDED }, // 750 + { "run", RUN }, // 751 + { "same", SAME }, // 752 + { "screen", SCREEN }, // 753 + { "sd", SD }, // 754 + { "seconds-from-formatted-time", SECONDS_FROM_FORMATTED_TIME }, // 755 + { "seconds-past-midnight", SECONDS_PAST_MIDNIGHT }, // 756 + { "security", SECURITY }, // 757 + { "separate", SEPARATE }, // 758 + { "sequence", SEQUENCE }, // 759 + { "sequential", SEQUENTIAL }, // 760 + { "sharing", SHARING }, // 761 + { "simple-exit", SIMPLE_EXIT }, // 762 + { "sign", SIGN }, // 763 + { "sin", SIN }, // 764 + { "size", SIZE }, // 765 + { "smallest-algebraic", SMALLEST_ALGEBRAIC }, // 766 + { "source", SOURCE }, // 767 + { "source-computer", SOURCE_COMPUTER }, // 768 + { "special-names", SPECIAL_NAMES }, // 769 + { "sqrt", SQRT }, // 770 + { "stack", STACK }, // 771 + { "standard", STANDARD }, // 772 + { "standard-1", STANDARD_1 }, // 773 + { "standard-deviation", STANDARD_DEVIATION }, // 774 + { "standard-compare", STANDARD_COMPARE }, // 775 + { "status", STATUS }, // 776 + { "strong", STRONG }, // 777 + { "substitute", SUBSTITUTE }, // 778 + { "sum", SUM }, // 779 + { "symbol", SYMBOL }, // 780 + { "symbolic", SYMBOLIC }, // 781 + { "synchronized", SYNCHRONIZED }, // 782 + { "tally", TALLY }, // 783 + { "tallying", TALLYING }, // 784 + { "tan", TAN }, // 785 + { "terminate", TERMINATE }, // 786 + { "test", TEST }, // 787 + { "test-date-yyyymmdd", TEST_DATE_YYYYMMDD }, // 788 + { "test-day-yyyyddd", TEST_DAY_YYYYDDD }, // 789 + { "test-formatted-datetime", TEST_FORMATTED_DATETIME }, // 790 + { "test-numval", TEST_NUMVAL }, // 791 + { "test-numval-c", TEST_NUMVAL_C }, // 792 + { "test-numval-f", TEST_NUMVAL_F }, // 793 + { "than", THAN }, // 794 + { "time", TIME }, // 795 + { "times", TIMES }, // 796 + { "to", TO }, // 797 + { "top", TOP }, // 798 + { "top-level", TOP_LEVEL }, // 799 + { "tracks", TRACKS }, // 800 + { "track-area", TRACK_AREA }, // 801 + { "trailing", TRAILING }, // 802 + { "transform", TRANSFORM }, // 803 + { "trim", TRIM }, // 804 + { "true", TRUE_kw }, // 805 + { "try", TRY }, // 806 + { "turn", TURN }, // 807 + { "type", TYPE }, // 808 + { "typedef", TYPEDEF }, // 809 + { "ulength", ULENGTH }, // 810 + { "unbounded", UNBOUNDED }, // 811 + { "unit", UNIT }, // 812 + { "units", UNITS }, // 813 + { "unit-record", UNIT_RECORD }, // 814 + { "until", UNTIL }, // 815 + { "up", UP }, // 816 + { "upon", UPON }, // 817 + { "upos", UPOS }, // 818 + { "upper-case", UPPER_CASE }, // 819 + { "usage", USAGE }, // 820 + { "using", USING }, // 821 + { "usubstr", USUBSTR }, // 822 + { "usupplementary", USUPPLEMENTARY }, // 823 + { "utility", UTILITY }, // 824 + { "uuid4", UUID4 }, // 825 + { "uvalid", UVALID }, // 826 + { "uwidth", UWIDTH }, // 827 + { "value", VALUE }, // 828 + { "variance", VARIANCE }, // 829 + { "varying", VARYING }, // 830 + { "volatile", VOLATILE }, // 831 + { "when-compiled", WHEN_COMPILED }, // 832 + { "with", WITH }, // 833 + { "working-storage", WORKING_STORAGE }, // 834 + { "xml", XML }, // 835 + { "xmlgenerate", XMLGENERATE }, // 836 + { "xmlparse", XMLPARSE }, // 837 + { "year-to-yyyy", YEAR_TO_YYYY }, // 838 + { "yyyyddd", YYYYDDD }, // 839 + { "yyyymmdd", YYYYMMDD }, // 840 + { "arithmetic", ARITHMETIC }, // 841 + { "attribute", ATTRIBUTE }, // 842 + { "auto", AUTO }, // 843 + { "automatic", AUTOMATIC }, // 844 + { "away-from-zero", AWAY_FROM_ZERO }, // 845 + { "background-color", BACKGROUND_COLOR }, // 846 + { "bell", BELL }, // 847 + { "binary-encoding", BINARY_ENCODING }, // 848 + { "blink", BLINK }, // 849 + { "capacity", CAPACITY }, // 850 + { "center", CENTER }, // 851 + { "classification", CLASSIFICATION }, // 852 + { "cycle", CYCLE }, // 853 + { "decimal-encoding", DECIMAL_ENCODING }, // 854 + { "entry-convention", ENTRY_CONVENTION }, // 855 + { "eol", EOL }, // 856 + { "eos", EOS }, // 857 + { "erase", ERASE }, // 858 + { "expands", EXPANDS }, // 859 + { "float-binary", FLOAT_BINARY }, // 860 + { "float-decimal", FLOAT_DECIMAL }, // 861 + { "foreground-color", FOREGROUND_COLOR }, // 862 + { "forever", FOREVER }, // 863 + { "full", FULL }, // 864 + { "highlight", HIGHLIGHT }, // 865 + { "high-order-left", HIGH_ORDER_LEFT }, // 866 + { "high-order-right", HIGH_ORDER_RIGHT }, // 867 + { "ignoring", IGNORING }, // 868 + { "implements", IMPLEMENTS }, // 869 + { "initialized", INITIALIZED }, // 870 + { "intermediate", INTERMEDIATE }, // 871 + { "lc-all", LC_ALL_kw }, // 872 + { "lc-collate", LC_COLLATE_kw }, // 873 + { "lc-ctype", LC_CTYPE_kw }, // 874 + { "lc-messages", LC_MESSAGES_kw }, // 875 + { "lc-monetary", LC_MONETARY_kw }, // 876 + { "lc-numeric", LC_NUMERIC_kw }, // 877 + { "lc-time", LC_TIME_kw }, // 878 + { "lowlight", LOWLIGHT }, // 879 + { "nearest-away-from-zero", NEAREST_AWAY_FROM_ZERO }, // 880 + { "nearest-even", NEAREST_EVEN }, // 881 + { "nearest-toward-zero", NEAREST_TOWARD_ZERO }, // 882 + { "none", NONE }, // 883 + { "normal", NORMAL }, // 884 + { "numbers", NUMBERS }, // 885 + { "prefixed", PREFIXED }, // 886 + { "previous", PREVIOUS }, // 887 + { "prohibited", PROHIBITED }, // 888 + { "relation", RELATION }, // 889 + { "required", REQUIRED }, // 890 + { "reverse-video", REVERSE_VIDEO }, // 891 + { "rounding", ROUNDING }, // 892 + { "seconds", SECONDS }, // 893 + { "secure", SECURE }, // 894 + { "short", SHORT }, // 895 + { "signed", SIGNED_kw }, // 896 + { "standard-binary", STANDARD_BINARY }, // 897 + { "standard-decimal", STANDARD_DECIMAL }, // 898 + { "statement", STATEMENT }, // 899 + { "step", STEP }, // 900 + { "structure", STRUCTURE }, // 901 + { "toward-greater", TOWARD_GREATER }, // 902 + { "toward-lesser", TOWARD_LESSER }, // 903 + { "truncation", TRUNCATION }, // 904 + { "ucs-4", UCS_4 }, // 905 + { "underline", UNDERLINE }, // 906 + { "unsigned", UNSIGNED_kw }, // 907 + { "utf-16", UTF_16 }, // 908 + { "utf-8", UTF_8 }, // 909 + { "address", ADDRESS }, // 910 + { "end-accept", END_ACCEPT }, // 911 + { "end-add", END_ADD }, // 912 + { "end-call", END_CALL }, // 913 + { "end-compute", END_COMPUTE }, // 914 + { "end-delete", END_DELETE }, // 915 + { "end-display", END_DISPLAY }, // 916 + { "end-divide", END_DIVIDE }, // 917 + { "end-evaluate", END_EVALUATE }, // 918 + { "end-multiply", END_MULTIPLY }, // 919 + { "end-perform", END_PERFORM }, // 920 + { "end-read", END_READ }, // 921 + { "end-return", END_RETURN }, // 922 + { "end-rewrite", END_REWRITE }, // 923 + { "end-search", END_SEARCH }, // 924 + { "end-start", END_START }, // 925 + { "end-string", END_STRING }, // 926 + { "end-subtract", END_SUBTRACT }, // 927 + { "end-unstring", END_UNSTRING }, // 928 + { "end-write", END_WRITE }, // 929 + { "end-if", END_IF }, // 930 + { "thru", THRU }, // 931 + { "through", THRU }, // 931 + { "or", OR }, // 932 + { "and", AND }, // 933 + { "not", NOT }, // 934 + { "ne", NE }, // 935 + { "le", LE }, // 936 + { "ge", GE }, // 937 + { "pow", POW }, // 938 + { "neg", NEG }, // 939 }; token_names = { - "IDENTIFICATION", // 0 (258) - "ENVIRONMENT", // 1 (259) - "PROCEDURE", // 2 (260) - "DATA", // 3 (261) - "FILE", // 4 (262) - "INPUT-OUTPUT", // 5 (263) - "LINKAGE", // 6 (264) - "LOCAL-STORAGE", // 7 (265) - "WORKING-STORAGE", // 8 (266) - "OBJECT-COMPUTER", // 9 (267) - "DISPLAY-OF", // 10 (268) - "END-FUNCTION", // 11 (269) - "END-PROGRAM", // 12 (270) - "END-SUBPROGRAM", // 13 (271) - "JUSTIFIED", // 14 (272) - "RETURNING", // 15 (273) - "NO-CONDITION", // 16 (274) - "ALNUM", // 17 (275) - "ALPHED", // 18 (276) - "ERROR", // 19 (277) - "EXCEPTION", // 20 (278) - "SIZE-ERROR", // 21 (279) - "EXCEPTION-NAME", // 22 (280) - "LEVEL", // 23 (281) - "LEVEL66", // 24 (282) - "LEVEL78", // 25 (283) - "LEVEL88", // 26 (284) - "CLASS-NAME", // 27 (285) - "NAME", // 28 (286) - "NAME88", // 29 (287) - "NUME", // 30 (288) - "NUMED", // 31 (289) - "NUMED-CR", // 32 (290) - "NUMED-DB", // 33 (291) - "NINEDOT", // 34 (292) - "NINES", // 35 (293) - "NINEV", // 36 (294) - "PIC-P", // 37 (295) - "SPACES", // 38 (296) - "LITERAL", // 39 (297) - "END", // 40 (298) - "EOP", // 41 (299) - "FILENAME", // 42 (300) - "INVALID", // 43 (301) - "NUMBER", // 44 (302) - "NEGATIVE", // 45 (303) - "NUMSTR", // 46 (304) - "OVERFLOW", // 47 (305) - "COMPUTATIONAL", // 48 (306) - "PERFORM", // 49 (307) - "BACKWARD", // 50 (308) - "POSITIVE", // 51 (309) - "POINTER", // 52 (310) - "SECTION", // 53 (311) - "STANDARD-ALPHABET", // 54 (312) - "SWITCH", // 55 (313) - "UPSI", // 56 (314) - "ZERO", // 57 (315) - "SYSIN", // 58 (316) - "SYSIPT", // 59 (317) - "SYSOUT", // 60 (318) - "SYSLIST", // 61 (319) - "SYSLST", // 62 (320) - "SYSPUNCH", // 63 (321) - "SYSPCH", // 64 (322) - "CONSOLE", // 65 (323) - "C01", // 66 (324) - "C02", // 67 (325) - "C03", // 68 (326) - "C04", // 69 (327) - "C05", // 70 (328) - "C06", // 71 (329) - "C07", // 72 (330) - "C08", // 73 (331) - "C09", // 74 (332) - "C10", // 75 (333) - "C11", // 76 (334) - "C12", // 77 (335) - "CSP", // 78 (336) - "S01", // 79 (337) - "S02", // 80 (338) - "S03", // 81 (339) - "S04", // 82 (340) - "S05", // 83 (341) - "AFP-5A", // 84 (342) - "STDIN", // 85 (343) - "STDOUT", // 86 (344) - "STDERR", // 87 (345) - "LIST", // 88 (346) - "MAP", // 89 (347) - "NOLIST", // 90 (348) - "NOMAP", // 91 (349) - "NOSOURCE", // 92 (350) - "MIGHT-BE", // 93 (351) - "FUNCTION-UDF", // 94 (352) - "FUNCTION-UDF-0", // 95 (353) - "DATE-FMT", // 96 (354) - "TIME-FMT", // 97 (355) - "DATETIME-FMT", // 98 (356) - "BASIS", // 99 (357) - "CBL", // 100 (358) - "CONSTANT", // 101 (359) - "COPY", // 102 (360) - "DEFINED", // 103 (361) - "ENTER", // 104 (362) - "FEATURE", // 105 (363) - "INSERTT", // 106 (364) - "LSUB", // 107 (365) - "PARAMETER", // 108 (366) - "OVERRIDE", // 109 (367) - "READY", // 110 (368) - "RESET", // 111 (369) - "RSUB", // 112 (370) - "SERVICE-RELOAD", // 113 (371) - "STAR-CBL", // 114 (372) - "SUBSCRIPT", // 115 (373) - "SUPPRESS", // 116 (374) - "TITLE", // 117 (375) - "TRACE", // 118 (376) - "USE", // 119 (377) - "COBOL-WORDS", // 120 (378) - "EQUATE", // 121 (379) - "UNDEFINE", // 122 (380) - "CDF-DEFINE", // 123 (381) - "CDF-DISPLAY", // 124 (382) - "CDF-IF", // 125 (383) - "CDF-ELSE", // 126 (384) - "CDF-END-IF", // 127 (385) - "CDF-EVALUATE", // 128 (386) - "CDF-WHEN", // 129 (387) - "CDF-END-EVALUATE", // 130 (388) - "CALL-COBOL", // 131 (389) - "CALL-VERBATIM", // 132 (390) - "IF", // 133 (391) - "THEN", // 134 (392) - "ELSE", // 135 (393) - "SENTENCE", // 136 (394) - "ACCEPT", // 137 (395) - "ADD", // 138 (396) - "ALTER", // 139 (397) - "CALL", // 140 (398) - "CANCEL", // 141 (399) - "CLOSE", // 142 (400) - "COMPUTE", // 143 (401) - "CONTINUE", // 144 (402) - "DELETE", // 145 (403) - "DISPLAY", // 146 (404) - "DIVIDE", // 147 (405) - "EVALUATE", // 148 (406) - "EXIT", // 149 (407) - "FILLER", // 150 (408) - "GOBACK", // 151 (409) - "GOTO", // 152 (410) - "INITIALIZE", // 153 (411) - "INSPECT", // 154 (412) - "MERGE", // 155 (413) - "MOVE", // 156 (414) - "MULTIPLY", // 157 (415) - "OPEN", // 158 (416) - "PARAGRAPH", // 159 (417) - "READ", // 160 (418) - "RELEASE", // 161 (419) - "RETURN", // 162 (420) - "REWRITE", // 163 (421) - "SEARCH", // 164 (422) - "SET", // 165 (423) - "SELECT", // 166 (424) - "SORT", // 167 (425) - "SORT-MERGE", // 168 (426) - "STRING", // 169 (427) - "STOP", // 170 (428) - "SUBTRACT", // 171 (429) - "START", // 172 (430) - "UNSTRING", // 173 (431) - "WRITE", // 174 (432) - "WHEN", // 175 (433) - "ABS", // 176 (434) - "ACCESS", // 177 (435) - "ACOS", // 178 (436) - "ACTUAL", // 179 (437) - "ADVANCING", // 180 (438) - "AFTER", // 181 (439) - "ALL", // 182 (440) - "ALLOCATE", // 183 (441) - "ALPHABET", // 184 (442) - "ALPHABETIC", // 185 (443) - "ALPHABETIC-LOWER", // 186 (444) - "ALPHABETIC-UPPER", // 187 (445) - "ALPHANUMERIC", // 188 (446) - "ALPHANUMERIC-EDITED", // 189 (447) - "ALSO", // 190 (448) - "ALTERNATE", // 191 (449) - "ANNUITY", // 192 (450) - "ANUM", // 193 (451) - "ANY", // 194 (452) - "ANYCASE", // 195 (453) - "APPLY", // 196 (454) - "ARE", // 197 (455) - "AREA", // 198 (456) - "AREAS", // 199 (457) - "AS", // 200 (458) - "ASCENDING", // 201 (459) - "ACTIVATING", // 202 (460) - "ASIN", // 203 (461) - "ASSIGN", // 204 (462) - "AT", // 205 (463) - "ATAN", // 206 (464) - "BASED", // 207 (465) - "BASECONVERT", // 208 (466) - "BEFORE", // 209 (467) - "BINARY", // 210 (468) - "BIT", // 211 (469) - "BIT-OF", // 212 (470) - "BIT-TO-CHAR", // 213 (471) - "BLANK", // 214 (472) - "BLOCK", // 215 (473) - "BOOLEAN-OF-INTEGER", // 216 (474) - "BOTTOM", // 217 (475) - "BY", // 218 (476) - "BYTE", // 219 (477) - "BYTE-LENGTH", // 220 (478) - "CF", // 221 (479) - "CH", // 222 (480) - "CHANGED", // 223 (481) - "CHAR", // 224 (482) - "CHAR-NATIONAL", // 225 (483) - "CHARACTER", // 226 (484) - "CHARACTERS", // 227 (485) - "CHECKING", // 228 (486) - "CLASS", // 229 (487) - "COBOL", // 230 (488) - "CODE", // 231 (489) - "CODE-SET", // 232 (490) - "COLLATING", // 233 (491) - "COLUMN", // 234 (492) - "COMBINED-DATETIME", // 235 (493) - "COMMA", // 236 (494) - "COMMAND-LINE", // 237 (495) - "COMMAND-LINE-COUNT", // 238 (496) - "COMMIT", // 239 (497) - "COMMON", // 240 (498) - "CONCAT", // 241 (499) - "CONDITION", // 242 (500) - "CONFIGURATION", // 243 (501) - "CONTAINS", // 244 (502) - "CONTENT", // 245 (503) - "CONTROL", // 246 (504) - "CONTROLS", // 247 (505) - "CONVERT", // 248 (506) - "CONVERTING", // 249 (507) - "CORRESPONDING", // 250 (508) - "COS", // 251 (509) - "COUNT", // 252 (510) - "CURRENCY", // 253 (511) - "CURRENT", // 254 (512) - "CURRENT-DATE", // 255 (513) - "DATA", // 256 (514) - "DATE", // 257 (515) - "DATE-COMPILED", // 258 (516) - "DATE-OF-INTEGER", // 259 (517) - "DATE-TO-YYYYMMDD", // 260 (518) - "DATE-WRITTEN", // 261 (519) - "DAY", // 262 (520) - "DAY-OF-INTEGER", // 263 (521) - "DAY-OF-WEEK", // 264 (522) - "DAY-TO-YYYYDDD", // 265 (523) - "DBCS", // 266 (524) - "DE", // 267 (525) - "DEBUGGING", // 268 (526) - "DECIMAL-POINT", // 269 (527) - "DECLARATIVES", // 270 (528) - "DEFAULT", // 271 (529) - "DELIMITED", // 272 (530) - "DELIMITER", // 273 (531) - "DEPENDING", // 274 (532) - "DESCENDING", // 275 (533) - "DETAIL", // 276 (534) - "DIRECT", // 277 (535) - "DIRECT-ACCESS", // 278 (536) - "DOWN", // 279 (537) - "DUPLICATES", // 280 (538) - "DYNAMIC", // 281 (539) - "E", // 282 (540) - "EBCDIC", // 283 (541) - "EC", // 284 (542) - "EGCS", // 285 (543) - "ENTRY", // 286 (544) - "ENVIRONMENT", // 287 (545) - "EQUAL", // 288 (546) - "EVERY", // 289 (547) - "EXAMINE", // 290 (548) - "EXHIBIT", // 291 (549) - "EXP", // 292 (550) - "EXP10", // 293 (551) - "EXTEND", // 294 (552) - "EXTERNAL", // 295 (553) - "EXCEPTION-FILE", // 296 (554) - "EXCEPTION-FILE-N", // 297 (555) - "EXCEPTION-LOCATION", // 298 (556) - "EXCEPTION-LOCATION-N", // 299 (557) - "EXCEPTION-STATEMENT", // 300 (558) - "EXCEPTION-STATUS", // 301 (559) - "FACTORIAL", // 302 (560) - "FALSE", // 303 (561) - "FD", // 304 (562) - "FILE-CONTROL", // 305 (563) - "FILE", // 306 (564) - "FILE-LIMIT", // 307 (565) - "FINAL", // 308 (566) - "FINALLY", // 309 (567) - "FIND-STRING", // 310 (568) - "FIRST", // 311 (569) - "FIXED", // 312 (570) - "FOOTING", // 313 (571) - "FOR", // 314 (572) - "FORMATTED-CURRENT-DATE", // 315 (573) - "FORMATTED-DATE", // 316 (574) - "FORMATTED-DATETIME", // 317 (575) - "FORMATTED-TIME", // 318 (576) - "FORM-OVERFLOW", // 319 (577) - "FREE", // 320 (578) - "FRACTION-PART", // 321 (579) - "FROM", // 322 (580) - "FUNCTION", // 323 (581) - "GENERATE", // 324 (582) - "GIVING", // 325 (583) - "GLOBAL", // 326 (584) - "GO", // 327 (585) - "GROUP", // 328 (586) - "HEADING", // 329 (587) - "HEX", // 330 (588) - "HEX-OF", // 331 (589) - "HEX-TO-CHAR", // 332 (590) - "HIGH-VALUES", // 333 (591) - "HIGHEST-ALGEBRAIC", // 334 (592) - "HOLD", // 335 (593) - "IBM-360", // 336 (594) - "IN", // 337 (595) - "INCLUDE", // 338 (596) - "INDEX", // 339 (597) - "INDEXED", // 340 (598) - "INDICATE", // 341 (599) - "INITIAL", // 342 (600) - "INITIATE", // 343 (601) - "INPUT", // 344 (602) - "INSTALLATION", // 345 (603) - "INTERFACE", // 346 (604) - "INTEGER", // 347 (605) - "INTEGER-OF-BOOLEAN", // 348 (606) - "INTEGER-OF-DATE", // 349 (607) - "INTEGER-OF-DAY", // 350 (608) - "INTEGER-OF-FORMATTED-DATE", // 351 (609) - "INTEGER-PART", // 352 (610) - "INTO", // 353 (611) - "INTRINSIC", // 354 (612) - "INVOKE", // 355 (613) - "I-O", // 356 (614) - "I-O-CONTROL", // 357 (615) - "IS", // 358 (616) - "ISNT", // 359 (617) - "KANJI", // 360 (618) - "KEY", // 361 (619) - "LABEL", // 362 (620) - "LAST", // 363 (621) - "LEADING", // 364 (622) - "LEFT", // 365 (623) - "LENGTH", // 366 (624) - "LENGTH-OF", // 367 (625) - "LIMIT", // 368 (626) - "LIMITS", // 369 (627) - "LINE", // 370 (628) - "LINES", // 371 (629) - "LINE-COUNTER", // 372 (630) - "LINAGE", // 373 (631) - "LINKAGE", // 374 (632) - "LOCALE", // 375 (633) - "LOCALE-COMPARE", // 376 (634) - "LOCALE-DATE", // 377 (635) - "LOCALE-TIME", // 378 (636) - "LOCALE-TIME-FROM-SECONDS", // 379 (637) - "LOCAL-STORAGE", // 380 (638) - "LOCATION", // 381 (639) - "LOCK", // 382 (640) - "LOCK-ON", // 383 (641) - "LOG", // 384 (642) - "LOG10", // 385 (643) - "LOWER-CASE", // 386 (644) - "LOW-VALUES", // 387 (645) - "LOWEST-ALGEBRAIC", // 388 (646) - "LPAREN", // 389 (647) - "MANUAL", // 390 (648) - "MAXX", // 391 (649) - "MEAN", // 392 (650) - "MEDIAN", // 393 (651) - "MIDRANGE", // 394 (652) - "MINN", // 395 (653) - "MULTIPLE", // 396 (654) - "MOD", // 397 (655) - "MODE", // 398 (656) - "MODULE-NAME", // 399 (657) - "NAMED", // 400 (658) - "NAT", // 401 (659) - "NATIONAL", // 402 (660) - "NATIONAL-EDITED", // 403 (661) - "NATIONAL-OF", // 404 (662) - "NATIVE", // 405 (663) - "NESTED", // 406 (664) - "NEXT", // 407 (665) - "NO", // 408 (666) - "NOTE", // 409 (667) - "NULLS", // 410 (668) - "NULLPTR", // 411 (669) - "NUMERIC", // 412 (670) - "NUMERIC-EDITED", // 413 (671) - "NUMVAL", // 414 (672) - "NUMVAL-C", // 415 (673) - "NUMVAL-F", // 416 (674) - "OCCURS", // 417 (675) - "OF", // 418 (676) - "OFF", // 419 (677) - "OMITTED", // 420 (678) - "ON", // 421 (679) - "ONLY", // 422 (680) - "OPTIONAL", // 423 (681) - "OPTIONS", // 424 (682) - "ORD", // 425 (683) - "ORDER", // 426 (684) - "ORD-MAX", // 427 (685) - "ORD-MIN", // 428 (686) - "ORGANIZATION", // 429 (687) - "OTHER", // 430 (688) - "OTHERWISE", // 431 (689) - "OUTPUT", // 432 (690) - "PACKED-DECIMAL", // 433 (691) - "PADDING", // 434 (692) - "PAGE", // 435 (693) - "PAGE-COUNTER", // 436 (694) - "PF", // 437 (695) - "PH", // 438 (696) - "PI", // 439 (697) - "PIC", // 440 (698) - "PICTURE", // 441 (699) - "PLUS", // 442 (700) - "PRESENT-VALUE", // 443 (701) - "PRINT-SWITCH", // 444 (702) - "PROCEDURE", // 445 (703) - "PROCEDURES", // 446 (704) - "PROCEED", // 447 (705) - "PROCESS", // 448 (706) - "PROGRAM-ID", // 449 (707) - "PROGRAM", // 450 (708) - "PROPERTY", // 451 (709) - "PROTOTYPE", // 452 (710) - "PSEUDOTEXT", // 453 (711) - "QUOTES", // 454 (712) - "RANDOM", // 455 (713) - "RANDOM-SEED", // 456 (714) - "RANGE", // 457 (715) - "RAISE", // 458 (716) - "RAISING", // 459 (717) - "RD", // 460 (718) - "RECORD", // 461 (719) - "RECORDING", // 462 (720) - "RECORDS", // 463 (721) - "RECURSIVE", // 464 (722) - "REDEFINES", // 465 (723) - "REEL", // 466 (724) - "REFERENCE", // 467 (725) - "RELATIVE", // 468 (726) - "REM", // 469 (727) - "REMAINDER", // 470 (728) - "REMARKS", // 471 (729) - "REMOVAL", // 472 (730) - "RENAMES", // 473 (731) - "REPLACE", // 474 (732) - "REPLACING", // 475 (733) - "REPORT", // 476 (734) - "REPORTING", // 477 (735) - "REPORTS", // 478 (736) - "REPOSITORY", // 479 (737) - "RERUN", // 480 (738) - "RESERVE", // 481 (739) - "RESTRICTED", // 482 (740) - "RESUME", // 483 (741) - "REVERSE", // 484 (742) - "REVERSED", // 485 (743) - "REWIND", // 486 (744) - "RF", // 487 (745) - "RH", // 488 (746) - "RIGHT", // 489 (747) - "ROUNDED", // 490 (748) - "RUN", // 491 (749) - "SAME", // 492 (750) - "SCREEN", // 493 (751) - "SD", // 494 (752) - "SECONDS-FROM-FORMATTED-TIME", // 495 (753) - "SECONDS-PAST-MIDNIGHT", // 496 (754) - "SECURITY", // 497 (755) - "SEPARATE", // 498 (756) - "SEQUENCE", // 499 (757) - "SEQUENTIAL", // 500 (758) - "SHARING", // 501 (759) - "SIMPLE-EXIT", // 502 (760) - "SIGN", // 503 (761) - "SIN", // 504 (762) - "SIZE", // 505 (763) - "SMALLEST-ALGEBRAIC", // 506 (764) - "SOURCE", // 507 (765) - "SOURCE-COMPUTER", // 508 (766) - "SPECIAL-NAMES", // 509 (767) - "SQRT", // 510 (768) - "STACK", // 511 (769) - "STANDARD", // 512 (770) - "STANDARD-1", // 513 (771) - "STANDARD-DEVIATION", // 514 (772) - "STANDARD-COMPARE", // 515 (773) - "STATUS", // 516 (774) - "STRONG", // 517 (775) - "SUBSTITUTE", // 518 (776) - "SUM", // 519 (777) - "SYMBOL", // 520 (778) - "SYMBOLIC", // 521 (779) - "SYNCHRONIZED", // 522 (780) - "TALLY", // 523 (781) - "TALLYING", // 524 (782) - "TAN", // 525 (783) - "TERMINATE", // 526 (784) - "TEST", // 527 (785) - "TEST-DATE-YYYYMMDD", // 528 (786) - "TEST-DAY-YYYYDDD", // 529 (787) - "TEST-FORMATTED-DATETIME", // 530 (788) - "TEST-NUMVAL", // 531 (789) - "TEST-NUMVAL-C", // 532 (790) - "TEST-NUMVAL-F", // 533 (791) - "THAN", // 534 (792) - "TIME", // 535 (793) - "TIMES", // 536 (794) - "TO", // 537 (795) - "TOP", // 538 (796) - "TOP-LEVEL", // 539 (797) - "TRACKS", // 540 (798) - "TRACK-AREA", // 541 (799) - "TRAILING", // 542 (800) - "TRANSFORM", // 543 (801) - "TRIM", // 544 (802) - "TRUE", // 545 (803) - "TRY", // 546 (804) - "TURN", // 547 (805) - "TYPE", // 548 (806) - "TYPEDEF", // 549 (807) - "ULENGTH", // 550 (808) - "UNBOUNDED", // 551 (809) - "UNIT", // 552 (810) - "UNITS", // 553 (811) - "UNIT-RECORD", // 554 (812) - "UNTIL", // 555 (813) - "UP", // 556 (814) - "UPON", // 557 (815) - "UPOS", // 558 (816) - "UPPER-CASE", // 559 (817) - "USAGE", // 560 (818) - "USING", // 561 (819) - "USUBSTR", // 562 (820) - "USUPPLEMENTARY", // 563 (821) - "UTILITY", // 564 (822) - "UUID4", // 565 (823) - "UVALID", // 566 (824) - "UWIDTH", // 567 (825) - "VALUE", // 568 (826) - "VARIANCE", // 569 (827) - "VARYING", // 570 (828) - "VOLATILE", // 571 (829) - "WHEN-COMPILED", // 572 (830) - "WITH", // 573 (831) - "WORKING-STORAGE", // 574 (832) - "XML", // 575 (833) - "XMLGENERATE", // 576 (834) - "XMLPARSE", // 577 (835) - "YEAR-TO-YYYY", // 578 (836) - "YYYYDDD", // 579 (837) - "YYYYMMDD", // 580 (838) - "ARITHMETIC", // 581 (839) - "ATTRIBUTE", // 582 (840) - "AUTO", // 583 (841) - "AUTOMATIC", // 584 (842) - "AWAY-FROM-ZERO", // 585 (843) - "BACKGROUND-COLOR", // 586 (844) - "BELL", // 587 (845) - "BINARY-ENCODING", // 588 (846) - "BLINK", // 589 (847) - "CAPACITY", // 590 (848) - "CENTER", // 591 (849) - "CLASSIFICATION", // 592 (850) - "CYCLE", // 593 (851) - "DECIMAL-ENCODING", // 594 (852) - "ENTRY-CONVENTION", // 595 (853) - "EOL", // 596 (854) - "EOS", // 597 (855) - "ERASE", // 598 (856) - "EXPANDS", // 599 (857) - "FLOAT-BINARY", // 600 (858) - "FLOAT-DECIMAL", // 601 (859) - "FOREGROUND-COLOR", // 602 (860) - "FOREVER", // 603 (861) - "FULL", // 604 (862) - "HIGHLIGHT", // 605 (863) - "HIGH-ORDER-LEFT", // 606 (864) - "HIGH-ORDER-RIGHT", // 607 (865) - "IGNORING", // 608 (866) - "IMPLEMENTS", // 609 (867) - "INITIALIZED", // 610 (868) - "INTERMEDIATE", // 611 (869) - "LC-ALL", // 612 (870) - "LC-COLLATE", // 613 (871) - "LC-CTYPE", // 614 (872) - "LC-MESSAGES", // 615 (873) - "LC-MONETARY", // 616 (874) - "LC-NUMERIC", // 617 (875) - "LC-TIME", // 618 (876) - "LOWLIGHT", // 619 (877) - "NEAREST-AWAY-FROM-ZERO", // 620 (878) - "NEAREST-EVEN", // 621 (879) - "NEAREST-TOWARD-ZERO", // 622 (880) - "NONE", // 623 (881) - "NORMAL", // 624 (882) - "NUMBERS", // 625 (883) - "PREFIXED", // 626 (884) - "PREVIOUS", // 627 (885) - "PROHIBITED", // 628 (886) - "RELATION", // 629 (887) - "REQUIRED", // 630 (888) - "REVERSE-VIDEO", // 631 (889) - "ROUNDING", // 632 (890) - "SECONDS", // 633 (891) - "SECURE", // 634 (892) - "SHORT", // 635 (893) - "SIGNED", // 636 (894) - "STANDARD-BINARY", // 637 (895) - "STANDARD-DECIMAL", // 638 (896) - "STATEMENT", // 639 (897) - "STEP", // 640 (898) - "STRUCTURE", // 641 (899) - "TOWARD-GREATER", // 642 (900) - "TOWARD-LESSER", // 643 (901) - "TRUNCATION", // 644 (902) - "UCS-4", // 645 (903) - "UNDERLINE", // 646 (904) - "UNSIGNED", // 647 (905) - "UTF-16", // 648 (906) - "UTF-8", // 649 (907) - "ADDRESS", // 650 (908) - "END-ACCEPT", // 651 (909) - "END-ADD", // 652 (910) - "END-CALL", // 653 (911) - "END-COMPUTE", // 654 (912) - "END-DELETE", // 655 (913) - "END-DISPLAY", // 656 (914) - "END-DIVIDE", // 657 (915) - "END-EVALUATE", // 658 (916) - "END-MULTIPLY", // 659 (917) - "END-PERFORM", // 660 (918) - "END-READ", // 661 (919) - "END-RETURN", // 662 (920) - "END-REWRITE", // 663 (921) - "END-SEARCH", // 664 (922) - "END-START", // 665 (923) - "END-STRING", // 666 (924) - "END-SUBTRACT", // 667 (925) - "END-UNSTRING", // 668 (926) - "END-WRITE", // 669 (927) - "END-IF", // 670 (928) - "THRU", // 671 (929) - "OR", // 672 (930) - "AND", // 673 (931) - "NOT", // 674 (932) - "NE", // 675 (933) - "LE", // 676 (934) - "GE", // 677 (935) - "POW", // 678 (936) - "NEG", // 679 (937) + "IDENTIFICATION", // 0 (258) + "ENVIRONMENT", // 1 (259) + "PROCEDURE", // 2 (260) + "DATA", // 3 (261) + "FILE", // 4 (262) + "INPUT-OUTPUT", // 5 (263) + "LINKAGE", // 6 (264) + "LOCAL-STORAGE", // 7 (265) + "WORKING-STORAGE", // 8 (266) + "OBJECT-COMPUTER", // 9 (267) + "DISPLAY-OF", // 10 (268) + "END-FUNCTION", // 11 (269) + "END-PROGRAM", // 12 (270) + "END-SUBPROGRAM", // 13 (271) + "JUSTIFIED", // 14 (272) + "RETURNING", // 15 (273) + "NO-CONDITION", // 16 (274) + "ALNUM", // 17 (275) + "ALPHED", // 18 (276) + "ERROR", // 19 (277) + "EXCEPTION", // 20 (278) + "SIZE-ERROR", // 21 (279) + "EXCEPTION-NAME", // 22 (280) + "LEVEL", // 23 (281) + "LEVEL66", // 24 (282) + "LEVEL78", // 25 (283) + "LEVEL88", // 26 (284) + "CLASS-NAME", // 27 (285) + "NAME", // 28 (286) + "NAME88", // 29 (287) + "NUME", // 30 (288) + "NUMED", // 31 (289) + "NUMED-CR", // 32 (290) + "NUMED-DB", // 33 (291) + "NINEDOT", // 34 (292) + "NINES", // 35 (293) + "NINEV", // 36 (294) + "PIC-P", // 37 (295) + "ONES", // 38 (296) + "SPACES", // 39 (297) + "LITERAL", // 40 (298) + "END", // 41 (299) + "EOP", // 42 (300) + "FILENAME", // 43 (301) + "INVALID", // 44 (302) + "NUMBER", // 45 (303) + "NEGATIVE", // 46 (304) + "NUMSTR", // 47 (305) + "OVERFLOW", // 48 (306) + "BINARY-INTEGER", // 49 (307) + "COMPUTATIONAL", // 50 (308) + "PERFORM", // 51 (309) + "BACKWARD", // 52 (310) + "POSITIVE", // 53 (311) + "POINTER", // 54 (312) + "SECTION", // 55 (313) + "STANDARD-ALPHABET", // 56 (314) + "SWITCH", // 57 (315) + "UPSI", // 58 (316) + "ZERO", // 59 (317) + "SYSIN", // 60 (318) + "SYSIPT", // 61 (319) + "SYSOUT", // 62 (320) + "SYSLIST", // 63 (321) + "SYSLST", // 64 (322) + "SYSPUNCH", // 65 (323) + "SYSPCH", // 66 (324) + "CONSOLE", // 67 (325) + "C01", // 68 (326) + "C02", // 69 (327) + "C03", // 70 (328) + "C04", // 71 (329) + "C05", // 72 (330) + "C06", // 73 (331) + "C07", // 74 (332) + "C08", // 75 (333) + "C09", // 76 (334) + "C10", // 77 (335) + "C11", // 78 (336) + "C12", // 79 (337) + "CSP", // 80 (338) + "S01", // 81 (339) + "S02", // 82 (340) + "S03", // 83 (341) + "S04", // 84 (342) + "S05", // 85 (343) + "AFP-5A", // 86 (344) + "STDIN", // 87 (345) + "STDOUT", // 88 (346) + "STDERR", // 89 (347) + "LIST", // 90 (348) + "MAP", // 91 (349) + "NOLIST", // 92 (350) + "NOMAP", // 93 (351) + "NOSOURCE", // 94 (352) + "MIGHT-BE", // 95 (353) + "FUNCTION-UDF", // 96 (354) + "FUNCTION-UDF-0", // 97 (355) + "DATE-FMT", // 98 (356) + "TIME-FMT", // 99 (357) + "DATETIME-FMT", // 100 (358) + "BASIS", // 101 (359) + "CBL", // 102 (360) + "CONSTANT", // 103 (361) + "COPY", // 104 (362) + "DEFINED", // 105 (363) + "ENTER", // 106 (364) + "FEATURE", // 107 (365) + "INSERTT", // 108 (366) + "LSUB", // 109 (367) + "PARAMETER", // 110 (368) + "OVERRIDE", // 111 (369) + "READY", // 112 (370) + "RESET", // 113 (371) + "RSUB", // 114 (372) + "SERVICE-RELOAD", // 115 (373) + "STAR-CBL", // 116 (374) + "SUBSCRIPT", // 117 (375) + "SUPPRESS", // 118 (376) + "TITLE", // 119 (377) + "TRACE", // 120 (378) + "USE", // 121 (379) + "COBOL-WORDS", // 122 (380) + "EQUATE", // 123 (381) + "UNDEFINE", // 124 (382) + "CDF-DEFINE", // 125 (383) + "CDF-DISPLAY", // 126 (384) + "CDF-IF", // 127 (385) + "CDF-ELSE", // 128 (386) + "CDF-END-IF", // 129 (387) + "CDF-EVALUATE", // 130 (388) + "CDF-WHEN", // 131 (389) + "CDF-END-EVALUATE", // 132 (390) + "CALL-COBOL", // 133 (391) + "CALL-VERBATIM", // 134 (392) + "IF", // 135 (393) + "THEN", // 136 (394) + "ELSE", // 137 (395) + "SENTENCE", // 138 (396) + "ACCEPT", // 139 (397) + "ADD", // 140 (398) + "ALTER", // 141 (399) + "CALL", // 142 (400) + "CANCEL", // 143 (401) + "CLOSE", // 144 (402) + "COMPUTE", // 145 (403) + "CONTINUE", // 146 (404) + "DELETE", // 147 (405) + "DISPLAY", // 148 (406) + "DIVIDE", // 149 (407) + "EVALUATE", // 150 (408) + "EXIT", // 151 (409) + "FILLER", // 152 (410) + "GOBACK", // 153 (411) + "GOTO", // 154 (412) + "INITIALIZE", // 155 (413) + "INSPECT", // 156 (414) + "MERGE", // 157 (415) + "MOVE", // 158 (416) + "MULTIPLY", // 159 (417) + "OPEN", // 160 (418) + "PARAGRAPH", // 161 (419) + "READ", // 162 (420) + "RELEASE", // 163 (421) + "RETURN", // 164 (422) + "REWRITE", // 165 (423) + "SEARCH", // 166 (424) + "SET", // 167 (425) + "SELECT", // 168 (426) + "SORT", // 169 (427) + "SORT-MERGE", // 170 (428) + "STRING", // 171 (429) + "STOP", // 172 (430) + "SUBTRACT", // 173 (431) + "START", // 174 (432) + "UNSTRING", // 175 (433) + "WRITE", // 176 (434) + "WHEN", // 177 (435) + "ABS", // 178 (436) + "ACCESS", // 179 (437) + "ACOS", // 180 (438) + "ACTUAL", // 181 (439) + "ADVANCING", // 182 (440) + "AFTER", // 183 (441) + "ALL", // 184 (442) + "ALLOCATE", // 185 (443) + "ALPHABET", // 186 (444) + "ALPHABETIC", // 187 (445) + "ALPHABETIC-LOWER", // 188 (446) + "ALPHABETIC-UPPER", // 189 (447) + "ALPHANUMERIC", // 190 (448) + "ALPHANUMERIC-EDITED", // 191 (449) + "ALSO", // 192 (450) + "ALTERNATE", // 193 (451) + "ANNUITY", // 194 (452) + "ANUM", // 195 (453) + "ANY", // 196 (454) + "ANYCASE", // 197 (455) + "APPLY", // 198 (456) + "ARE", // 199 (457) + "AREA", // 200 (458) + "AREAS", // 201 (459) + "AS", // 202 (460) + "ASCENDING", // 203 (461) + "ACTIVATING", // 204 (462) + "ASIN", // 205 (463) + "ASSIGN", // 206 (464) + "AT", // 207 (465) + "ATAN", // 208 (466) + "BASED", // 209 (467) + "BASECONVERT", // 210 (468) + "BEFORE", // 211 (469) + "BINARY", // 212 (470) + "BIT", // 213 (471) + "BIT-OF", // 214 (472) + "BIT-TO-CHAR", // 215 (473) + "BLANK", // 216 (474) + "BLOCK", // 217 (475) + "BOOLEAN-OF-INTEGER", // 218 (476) + "BOTTOM", // 219 (477) + "BY", // 220 (478) + "BYTE", // 221 (479) + "BYTE-LENGTH", // 222 (480) + "CF", // 223 (481) + "CH", // 224 (482) + "CHANGED", // 225 (483) + "CHAR", // 226 (484) + "CHAR-NATIONAL", // 227 (485) + "CHARACTER", // 228 (486) + "CHARACTERS", // 229 (487) + "CHECKING", // 230 (488) + "CLASS", // 231 (489) + "COBOL", // 232 (490) + "CODE", // 233 (491) + "CODE-SET", // 234 (492) + "COLLATING", // 235 (493) + "COLUMN", // 236 (494) + "COMBINED-DATETIME", // 237 (495) + "COMMA", // 238 (496) + "COMMAND-LINE", // 239 (497) + "COMMAND-LINE-COUNT", // 240 (498) + "COMMIT", // 241 (499) + "COMMON", // 242 (500) + "CONCAT", // 243 (501) + "CONDITION", // 244 (502) + "CONFIGURATION", // 245 (503) + "CONTAINS", // 246 (504) + "CONTENT", // 247 (505) + "CONTROL", // 248 (506) + "CONTROLS", // 249 (507) + "CONVERT", // 250 (508) + "CONVERTING", // 251 (509) + "CORRESPONDING", // 252 (510) + "COS", // 253 (511) + "COUNT", // 254 (512) + "CURRENCY", // 255 (513) + "CURRENT", // 256 (514) + "CURRENT-DATE", // 257 (515) + "DATA", // 258 (516) + "DATE", // 259 (517) + "DATE-COMPILED", // 260 (518) + "DATE-OF-INTEGER", // 261 (519) + "DATE-TO-YYYYMMDD", // 262 (520) + "DATE-WRITTEN", // 263 (521) + "DAY", // 264 (522) + "DAY-OF-INTEGER", // 265 (523) + "DAY-OF-WEEK", // 266 (524) + "DAY-TO-YYYYDDD", // 267 (525) + "DBCS", // 268 (526) + "DE", // 269 (527) + "DEBUGGING", // 270 (528) + "DECIMAL-POINT", // 271 (529) + "DECLARATIVES", // 272 (530) + "DEFAULT", // 273 (531) + "DELIMITED", // 274 (532) + "DELIMITER", // 275 (533) + "DEPENDING", // 276 (534) + "DESCENDING", // 277 (535) + "DETAIL", // 278 (536) + "DIRECT", // 279 (537) + "DIRECT-ACCESS", // 280 (538) + "DOWN", // 281 (539) + "DUPLICATES", // 282 (540) + "DYNAMIC", // 283 (541) + "E", // 284 (542) + "EBCDIC", // 285 (543) + "EC", // 286 (544) + "EGCS", // 287 (545) + "ENTRY", // 288 (546) + "ENVIRONMENT", // 289 (547) + "EQUAL", // 290 (548) + "EVERY", // 291 (549) + "EXAMINE", // 292 (550) + "EXHIBIT", // 293 (551) + "EXP", // 294 (552) + "EXP10", // 295 (553) + "EXTEND", // 296 (554) + "EXTERNAL", // 297 (555) + "EXCEPTION-FILE", // 298 (556) + "EXCEPTION-FILE-N", // 299 (557) + "EXCEPTION-LOCATION", // 300 (558) + "EXCEPTION-LOCATION-N", // 301 (559) + "EXCEPTION-STATEMENT", // 302 (560) + "EXCEPTION-STATUS", // 303 (561) + "FACTORIAL", // 304 (562) + "FALSE", // 305 (563) + "FD", // 306 (564) + "FILE-CONTROL", // 307 (565) + "FILE", // 308 (566) + "FILE-LIMIT", // 309 (567) + "FINAL", // 310 (568) + "FINALLY", // 311 (569) + "FIND-STRING", // 312 (570) + "FIRST", // 313 (571) + "FIXED", // 314 (572) + "FOOTING", // 315 (573) + "FOR", // 316 (574) + "FORMATTED-CURRENT-DATE", // 317 (575) + "FORMATTED-DATE", // 318 (576) + "FORMATTED-DATETIME", // 319 (577) + "FORMATTED-TIME", // 320 (578) + "FORM-OVERFLOW", // 321 (579) + "FREE", // 322 (580) + "FRACTION-PART", // 323 (581) + "FROM", // 324 (582) + "FUNCTION", // 325 (583) + "GENERATE", // 326 (584) + "GIVING", // 327 (585) + "GLOBAL", // 328 (586) + "GO", // 329 (587) + "GROUP", // 330 (588) + "HEADING", // 331 (589) + "HEX", // 332 (590) + "HEX-OF", // 333 (591) + "HEX-TO-CHAR", // 334 (592) + "HIGH-VALUES", // 335 (593) + "HIGHEST-ALGEBRAIC", // 336 (594) + "HOLD", // 337 (595) + "IBM-360", // 338 (596) + "IN", // 339 (597) + "INCLUDE", // 340 (598) + "INDEX", // 341 (599) + "INDEXED", // 342 (600) + "INDICATE", // 343 (601) + "INITIAL", // 344 (602) + "INITIATE", // 345 (603) + "INPUT", // 346 (604) + "INSTALLATION", // 347 (605) + "INTERFACE", // 348 (606) + "INTEGER", // 349 (607) + "INTEGER-OF-BOOLEAN", // 350 (608) + "INTEGER-OF-DATE", // 351 (609) + "INTEGER-OF-DAY", // 352 (610) + "INTEGER-OF-FORMATTED-DATE", // 353 (611) + "INTEGER-PART", // 354 (612) + "INTO", // 355 (613) + "INTRINSIC", // 356 (614) + "INVOKE", // 357 (615) + "I-O", // 358 (616) + "I-O-CONTROL", // 359 (617) + "IS", // 360 (618) + "ISNT", // 361 (619) + "KANJI", // 362 (620) + "KEY", // 363 (621) + "LABEL", // 364 (622) + "LAST", // 365 (623) + "LEADING", // 366 (624) + "LEFT", // 367 (625) + "LENGTH", // 368 (626) + "LENGTH-OF", // 369 (627) + "LIMIT", // 370 (628) + "LIMITS", // 371 (629) + "LINE", // 372 (630) + "LINES", // 373 (631) + "LINE-COUNTER", // 374 (632) + "LINAGE", // 375 (633) + "LINKAGE", // 376 (634) + "LOCALE", // 377 (635) + "LOCALE-COMPARE", // 378 (636) + "LOCALE-DATE", // 379 (637) + "LOCALE-TIME", // 380 (638) + "LOCALE-TIME-FROM-SECONDS", // 381 (639) + "LOCAL-STORAGE", // 382 (640) + "LOCATION", // 383 (641) + "LOCK", // 384 (642) + "LOCK-ON", // 385 (643) + "LOG", // 386 (644) + "LOG10", // 387 (645) + "LOWER-CASE", // 388 (646) + "LOW-VALUES", // 389 (647) + "LOWEST-ALGEBRAIC", // 390 (648) + "LPAREN", // 391 (649) + "MANUAL", // 392 (650) + "MAXX", // 393 (651) + "MEAN", // 394 (652) + "MEDIAN", // 395 (653) + "MIDRANGE", // 396 (654) + "MINN", // 397 (655) + "MULTIPLE", // 398 (656) + "MOD", // 399 (657) + "MODE", // 400 (658) + "MODULE-NAME", // 401 (659) + "NAMED", // 402 (660) + "NAT", // 403 (661) + "NATIONAL", // 404 (662) + "NATIONAL-EDITED", // 405 (663) + "NATIONAL-OF", // 406 (664) + "NATIVE", // 407 (665) + "NESTED", // 408 (666) + "NEXT", // 409 (667) + "NO", // 410 (668) + "NOTE", // 411 (669) + "NULLS", // 412 (670) + "NULLPTR", // 413 (671) + "NUMERIC", // 414 (672) + "NUMERIC-EDITED", // 415 (673) + "NUMVAL", // 416 (674) + "NUMVAL-C", // 417 (675) + "NUMVAL-F", // 418 (676) + "OCCURS", // 419 (677) + "OF", // 420 (678) + "OFF", // 421 (679) + "OMITTED", // 422 (680) + "ON", // 423 (681) + "ONLY", // 424 (682) + "OPTIONAL", // 425 (683) + "OPTIONS", // 426 (684) + "ORD", // 427 (685) + "ORDER", // 428 (686) + "ORD-MAX", // 429 (687) + "ORD-MIN", // 430 (688) + "ORGANIZATION", // 431 (689) + "OTHER", // 432 (690) + "OTHERWISE", // 433 (691) + "OUTPUT", // 434 (692) + "PACKED-DECIMAL", // 435 (693) + "PADDING", // 436 (694) + "PAGE", // 437 (695) + "PAGE-COUNTER", // 438 (696) + "PF", // 439 (697) + "PH", // 440 (698) + "PI", // 441 (699) + "PIC", // 442 (700) + "PICTURE", // 443 (701) + "PLUS", // 444 (702) + "PRESENT-VALUE", // 445 (703) + "PRINT-SWITCH", // 446 (704) + "PROCEDURE", // 447 (705) + "PROCEDURES", // 448 (706) + "PROCEED", // 449 (707) + "PROCESS", // 450 (708) + "PROGRAM-ID", // 451 (709) + "PROGRAM", // 452 (710) + "PROPERTY", // 453 (711) + "PROTOTYPE", // 454 (712) + "PSEUDOTEXT", // 455 (713) + "QUOTES", // 456 (714) + "RANDOM", // 457 (715) + "RANDOM-SEED", // 458 (716) + "RANGE", // 459 (717) + "RAISE", // 460 (718) + "RAISING", // 461 (719) + "RD", // 462 (720) + "RECORD", // 463 (721) + "RECORDING", // 464 (722) + "RECORDS", // 465 (723) + "RECURSIVE", // 466 (724) + "REDEFINES", // 467 (725) + "REEL", // 468 (726) + "REFERENCE", // 469 (727) + "RELATIVE", // 470 (728) + "REM", // 471 (729) + "REMAINDER", // 472 (730) + "REMARKS", // 473 (731) + "REMOVAL", // 474 (732) + "RENAMES", // 475 (733) + "REPLACE", // 476 (734) + "REPLACING", // 477 (735) + "REPORT", // 478 (736) + "REPORTING", // 479 (737) + "REPORTS", // 480 (738) + "REPOSITORY", // 481 (739) + "RERUN", // 482 (740) + "RESERVE", // 483 (741) + "RESTRICTED", // 484 (742) + "RESUME", // 485 (743) + "REVERSE", // 486 (744) + "REVERSED", // 487 (745) + "REWIND", // 488 (746) + "RF", // 489 (747) + "RH", // 490 (748) + "RIGHT", // 491 (749) + "ROUNDED", // 492 (750) + "RUN", // 493 (751) + "SAME", // 494 (752) + "SCREEN", // 495 (753) + "SD", // 496 (754) + "SECONDS-FROM-FORMATTED-TIME", // 497 (755) + "SECONDS-PAST-MIDNIGHT", // 498 (756) + "SECURITY", // 499 (757) + "SEPARATE", // 500 (758) + "SEQUENCE", // 501 (759) + "SEQUENTIAL", // 502 (760) + "SHARING", // 503 (761) + "SIMPLE-EXIT", // 504 (762) + "SIGN", // 505 (763) + "SIN", // 506 (764) + "SIZE", // 507 (765) + "SMALLEST-ALGEBRAIC", // 508 (766) + "SOURCE", // 509 (767) + "SOURCE-COMPUTER", // 510 (768) + "SPECIAL-NAMES", // 511 (769) + "SQRT", // 512 (770) + "STACK", // 513 (771) + "STANDARD", // 514 (772) + "STANDARD-1", // 515 (773) + "STANDARD-DEVIATION", // 516 (774) + "STANDARD-COMPARE", // 517 (775) + "STATUS", // 518 (776) + "STRONG", // 519 (777) + "SUBSTITUTE", // 520 (778) + "SUM", // 521 (779) + "SYMBOL", // 522 (780) + "SYMBOLIC", // 523 (781) + "SYNCHRONIZED", // 524 (782) + "TALLY", // 525 (783) + "TALLYING", // 526 (784) + "TAN", // 527 (785) + "TERMINATE", // 528 (786) + "TEST", // 529 (787) + "TEST-DATE-YYYYMMDD", // 530 (788) + "TEST-DAY-YYYYDDD", // 531 (789) + "TEST-FORMATTED-DATETIME", // 532 (790) + "TEST-NUMVAL", // 533 (791) + "TEST-NUMVAL-C", // 534 (792) + "TEST-NUMVAL-F", // 535 (793) + "THAN", // 536 (794) + "TIME", // 537 (795) + "TIMES", // 538 (796) + "TO", // 539 (797) + "TOP", // 540 (798) + "TOP-LEVEL", // 541 (799) + "TRACKS", // 542 (800) + "TRACK-AREA", // 543 (801) + "TRAILING", // 544 (802) + "TRANSFORM", // 545 (803) + "TRIM", // 546 (804) + "TRUE", // 547 (805) + "TRY", // 548 (806) + "TURN", // 549 (807) + "TYPE", // 550 (808) + "TYPEDEF", // 551 (809) + "ULENGTH", // 552 (810) + "UNBOUNDED", // 553 (811) + "UNIT", // 554 (812) + "UNITS", // 555 (813) + "UNIT-RECORD", // 556 (814) + "UNTIL", // 557 (815) + "UP", // 558 (816) + "UPON", // 559 (817) + "UPOS", // 560 (818) + "UPPER-CASE", // 561 (819) + "USAGE", // 562 (820) + "USING", // 563 (821) + "USUBSTR", // 564 (822) + "USUPPLEMENTARY", // 565 (823) + "UTILITY", // 566 (824) + "UUID4", // 567 (825) + "UVALID", // 568 (826) + "UWIDTH", // 569 (827) + "VALUE", // 570 (828) + "VARIANCE", // 571 (829) + "VARYING", // 572 (830) + "VOLATILE", // 573 (831) + "WHEN-COMPILED", // 574 (832) + "WITH", // 575 (833) + "WORKING-STORAGE", // 576 (834) + "XML", // 577 (835) + "XMLGENERATE", // 578 (836) + "XMLPARSE", // 579 (837) + "YEAR-TO-YYYY", // 580 (838) + "YYYYDDD", // 581 (839) + "YYYYMMDD", // 582 (840) + "ARITHMETIC", // 583 (841) + "ATTRIBUTE", // 584 (842) + "AUTO", // 585 (843) + "AUTOMATIC", // 586 (844) + "AWAY-FROM-ZERO", // 587 (845) + "BACKGROUND-COLOR", // 588 (846) + "BELL", // 589 (847) + "BINARY-ENCODING", // 590 (848) + "BLINK", // 591 (849) + "CAPACITY", // 592 (850) + "CENTER", // 593 (851) + "CLASSIFICATION", // 594 (852) + "CYCLE", // 595 (853) + "DECIMAL-ENCODING", // 596 (854) + "ENTRY-CONVENTION", // 597 (855) + "EOL", // 598 (856) + "EOS", // 599 (857) + "ERASE", // 600 (858) + "EXPANDS", // 601 (859) + "FLOAT-BINARY", // 602 (860) + "FLOAT-DECIMAL", // 603 (861) + "FOREGROUND-COLOR", // 604 (862) + "FOREVER", // 605 (863) + "FULL", // 606 (864) + "HIGHLIGHT", // 607 (865) + "HIGH-ORDER-LEFT", // 608 (866) + "HIGH-ORDER-RIGHT", // 609 (867) + "IGNORING", // 610 (868) + "IMPLEMENTS", // 611 (869) + "INITIALIZED", // 612 (870) + "INTERMEDIATE", // 613 (871) + "LC-ALL", // 614 (872) + "LC-COLLATE", // 615 (873) + "LC-CTYPE", // 616 (874) + "LC-MESSAGES", // 617 (875) + "LC-MONETARY", // 618 (876) + "LC-NUMERIC", // 619 (877) + "LC-TIME", // 620 (878) + "LOWLIGHT", // 621 (879) + "NEAREST-AWAY-FROM-ZERO", // 622 (880) + "NEAREST-EVEN", // 623 (881) + "NEAREST-TOWARD-ZERO", // 624 (882) + "NONE", // 625 (883) + "NORMAL", // 626 (884) + "NUMBERS", // 627 (885) + "PREFIXED", // 628 (886) + "PREVIOUS", // 629 (887) + "PROHIBITED", // 630 (888) + "RELATION", // 631 (889) + "REQUIRED", // 632 (890) + "REVERSE-VIDEO", // 633 (891) + "ROUNDING", // 634 (892) + "SECONDS", // 635 (893) + "SECURE", // 636 (894) + "SHORT", // 637 (895) + "SIGNED", // 638 (896) + "STANDARD-BINARY", // 639 (897) + "STANDARD-DECIMAL", // 640 (898) + "STATEMENT", // 641 (899) + "STEP", // 642 (900) + "STRUCTURE", // 643 (901) + "TOWARD-GREATER", // 644 (902) + "TOWARD-LESSER", // 645 (903) + "TRUNCATION", // 646 (904) + "UCS-4", // 647 (905) + "UNDERLINE", // 648 (906) + "UNSIGNED", // 649 (907) + "UTF-16", // 650 (908) + "UTF-8", // 651 (909) + "ADDRESS", // 652 (910) + "END-ACCEPT", // 653 (911) + "END-ADD", // 654 (912) + "END-CALL", // 655 (913) + "END-COMPUTE", // 656 (914) + "END-DELETE", // 657 (915) + "END-DISPLAY", // 658 (916) + "END-DIVIDE", // 659 (917) + "END-EVALUATE", // 660 (918) + "END-MULTIPLY", // 661 (919) + "END-PERFORM", // 662 (920) + "END-READ", // 663 (921) + "END-RETURN", // 664 (922) + "END-REWRITE", // 665 (923) + "END-SEARCH", // 666 (924) + "END-START", // 667 (925) + "END-STRING", // 668 (926) + "END-SUBTRACT", // 669 (927) + "END-UNSTRING", // 670 (928) + "END-WRITE", // 671 (929) + "END-IF", // 672 (930) + "THRU", // 673 (931) + "OR", // 674 (932) + "AND", // 675 (933) + "NOT", // 676 (934) + "NE", // 677 (935) + "LE", // 678 (936) + "GE", // 679 (937) + "POW", // 680 (938) + "NEG", // 681 (939) }; diff --git a/gcc/cobol/util.cc b/gcc/cobol/util.cc index edf4aa8..87b19b6 100644 --- a/gcc/cobol/util.cc +++ b/gcc/cobol/util.cc @@ -2331,6 +2331,75 @@ bool fisprint(int c) // 8.9 Reserved words static const std::set<std::string> reserved_words = { + // GCC COBOL keywords + "COMMAND-LINE", + "COMMAND-LINE-COUNT", + + // GCC device names + "C01", + "C02", + "C03", + "C04", + "C05", + "C06", + "C07", + "C08", + "C09", + "C10", + "C11", + "C12", + "CONSOLE", + "S01", + "S02", + "S03", + "S04", + "S05", + "STDERR", + "STDIN", + "STDOUT", + "SYSIN", + "SYSIPT", + "SYSLIST", + "SYSLST", + "SYSOUT", + "SYSPCH", + "SYSPUNCH", + "UPSI", + + // IBM keywords that GCC recognizes + "BASIS", + "CBL", + "ENTER", + "READY", + "TITLE", + "TRACE", + "ALTER", + "COBOL", + "DATE-COMPILED", + "DATE-WRITTEN", + "DBCS", + "DEBUGGING", + "EGCS", + "ENTRY", + "EVERY", + "INSTALLATION", + "I-O-CONTROL", + "KANJI", + "LABEL", + "NULLS", + "PADDING", + "PROCEDURES", + "PROCEED", + "RECORDING", + "RERUN", + "REVERSED", + "SECURITY", + "TALLY", + "VOLATILE", + "XML", + "END-START", + + // ISO 2023 keywords "ACCEPT", "ACCESS", "ACTIVE-CLASS", @@ -2497,8 +2566,6 @@ static const std::set<std::string> reserved_words = { "FLOAT-EXTENDED", "FLOAT-INFINITY", "FLOAT-LONG", - "FLOAT-NOT-A-NUMBER", - "FLOAT-NOT-A-NUMBER-", "FLOAT-NOT-A-NUMBER-", "FLOAT-SHORT", "FOOTING", @@ -2856,10 +2923,11 @@ static const std::set<std::string> context_sensitive_words = { }; // Is the input a COBOL word, per ISO/IEC 1989:2023 (E) ? +// We add a few GCC-specific keywords, and our supported IBM keywords. bool -iso_cobol_word( const std::string& name, bool include_intrinsics ) { +iso_cobol_word( const std::string& name, bool include_context ) { auto ok = 1 == reserved_words.count(name); - if( include_intrinsics && !ok ) { + if( include_context && !ok ) { ok = 1 == context_sensitive_words.count(name); } return ok; diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index ca14eb9..e06cd5f 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -274,6 +274,12 @@ struct riscv_ext_version int minor_version; }; +struct riscv_profiles +{ + const char *profile_name; + const char *profile_string; +}; + /* All standard extensions defined in all supported ISA spec. */ static const struct riscv_ext_version riscv_ext_version_table[] = { @@ -502,6 +508,47 @@ static const struct riscv_ext_version riscv_combine_info[] = {NULL, ISA_SPEC_CLASS_NONE, 0, 0} }; +/* This table records the mapping form RISC-V Profiles into march string. */ +static const riscv_profiles riscv_profiles_table[] = +{ + /* RVI20U only contains the base extension 'i' as mandatory extension. */ + {"rvi20u64", "rv64i"}, + {"rvi20u32", "rv32i"}, + + /* RVA20U contains the 'i,m,a,f,d,c,zicsr,zicntr,ziccif,ziccrse,ziccamoa, + zicclsm,za128rs' as mandatory extensions. */ + {"rva20u64", "rv64imafdc_zicsr_zicntr_ziccif_ziccrse_ziccamoa" + "_zicclsm_za128rs"}, + + /* RVA22U contains the 'i,m,a,f,d,c,zicsr,zihintpause,zba,zbb,zbs,zicntr, + zihpm,ziccif,ziccrse,ziccamoa, zicclsm,zic64b,za64rs,zicbom,zicbop,zicboz, + zfhmin,zkt' as mandatory extensions. */ + {"rva22u64", "rv64imafdc_zicsr_zicntr_ziccif_ziccrse_ziccamoa" + "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" + "_zicboz_zfhmin_zkt"}, + + /* RVA23 contains all mandatory base ISA for RVA22U64 and the new extension + 'v,zihintntl,zvfhmin,zvbb,zvkt,zicond,zimop,zcmop,zfa,zawrs' as mandatory + extensions. */ + {"rva23u64", "rv64imafdcv_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" + "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" + "_zicboz_zfhmin_zkt_zvfhmin_zvbb_zvkt_zihintntl_zicond_zimop_zcmop_zcb" + "_zfa_zawrs"}, + + /* RVB23 contains all mandatory base ISA for RVA22U64 and the new extension + 'zihintntl,zicond,zimop,zcmop,zfa,zawrs' as mandatory + extensions. */ + {"rvb23u64", "rv64imafdc_zicsr_zicntr_zihpm_ziccif_ziccrse_ziccamoa" + "_zicclsm_zic64b_za64rs_zihintpause_zba_zbb_zbs_zicbom_zicbop" + "_zicboz_zfhmin_zkt_zihintntl_zicond_zimop_zcmop_zcb" + "_zfa_zawrs"}, + + /* Currently we do not define S/M mode Profiles in gcc part. */ + + /* Terminate the list. */ + {NULL, NULL} +}; + static const riscv_cpu_info riscv_cpu_tables[] = { #define RISCV_CORE(CORE_NAME, ARCH, TUNE) \ @@ -1109,6 +1156,52 @@ riscv_subset_list::parsing_subset_version (const char *ext, return p; } +/* Parsing RISC-V Profiles in -march string. + Return string with mandatory extensions of Profiles. */ +std::string +riscv_subset_list::parse_profiles (const char *arch) +{ + /* Checking if input string contains a Profiles. + There are two cases use Profiles in -march option: + + 1. Only use Profiles in '-march' as input + 2. Mixed Profiles with other extensions + + Use '_' to split Profiles and other extension. */ + std::string p(arch); + const size_t p_len = p.size(); + + for (int i = 0; riscv_profiles_table[i].profile_name != nullptr; ++i) + { + const std::string& p_name = riscv_profiles_table[i].profile_name; + const std::string& p_str = riscv_profiles_table[i].profile_string; + size_t pos = p.find(p_name); + /* Find profile at the begin. */ + if (pos == 0 && pos + p_name.size() <= p_len) + { + size_t after_pos = pos + p_name.size(); + std::string after_part = p.substr(after_pos); + + /* If there're only profile, return the profile_string directly. */ + if (after_part[0] == '\0') + return p_str; + + /* If isn't '_' after profile, need to add it and mention the user. */ + if (after_part[0] != '_') + { + warning_at (m_loc, 0, "Should use \"%c\" to contact Profiles with other " + "extensions", '_'); + return p_str + "_" + after_part; + } + + /* Return 'profiles_additional' extensions. */ + return p_str + after_part; + } + } + /* Not found profile, return directly. */ + return p; +} + /* Parsing function for base extensions, rv[32|64][i|e|g] Return Value: @@ -1135,8 +1228,8 @@ riscv_subset_list::parse_base_ext (const char *p) } else { - error_at (m_loc, "%<-march=%s%>: ISA string must begin with rv32 or rv64", - m_arch); + error_at (m_loc, "%<-march=%s%>: ISA string must begin with rv32, rv64 " + "or Profiles", m_arch); return NULL; } @@ -1527,8 +1620,10 @@ riscv_subset_list::parse (const char *arch, location_t loc) return NULL; riscv_subset_list *subset_list = new riscv_subset_list (arch, loc); + const char *p = arch; - p = subset_list->parse_base_ext (p); + std::string a = subset_list->parse_profiles(p); + p = subset_list->parse_base_ext (a.c_str()); if (p == NULL) goto fail; diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 1ba5ac4..13e6c2a 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -518,15 +518,17 @@ scalar_chain::build (bitmap candidates, unsigned insn_uid, bitmap disallowed) instead of using a scalar one. */ int -general_scalar_chain::vector_const_cost (rtx exp) +general_scalar_chain::vector_const_cost (rtx exp, basic_block bb) { gcc_assert (CONST_INT_P (exp)); if (standard_sse_constant_p (exp, vmode)) return ix86_cost->sse_op; + if (optimize_bb_for_size_p (bb)) + return COSTS_N_BYTES (8); /* We have separate costs for SImode and DImode, use SImode costs for smaller modes. */ - return ix86_cost->sse_load[smode == DImode ? 1 : 0]; + return COSTS_N_INSNS (ix86_cost->sse_load[smode == DImode ? 1 : 0]) / 2; } /* Compute a gain for chain conversion. */ @@ -547,7 +549,7 @@ general_scalar_chain::compute_convert_gain () smaller modes than SImode the int load/store costs need to be adjusted as well. */ unsigned sse_cost_idx = smode == DImode ? 1 : 0; - unsigned m = smode == DImode ? (TARGET_64BIT ? 1 : 2) : 1; + int m = smode == DImode ? (TARGET_64BIT ? 1 : 2) : 1; EXECUTE_IF_SET_IN_BITMAP (insns, 0, insn_uid, bi) { @@ -555,26 +557,55 @@ general_scalar_chain::compute_convert_gain () rtx def_set = single_set (insn); rtx src = SET_SRC (def_set); rtx dst = SET_DEST (def_set); + basic_block bb = BLOCK_FOR_INSN (insn); int igain = 0; if (REG_P (src) && REG_P (dst)) - igain += 2 * m - ix86_cost->xmm_move; + { + if (optimize_bb_for_size_p (bb)) + /* reg-reg move is 2 bytes, while SSE 3. */ + igain += COSTS_N_BYTES (2 * m - 3); + else + /* Move costs are normalized to reg-reg move having cost 2. */ + igain += COSTS_N_INSNS (2 * m - ix86_cost->xmm_move) / 2; + } else if (REG_P (src) && MEM_P (dst)) - igain - += m * ix86_cost->int_store[2] - ix86_cost->sse_store[sse_cost_idx]; + { + if (optimize_bb_for_size_p (bb)) + /* Integer load/store is 3+ bytes and SSE 4+. */ + igain += COSTS_N_BYTES (3 * m - 4); + else + igain + += COSTS_N_INSNS (m * ix86_cost->int_store[2] + - ix86_cost->sse_store[sse_cost_idx]) / 2; + } else if (MEM_P (src) && REG_P (dst)) - igain += m * ix86_cost->int_load[2] - ix86_cost->sse_load[sse_cost_idx]; + { + if (optimize_bb_for_size_p (bb)) + igain += COSTS_N_BYTES (3 * m - 4); + else + igain += COSTS_N_INSNS (m * ix86_cost->int_load[2] + - ix86_cost->sse_load[sse_cost_idx]) / 2; + } else { /* For operations on memory operands, include the overhead of explicit load and store instructions. */ if (MEM_P (dst)) - igain += optimize_insn_for_size_p () - ? -COSTS_N_BYTES (8) - : (m * (ix86_cost->int_load[2] - + ix86_cost->int_store[2]) - - (ix86_cost->sse_load[sse_cost_idx] + - ix86_cost->sse_store[sse_cost_idx])); + { + if (optimize_bb_for_size_p (bb)) + /* ??? This probably should account size difference + of SSE and integer load rather than full SSE load. */ + igain -= COSTS_N_BYTES (8); + else + { + int cost = (m * (ix86_cost->int_load[2] + + ix86_cost->int_store[2]) + - (ix86_cost->sse_load[sse_cost_idx] + + ix86_cost->sse_store[sse_cost_idx])); + igain += COSTS_N_INSNS (cost) / 2; + } + } switch (GET_CODE (src)) { @@ -595,7 +626,7 @@ general_scalar_chain::compute_convert_gain () igain += ix86_cost->shift_const - ix86_cost->sse_op; if (CONST_INT_P (XEXP (src, 0))) - igain -= vector_const_cost (XEXP (src, 0)); + igain -= vector_const_cost (XEXP (src, 0), bb); break; case ROTATE: @@ -631,16 +662,17 @@ general_scalar_chain::compute_convert_gain () igain += m * ix86_cost->add; if (CONST_INT_P (XEXP (src, 0))) - igain -= vector_const_cost (XEXP (src, 0)); + igain -= vector_const_cost (XEXP (src, 0), bb); if (CONST_INT_P (XEXP (src, 1))) - igain -= vector_const_cost (XEXP (src, 1)); + igain -= vector_const_cost (XEXP (src, 1), bb); if (MEM_P (XEXP (src, 1))) { - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) igain -= COSTS_N_BYTES (m == 2 ? 3 : 5); else - igain += m * ix86_cost->int_load[2] - - ix86_cost->sse_load[sse_cost_idx]; + igain += COSTS_N_INSNS + (m * ix86_cost->int_load[2] + - ix86_cost->sse_load[sse_cost_idx]) / 2; } break; @@ -698,7 +730,7 @@ general_scalar_chain::compute_convert_gain () case CONST_INT: if (REG_P (dst)) { - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) { /* xor (2 bytes) vs. xorps (3 bytes). */ if (src == const0_rtx) @@ -722,14 +754,14 @@ general_scalar_chain::compute_convert_gain () /* DImode can be immediate for TARGET_64BIT and SImode always. */ igain += m * COSTS_N_INSNS (1); - igain -= vector_const_cost (src); + igain -= vector_const_cost (src, bb); } } else if (MEM_P (dst)) { igain += (m * ix86_cost->int_store[2] - ix86_cost->sse_store[sse_cost_idx]); - igain -= vector_const_cost (src); + igain -= vector_const_cost (src, bb); } break; @@ -737,13 +769,14 @@ general_scalar_chain::compute_convert_gain () if (XVECEXP (XEXP (src, 1), 0, 0) == const0_rtx) { // movd (4 bytes) replaced with movdqa (4 bytes). - if (!optimize_insn_for_size_p ()) - igain += ix86_cost->sse_to_integer - ix86_cost->xmm_move; + if (!optimize_bb_for_size_p (bb)) + igain += COSTS_N_INSNS (ix86_cost->sse_to_integer + - ix86_cost->xmm_move) / 2; } else { // pshufd; movd replaced with pshufd. - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) igain += COSTS_N_BYTES (4); else igain += ix86_cost->sse_to_integer; @@ -769,11 +802,11 @@ general_scalar_chain::compute_convert_gain () /* Cost the integer to sse and sse to integer moves. */ if (!optimize_function_for_size_p (cfun)) { - cost += n_sse_to_integer * ix86_cost->sse_to_integer; + cost += n_sse_to_integer * COSTS_N_INSNS (ix86_cost->sse_to_integer) / 2; /* ??? integer_to_sse but we only have that in the RA cost table. Assume sse_to_integer/integer_to_sse are the same which they are at the moment. */ - cost += n_integer_to_sse * ix86_cost->sse_to_integer; + cost += n_integer_to_sse * COSTS_N_INSNS (ix86_cost->integer_to_sse) / 2; } else if (TARGET_64BIT || smode == SImode) { @@ -1508,13 +1541,13 @@ general_scalar_chain::convert_insn (rtx_insn *insn) with numerous special cases. */ static int -timode_immed_const_gain (rtx cst) +timode_immed_const_gain (rtx cst, basic_block bb) { /* movabsq vs. movabsq+vmovq+vunpacklqdq. */ if (CONST_WIDE_INT_P (cst) && CONST_WIDE_INT_NUNITS (cst) == 2 && CONST_WIDE_INT_ELT (cst, 0) == CONST_WIDE_INT_ELT (cst, 1)) - return optimize_insn_for_size_p () ? -COSTS_N_BYTES (9) + return optimize_bb_for_size_p (bb) ? -COSTS_N_BYTES (9) : -COSTS_N_INSNS (2); /* 2x movabsq ~ vmovdqa. */ return 0; @@ -1546,33 +1579,34 @@ timode_scalar_chain::compute_convert_gain () rtx src = SET_SRC (def_set); rtx dst = SET_DEST (def_set); HOST_WIDE_INT op1val; + basic_block bb = BLOCK_FOR_INSN (insn); int scost, vcost; int igain = 0; switch (GET_CODE (src)) { case REG: - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) igain = MEM_P (dst) ? COSTS_N_BYTES (6) : COSTS_N_BYTES (3); else igain = COSTS_N_INSNS (1); break; case MEM: - igain = optimize_insn_for_size_p () ? COSTS_N_BYTES (7) + igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (7) : COSTS_N_INSNS (1); break; case CONST_INT: if (MEM_P (dst) && standard_sse_constant_p (src, V1TImode)) - igain = optimize_insn_for_size_p () ? COSTS_N_BYTES (11) : 1; + igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (11) : 1; break; case CONST_WIDE_INT: /* 2 x mov vs. vmovdqa. */ if (MEM_P (dst)) - igain = optimize_insn_for_size_p () ? COSTS_N_BYTES (3) + igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (3) : COSTS_N_INSNS (1); break; @@ -1587,14 +1621,14 @@ timode_scalar_chain::compute_convert_gain () if (!MEM_P (dst)) igain = COSTS_N_INSNS (1); if (CONST_SCALAR_INT_P (XEXP (src, 1))) - igain += timode_immed_const_gain (XEXP (src, 1)); + igain += timode_immed_const_gain (XEXP (src, 1), bb); break; case ASHIFT: case LSHIFTRT: /* See ix86_expand_v1ti_shift. */ op1val = INTVAL (XEXP (src, 1)); - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) { if (op1val == 64 || op1val == 65) scost = COSTS_N_BYTES (5); @@ -1628,7 +1662,7 @@ timode_scalar_chain::compute_convert_gain () case ASHIFTRT: /* See ix86_expand_v1ti_ashiftrt. */ op1val = INTVAL (XEXP (src, 1)); - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) { if (op1val == 64 || op1val == 127) scost = COSTS_N_BYTES (7); @@ -1706,7 +1740,7 @@ timode_scalar_chain::compute_convert_gain () case ROTATERT: /* See ix86_expand_v1ti_rotate. */ op1val = INTVAL (XEXP (src, 1)); - if (optimize_insn_for_size_p ()) + if (optimize_bb_for_size_p (bb)) { scost = COSTS_N_BYTES (13); if ((op1val & 31) == 0) @@ -1738,16 +1772,16 @@ timode_scalar_chain::compute_convert_gain () { if (GET_CODE (XEXP (src, 0)) == AND) /* and;and;or (9 bytes) vs. ptest (5 bytes). */ - igain = optimize_insn_for_size_p() ? COSTS_N_BYTES (4) - : COSTS_N_INSNS (2); + igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (4) + : COSTS_N_INSNS (2); /* or (3 bytes) vs. ptest (5 bytes). */ - else if (optimize_insn_for_size_p ()) + else if (optimize_bb_for_size_p (bb)) igain = -COSTS_N_BYTES (2); } else if (XEXP (src, 1) == const1_rtx) /* and;cmp -1 (7 bytes) vs. pcmpeqd;pxor;ptest (13 bytes). */ - igain = optimize_insn_for_size_p() ? -COSTS_N_BYTES (6) - : -COSTS_N_INSNS (1); + igain = optimize_bb_for_size_p (bb) ? -COSTS_N_BYTES (6) + : -COSTS_N_INSNS (1); break; default: @@ -3338,12 +3372,12 @@ replace_vector_const (machine_mode vector_mode, rtx vector_const, /* Get the single SET instruction. */ rtx set = single_set (insn); - rtx dest = SET_SRC (set); - machine_mode mode = GET_MODE (dest); + rtx src = SET_SRC (set); + machine_mode mode = GET_MODE (src); rtx replace; /* Replace the source operand with VECTOR_CONST. */ - if (SUBREG_P (dest) || mode == vector_mode) + if (SUBREG_P (src) || mode == vector_mode) replace = vector_const; else { diff --git a/gcc/config/i386/i386-features.h b/gcc/config/i386/i386-features.h index 24b0c4e..7f7c0f7 100644 --- a/gcc/config/i386/i386-features.h +++ b/gcc/config/i386/i386-features.h @@ -188,7 +188,7 @@ class general_scalar_chain : public scalar_chain private: void convert_insn (rtx_insn *insn) final override; - int vector_const_cost (rtx exp); + int vector_const_cost (rtx exp, basic_block bb); rtx convert_rotate (enum rtx_code, rtx op0, rtx op1, rtx_insn *insn); }; diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 6a38de3..18fa97a 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -179,6 +179,7 @@ struct processor_costs { const int xmm_move, ymm_move, /* cost of moving XMM and YMM register. */ zmm_move; const int sse_to_integer; /* cost of moving SSE register to integer. */ + const int integer_to_sse; /* cost of moving integer register to SSE. */ const int gather_static, gather_per_elt; /* Cost of gather load is computed as static + per_item * nelts. */ const int scatter_static, scatter_per_elt; /* Cost of gather store is diff --git a/gcc/config/i386/x86-tune-costs.h b/gcc/config/i386/x86-tune-costs.h index 6cce70a..e509129 100644 --- a/gcc/config/i386/x86-tune-costs.h +++ b/gcc/config/i386/x86-tune-costs.h @@ -107,6 +107,7 @@ struct processor_costs ix86_size_cost = {/* costs for tuning for size */ in 128bit, 256bit and 512bit */ 4, 4, 6, /* cost of moving XMM,YMM,ZMM register */ 4, /* cost of moving SSE register to integer. */ + 4, /* cost of moving integer register to SSE. */ COSTS_N_BYTES (5), 0, /* Gather load static, per_elt. */ COSTS_N_BYTES (5), 0, /* Gather store static, per_elt. */ 0, /* size of l1 cache */ @@ -227,6 +228,7 @@ struct processor_costs i386_cost = { /* 386 specific costs */ {4, 8, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 3, /* cost of moving SSE register to integer. */ + 3, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 0, /* size of l1 cache */ @@ -345,6 +347,7 @@ struct processor_costs i486_cost = { /* 486 specific costs */ {4, 8, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 3, /* cost of moving SSE register to integer. */ + 3, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 4, /* size of l1 cache. 486 has 8kB cache @@ -465,6 +468,7 @@ struct processor_costs pentium_cost = { {4, 8, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 3, /* cost of moving SSE register to integer. */ + 3, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 8, /* size of l1 cache. */ @@ -576,6 +580,7 @@ struct processor_costs lakemont_cost = { {4, 8, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 3, /* cost of moving SSE register to integer. */ + 3, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 8, /* size of l1 cache. */ @@ -702,6 +707,7 @@ struct processor_costs pentiumpro_cost = { {4, 8, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 3, /* cost of moving SSE register to integer. */ + 3, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 8, /* size of l1 cache. */ @@ -819,6 +825,7 @@ struct processor_costs geode_cost = { {2, 2, 8, 16, 32}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 2, 2, /* Gather load static, per_elt. */ 2, 2, /* Gather store static, per_elt. */ 64, /* size of l1 cache. */ @@ -936,6 +943,7 @@ struct processor_costs k6_cost = { {2, 2, 8, 16, 32}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 2, 2, /* Gather load static, per_elt. */ 2, 2, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -1059,6 +1067,7 @@ struct processor_costs athlon_cost = { {4, 4, 10, 10, 20}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 5, /* cost of moving SSE register to integer. */ + 5, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 64, /* size of l1 cache. */ @@ -1184,6 +1193,7 @@ struct processor_costs k8_cost = { {4, 4, 10, 10, 20}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 5, /* cost of moving SSE register to integer. */ + 5, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 64, /* size of l1 cache. */ @@ -1322,6 +1332,7 @@ struct processor_costs amdfam10_cost = { {4, 4, 5, 10, 20}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 3, /* cost of moving SSE register to integer. */ + 3, /* cost of moving integer register to SSE. */ 4, 4, /* Gather load static, per_elt. */ 4, 4, /* Gather store static, per_elt. */ 64, /* size of l1 cache. */ @@ -1452,6 +1463,7 @@ const struct processor_costs bdver_cost = { {10, 10, 10, 40, 60}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 16, /* cost of moving SSE register to integer. */ + 16, /* cost of moving integer register to SSE. */ 12, 12, /* Gather load static, per_elt. */ 10, 10, /* Gather store static, per_elt. */ 16, /* size of l1 cache. */ @@ -1603,6 +1615,7 @@ struct processor_costs znver1_cost = { {8, 8, 8, 16, 32}, /* cost of unaligned stores. */ 2, 3, 6, /* cost of moving XMM,YMM,ZMM register. */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ /* VGATHERDPD is 23 uops and throughput is 9, VGATHERDPD is 35 uops, throughput 12. Approx 9 uops do not depend on vector size and every load is 7 uops. */ @@ -1770,6 +1783,7 @@ struct processor_costs znver2_cost = { 2, 2, 3, /* cost of moving XMM,YMM,ZMM register. */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ /* VGATHERDPD is 23 uops and throughput is 9, VGATHERDPD is 35 uops, throughput 12. Approx 9 uops do not depend on vector size and every load is 7 uops. */ @@ -1912,6 +1926,7 @@ struct processor_costs znver3_cost = { 2, 2, 3, /* cost of moving XMM,YMM,ZMM register. */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ /* VGATHERDPD is 15 uops and throughput is 4, VGATHERDPS is 23 uops, throughput 9. Approx 7 uops do not depend on vector size and every load is 4 uops. */ @@ -2056,6 +2071,7 @@ struct processor_costs znver4_cost = { 2, 2, 2, /* cost of moving XMM,YMM,ZMM register. */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ /* VGATHERDPD is 17 uops and throughput is 4, VGATHERDPS is 24 uops, throughput 5. Approx 7 uops do not depend on vector size and every load is 5 uops. */ @@ -2204,6 +2220,7 @@ struct processor_costs znver5_cost = { 2, 2, 2, /* cost of moving XMM,YMM,ZMM register. */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ /* TODO: gather and scatter instructions are currently disabled in x86-tune.def. In some cases they are however a win, see PR116582 @@ -2372,6 +2389,7 @@ struct processor_costs skylake_cost = { {8, 8, 8, 8, 16}, /* cost of unaligned stores. */ 2, 2, 4, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 20, 8, /* Gather load static, per_elt. */ 22, 10, /* Gather store static, per_elt. */ 64, /* size of l1 cache. */ @@ -2508,6 +2526,7 @@ struct processor_costs icelake_cost = { {8, 8, 8, 8, 16}, /* cost of unaligned stores. */ 2, 2, 4, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 20, 8, /* Gather load static, per_elt. */ 22, 10, /* Gather store static, per_elt. */ 64, /* size of l1 cache. */ @@ -2638,6 +2657,7 @@ struct processor_costs alderlake_cost = { {8, 8, 8, 10, 15}, /* cost of unaligned storess. */ 2, 3, 4, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 18, 6, /* Gather load static, per_elt. */ 18, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -2761,6 +2781,7 @@ const struct processor_costs btver1_cost = { {10, 10, 12, 48, 96}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 14, /* cost of moving SSE register to integer. */ + 14, /* cost of moving integer register to SSE. */ 10, 10, /* Gather load static, per_elt. */ 10, 10, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -2881,6 +2902,7 @@ const struct processor_costs btver2_cost = { {10, 10, 12, 48, 96}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 14, /* cost of moving SSE register to integer. */ + 14, /* cost of moving integer register to SSE. */ 10, 10, /* Gather load static, per_elt. */ 10, 10, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3000,6 +3022,7 @@ struct processor_costs pentium4_cost = { {32, 32, 32, 64, 128}, /* cost of unaligned stores. */ 12, 24, 48, /* cost of moving XMM,YMM,ZMM register */ 20, /* cost of moving SSE register to integer. */ + 20, /* cost of moving integer register to SSE. */ 16, 16, /* Gather load static, per_elt. */ 16, 16, /* Gather store static, per_elt. */ 8, /* size of l1 cache. */ @@ -3122,6 +3145,7 @@ struct processor_costs nocona_cost = { {24, 24, 24, 48, 96}, /* cost of unaligned stores. */ 6, 12, 24, /* cost of moving XMM,YMM,ZMM register */ 20, /* cost of moving SSE register to integer. */ + 20, /* cost of moving integer register to SSE. */ 12, 12, /* Gather load static, per_elt. */ 12, 12, /* Gather store static, per_elt. */ 8, /* size of l1 cache. */ @@ -3242,6 +3266,7 @@ struct processor_costs atom_cost = { {16, 16, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 8, /* cost of moving SSE register to integer. */ + 8, /* cost of moving integer register to SSE. */ 8, 8, /* Gather load static, per_elt. */ 8, 8, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3362,6 +3387,7 @@ struct processor_costs slm_cost = { {16, 16, 16, 32, 64}, /* cost of unaligned stores. */ 2, 4, 8, /* cost of moving XMM,YMM,ZMM register */ 8, /* cost of moving SSE register to integer. */ + 8, /* cost of moving integer register to SSE. */ 8, 8, /* Gather load static, per_elt. */ 8, 8, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3494,6 +3520,7 @@ struct processor_costs tremont_cost = { {6, 6, 6, 10, 15}, /* cost of unaligned storess. */ 2, 3, 4, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 18, 6, /* Gather load static, per_elt. */ 18, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3616,6 +3643,7 @@ struct processor_costs intel_cost = { {10, 10, 10, 10, 10}, /* cost of unaligned loads. */ 2, 2, 2, /* cost of moving XMM,YMM,ZMM register */ 4, /* cost of moving SSE register to integer. */ + 4, /* cost of moving integer register to SSE. */ 6, 6, /* Gather load static, per_elt. */ 6, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3731,15 +3759,16 @@ struct processor_costs lujiazui_cost = { {6, 6, 6}, /* cost of loading integer registers in QImode, HImode and SImode. Relative to reg-reg move (2). */ - {6, 6, 6}, /* cost of storing integer registers. */ + {6, 6, 6}, /* cost of storing integer registers. */ {6, 6, 6, 10, 15}, /* cost of loading SSE register - in 32bit, 64bit, 128bit, 256bit and 512bit. */ + in 32bit, 64bit, 128bit, 256bit and 512bit. */ {6, 6, 6, 10, 15}, /* cost of storing SSE register - in 32bit, 64bit, 128bit, 256bit and 512bit. */ + in 32bit, 64bit, 128bit, 256bit and 512bit. */ {6, 6, 6, 10, 15}, /* cost of unaligned loads. */ {6, 6, 6, 10, 15}, /* cost of unaligned storess. */ - 2, 3, 4, /* cost of moving XMM,YMM,ZMM register. */ - 6, /* cost of moving SSE register to integer. */ + 2, 3, 4, /* cost of moving XMM,YMM,ZMM register. */ + 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 18, 6, /* Gather load static, per_elt. */ 18, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3864,6 +3893,7 @@ struct processor_costs yongfeng_cost = { {8, 8, 8, 12, 15}, /* cost of unaligned storess. */ 2, 3, 4, /* cost of moving XMM,YMM,ZMM register. */ 8, /* cost of moving SSE register to integer. */ + 8, /* cost of moving integer register to SSE. */ 18, 6, /* Gather load static, per_elt. */ 18, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -3987,6 +4017,7 @@ struct processor_costs shijidadao_cost = { {8, 8, 8, 12, 15}, /* cost of unaligned storess. */ 2, 3, 4, /* cost of moving XMM,YMM,ZMM register. */ 8, /* cost of moving SSE register to integer. */ + 8, /* cost of moving integer register to SSE. */ 18, 6, /* Gather load static, per_elt. */ 18, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -4116,6 +4147,7 @@ struct processor_costs generic_cost = { {6, 6, 6, 10, 15}, /* cost of unaligned storess. */ 2, 3, 4, /* cost of moving XMM,YMM,ZMM register */ 6, /* cost of moving SSE register to integer. */ + 6, /* cost of moving integer register to SSE. */ 18, 6, /* Gather load static, per_elt. */ 18, 6, /* Gather store static, per_elt. */ 32, /* size of l1 cache. */ @@ -4249,6 +4281,7 @@ struct processor_costs core_cost = { {6, 6, 6, 6, 12}, /* cost of unaligned stores. */ 2, 2, 4, /* cost of moving XMM,YMM,ZMM register */ 2, /* cost of moving SSE register to integer. */ + 2, /* cost of moving integer register to SSE. */ /* VGATHERDPD is 7 uops, rec throughput 5, while VGATHERDPD is 9 uops, rec. throughput 6. So 5 uops statically and one uops per load. */ diff --git a/gcc/config/riscv/riscv-subset.h b/gcc/config/riscv/riscv-subset.h index 559e708..7b3fdae 100644 --- a/gcc/config/riscv/riscv-subset.h +++ b/gcc/config/riscv/riscv-subset.h @@ -82,6 +82,8 @@ private: const char *parse_single_multiletter_ext (const char *, const char *, const char *, bool); + std::string parse_profiles (const char*); + void handle_implied_ext (const char *); bool check_implied_ext (); void handle_combine_ext (); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 51672a7..f9b93e6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2025-05-10 Jason Merrill <jason@redhat.com> + + PR c++/120204 + * pt.cc (tsubst_baselink): Always error if lookup fails. + 2025-05-09 Jason Merrill <jason@redhat.com> * decl2.cc (determine_visibility): Ignore args for friend templates. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index f31d504..a0f1a93 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1268,7 +1268,7 @@ See RS/6000 and PowerPC Options. -mfence-tso -mno-fence-tso -mdiv -mno-div -misa-spec=@var{ISA-spec-string} --march=@var{ISA-string} +-march=@var{ISA-string|Profiles|Profiles_ISA-string} -mtune=@var{processor-string} -mpreferred-stack-boundary=@var{num} -msmall-data-limit=@var{N-bytes} @@ -31115,11 +31115,16 @@ The default is @option{-misa-spec=20191213} unless GCC has been configured with @option{--with-isa-spec=} specifying a different default version. @opindex march -@item -march=@var{ISA-string} -Generate code for given RISC-V ISA (e.g.@: @samp{rv64im}). ISA strings must be -lower-case. Examples include @samp{rv64i}, @samp{rv32g}, @samp{rv32e}, and -@samp{rv32imaf}. Additionally, a special value @option{help} -(@option{-march=help}) is accepted to list all supported extensions. +@item -march=@var{ISA-string|Profiles|Profile_ISA-string} +Generate code for given RISC-V ISA or Profiles or a combination of them +(e.g.@: @samp{rv64im} @samp{rvi20u64} @samp{rvi20u64_zbb}). ISA strings and +Profiles must be lower-case. Examples include @samp{rv64i}, @samp{rv32g}, +@samp{rv32e}, @samp{rv32imaf}, @samp{rva22u64} and @samp{rva23u64}. +To combine Profiles and optional RISC-V ISA extention, the profile should start +at the beginning of the option, then use underline connect ISA-string (e.g.@: +@samp{rvi20u64_zca_zcb} @samp{rva23u64_zacas}). Additionally, a special value +@option{help} (@option{-march=help}) is accepted to list all supported +extensions. The syntax of the ISA string is defined as follows: diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 7298ffc..b3f63e0 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,19 @@ +2025-05-10 Harald Anlauf <anlauf@gmx.de> + + PR fortran/102891 + * dependency.cc (gfc_ref_needs_temporary_p): Within an array + reference, inquiry references of complex variables generally + need a temporary. + +2025-05-10 Jakub Jelinek <jakub@redhat.com> + + PR fortran/120193 + * trans-types.cc (gfc_init_types): For flag_unsigned use + build_distinct_type_copy or build_variant_type_copy from + gfc_character_types[index_char] if index_char > -1 instead of + gfc_character_types[index_char] or + gfc_build_unsigned_type (&gfc_unsigned_kinds[index]). + 2025-05-08 Harald Anlauf <anlauf@gmx.de> PR fortran/120179 diff --git a/gcc/fortran/dependency.cc b/gcc/fortran/dependency.cc index 57c0c49..aa8a57a 100644 --- a/gcc/fortran/dependency.cc +++ b/gcc/fortran/dependency.cc @@ -944,8 +944,12 @@ gfc_ref_needs_temporary_p (gfc_ref *ref) types), not in characters. */ return subarray_p; - case REF_COMPONENT: case REF_INQUIRY: + /* Within an array reference, inquiry references of complex + variables generally need a temporary. */ + return subarray_p; + + case REF_COMPONENT: break; } diff --git a/gcc/fortran/trans-types.cc b/gcc/fortran/trans-types.cc index 3374778..f898075 100644 --- a/gcc/fortran/trans-types.cc +++ b/gcc/fortran/trans-types.cc @@ -1140,11 +1140,6 @@ gfc_init_types (void) } gfc_character1_type_node = gfc_character_types[0]; - /* The middle end only recognizes a single unsigned type. For - compatibility of existing test cases, let's just use the - character type. The reader of tree dumps is expected to be able - to deal with this. */ - if (flag_unsigned) { for (index = 0; gfc_unsigned_kinds[index].kind != 0;++index) @@ -1159,18 +1154,26 @@ gfc_init_types (void) break; } } - if (index_char > 0) + if (index_char > -1) { - gfc_unsigned_types[index] = gfc_character_types[index_char]; + type = gfc_character_types[index_char]; + if (TYPE_STRING_FLAG (type)) + { + type = build_distinct_type_copy (type); + TYPE_CANONICAL (type) + = TYPE_CANONICAL (gfc_character_types[index_char]); + } + else + type = build_variant_type_copy (type); + TYPE_NAME (type) = NULL_TREE; + TYPE_STRING_FLAG (type) = 0; } else - { - type = gfc_build_unsigned_type (&gfc_unsigned_kinds[index]); - gfc_unsigned_types[index] = type; - snprintf (name_buf, sizeof(name_buf), "unsigned(kind=%d)", - gfc_integer_kinds[index].kind); - PUSH_TYPE (name_buf, type); - } + type = gfc_build_unsigned_type (&gfc_unsigned_kinds[index]); + gfc_unsigned_types[index] = type; + snprintf (name_buf, sizeof(name_buf), "unsigned(kind=%d)", + gfc_integer_kinds[index].kind); + PUSH_TYPE (name_buf, type); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ce230e0..5a6b911 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,58 @@ +2025-05-10 Robert Dubner <rdubner@symas.com> + + * cobol.dg/group1/simple-if.cob: Make explicitly >>SOURCE FREE + +2025-05-10 Harald Anlauf <anlauf@gmx.de> + + PR fortran/102891 + * gfortran.dg/transfer_array_subref.f90: New test. + +2025-05-10 Jan Hubicka <hubicka@ucw.cz> + + * gcc.target/i386/minmax-6.c: xfail test that pmax is used. + * gcc.target/i386/minmax-7.c: xfall test that pmin is used. + +2025-05-10 Jakub Jelinek <jakub@redhat.com> + + PR fortran/120193 + * gfortran.dg/guality/pr120193.f90: New test. + +2025-05-10 Filip Kastl <fkastl@suse.cz> + + * gcc.target/aarch64/pr99988.c: Add -fno-bit-tests. + +2025-05-10 Filip Kastl <fkastl@suse.cz> + + PR tree-optimization/120080 + * gcc.dg/tree-ssa/pr120080.c: New test. + +2025-05-10 Co-authored-by: Jeff Law <jlaw@ventanamicro.com> + + * gcc.target/riscv/ior-synthesis-1.c: New test. + * gcc.target/riscv/ior-synthesis-2.c: New test. + * gcc.target/riscv/xor-synthesis-1.c: New test. + * gcc.target/riscv/xor-synthesis-2.c: New test. + * gcc.target/riscv/xor-synthesis-3.c: New test. + +2025-05-10 Anton Blanchard <antonb@tenstorrent.com> + + * gcc.target/riscv/rvv/base/crc-builtin-zvbc.c: New test. + +2025-05-10 Alexandre Oliva <oliva@adacore.com> + + * gcc.dg/pr87600.h (REG1, REG2): Test for __PPC__ as well. + * gcc.dg/pr89313.c (REG): Likewise. + +2025-05-10 Alexandre Oliva <oliva@adacore.com> + + * gcc.target/powerpc/block-cmp-8.c: Require powerpc64 + instruction execution support. + +2025-05-10 Jason Merrill <jason@redhat.com> + + PR c++/120204 + * g++.dg/cpp1y/constexpr-recursion3.C: New test. + 2025-05-09 Jason Merrill <jason@redhat.com> PR c++/99599 diff --git a/gcc/testsuite/cobol.dg/group1/simple-if.cob b/gcc/testsuite/cobol.dg/group1/simple-if.cob index 6cf6ec6..bdf11ec 100644 --- a/gcc/testsuite/cobol.dg/group1/simple-if.cob +++ b/gcc/testsuite/cobol.dg/group1/simple-if.cob @@ -19,7 +19,7 @@ *> { dg-output {CORRECTLY_TRUE: A_4 NOT = B_4(\n|\r\n|\r)} } *> { dg-output {CORRECTLY_ELSE: A_4 NOT > B_4(\n|\r\n|\r)} } *> { dg-output { } } -* Not strictly Reference Format + >>SOURCE FREE IDENTIFICATION DIVISION. PROGRAM-ID. test. DATA DIVISION. diff --git a/gcc/testsuite/gcc.dg/torture/pr119131-1.c b/gcc/testsuite/gcc.dg/torture/pr119131-1.c index c62f702..1780035 100644 --- a/gcc/testsuite/gcc.dg/torture/pr119131-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr119131-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target dfp } */ +/* { dg-additional-options "-Wno-psabi" } */ /* PR target/119131 */ typedef __attribute__((__vector_size__ (64))) char C; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr120080.c b/gcc/testsuite/gcc.dg/tree-ssa/pr120080.c new file mode 100644 index 0000000..d71ef5e --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr120080.c @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-fgimple -O2" } */ + +void __GIMPLE (ssa,startwith("switchlower1")) +foo (int b) +{ + __BB(2): + switch (b) {default: L9; case 0: L5; case 5: L5; case 101: L5; } + + __BB(3): +L9: + switch (b) {default: L7; case 5: L6; case 101: L6; } + + __BB(4): +L6: + __builtin_unreachable (); + + __BB(5): +L7: + __builtin_trap (); + + __BB(6): +L5: + return; + +} diff --git a/gcc/testsuite/gcc.target/aarch64/pr99988.c b/gcc/testsuite/gcc.target/aarch64/pr99988.c index 7cca496..c09ce67 100644 --- a/gcc/testsuite/gcc.target/aarch64/pr99988.c +++ b/gcc/testsuite/gcc.target/aarch64/pr99988.c @@ -1,5 +1,5 @@ /* { dg-do compile { target lp64 } } */ -/* { dg-options "-O2 -mbranch-protection=standard" } */ +/* { dg-options "-O2 -mbranch-protection=standard -fno-bit-tests" } */ /* { dg-final { scan-assembler-times {bti j} 13 } } */ int a; int c(); diff --git a/gcc/testsuite/gcc.target/i386/minmax-6.c b/gcc/testsuite/gcc.target/i386/minmax-6.c index 615f919..23f61c5 100644 --- a/gcc/testsuite/gcc.target/i386/minmax-6.c +++ b/gcc/testsuite/gcc.target/i386/minmax-6.c @@ -15,4 +15,4 @@ UMVLine16Y_11 (short unsigned int * Pic, int y, int width) /* We do not want the RA to spill %esi for it's dual-use but using pmaxsd is OK. */ /* { dg-final { scan-assembler-not "rsp" { target { ! { ia32 } } } } } */ -/* { dg-final { scan-assembler "pmaxsd" } } */ +/* { dg-final { scan-assembler "pmaxsd" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.target/i386/minmax-7.c b/gcc/testsuite/gcc.target/i386/minmax-7.c index 619a939..b2cb1c2 100644 --- a/gcc/testsuite/gcc.target/i386/minmax-7.c +++ b/gcc/testsuite/gcc.target/i386/minmax-7.c @@ -17,4 +17,4 @@ void bar (int aleft, int axcenter) /* We do not want the RA to spill %esi for it's dual-use but using pminsd is OK. */ /* { dg-final { scan-assembler-not "rsp" { target { ! { ia32 } } } } } */ -/* { dg-final { scan-assembler "pminsd" } } */ +/* { dg-final { scan-assembler "pminsd" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.target/riscv/arch-49.c b/gcc/testsuite/gcc.target/riscv/arch-49.c new file mode 100644 index 0000000..6b86ae9 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-49.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rvi20u64 -mabi=lp64" } */ +int +foo () +{} diff --git a/gcc/testsuite/gcc.target/riscv/arch-50.c b/gcc/testsuite/gcc.target/riscv/arch-50.c new file mode 100644 index 0000000..072180d --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-50.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rvi20u64_mafdc -mabi=lp64d" } */ +#if !(defined __riscv_mul) || \ + !(defined __riscv_atomic) || \ + !(defined __riscv_flen) || \ + !(defined __riscv_div) || \ + !(defined __riscv_compressed) +#error "Feature macros not defined" +#endif +int +foo () +{} diff --git a/gcc/testsuite/gcc.target/riscv/arch-51.c b/gcc/testsuite/gcc.target/riscv/arch-51.c new file mode 100644 index 0000000..5af983c --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-51.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rva20u64 -mabi=lp64d" } */ +#if !(defined __riscv_mul) || \ + !(defined __riscv_atomic) || \ + !(defined __riscv_flen) || \ + !(defined __riscv_div) || \ + !(defined __riscv_compressed) +#error "Feature macros not defined" +#endif +int +foo () +{} diff --git a/gcc/testsuite/gcc.target/riscv/arch-52.c b/gcc/testsuite/gcc.target/riscv/arch-52.c new file mode 100644 index 0000000..da6aea8 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-52.c @@ -0,0 +1,6 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rva22u64v -mabi=lp64" } */ +/* { dg-warning "*Should use \"_\" to contact Profiles with other extensions" } */ +int +foo () +{} diff --git a/gcc/testsuite/gcc.target/riscv/arch-53.c b/gcc/testsuite/gcc.target/riscv/arch-53.c new file mode 100644 index 0000000..8210978 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-53.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rva23u64 -mabi=lp64d" } */ + +void foo(){} + +/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0" +"_b1p0_v1p0_zic64b1p0_zicbom1p0_zicbop1p0_zicboz1p0_ziccamoa1p0_ziccif1p0_zicclsm1p0" +_ziccrse1p0_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0" +_za64rs1p0_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0" +_zba1p0_zbb1p0_zbs1p0_zkt1p0_zvbb1p0_zve32f1p0_zve32x1p0_zve64d1p0_zve64f1p0_zve64x1p0" +_zvfhmin1p0_zvkb1p0_zvkt1p0_zvl128b1p0_zvl32b1p0_zvl64b1p0\"" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/arch-54.c b/gcc/testsuite/gcc.target/riscv/arch-54.c new file mode 100644 index 0000000..6d242df --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-54.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rvb23u64 -mabi=lp64d" } */ + +void foo(){} + +/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2_d2p2_c2p0" +"_b1p0_zic64b1p0_zicbom1p0_zicbop1p0_zicboz1p0_ziccamoa1p0_ziccif1p0_zicclsm1p0_ziccrse1p0" +"_zicntr2p0_zicond1p0_zicsr2p0_zihintntl1p0_zihintpause2p0_zihpm2p0_zimop1p0_za64rs1p0" +"_zaamo1p0_zalrsc1p0_zawrs1p0_zfa1p0_zfhmin1p0_zca1p0_zcb1p0_zcd1p0_zcmop1p0_zba1p0" +"_zbb1p0_zbs1p0_zkt1p0\"" } } */ diff --git a/gcc/testsuite/gfortran.dg/guality/pr120193.f90 b/gcc/testsuite/gfortran.dg/guality/pr120193.f90 new file mode 100644 index 0000000..e65febf --- /dev/null +++ b/gcc/testsuite/gfortran.dg/guality/pr120193.f90 @@ -0,0 +1,26 @@ +! PR fortran/120193 +! { dg-do run } +! { dg-options "-g -funsigned" } +! { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } + +program foo + unsigned(kind=1) :: a(2), e + unsigned(kind=2) :: b(2), f + unsigned(kind=4) :: c(2), g + unsigned(kind=8) :: d(2), h + character(kind=1, len=1) :: i(2), j + character(kind=4, len=1) :: k(2), l + a = 97u_1 ! { dg-final { gdb-test 24 "a" "d" } } + b = 97u_2 ! { dg-final { gdb-test 24 "b" "c" } } + c = 97u_4 ! { dg-final { gdb-test 24 "c" "b" } } + d = 97u_8 ! { dg-final { gdb-test 24 "d" "a" } } + e = 97u_1 ! { dg-final { gdb-test 24 "e" "97" } } + f = 97u_2 ! { dg-final { gdb-test 24 "f" "97" } } + g = 97u_4 ! { dg-final { gdb-test 24 "g" "97" } } + h = 97u_8 ! { dg-final { gdb-test 24 "h" "97" } } + i = 'a' ! { dg-final { gdb-test 24 "i" "('a', 'a')" } } + j = 'b' ! { dg-final { gdb-test 24 "j" "'b'" } } + k = 'c' + l = 'd' + print *, a +end program diff --git a/gcc/testsuite/gfortran.dg/transfer_array_subref.f90 b/gcc/testsuite/gfortran.dg/transfer_array_subref.f90 new file mode 100644 index 0000000..b480dff --- /dev/null +++ b/gcc/testsuite/gfortran.dg/transfer_array_subref.f90 @@ -0,0 +1,48 @@ +! { dg-do run } +! { dg-additional-options "-O2 -fdump-tree-optimized" } +! +! PR fortran/102891 - passing of inquiry ref of complex array to TRANSFER + +program main + implicit none + integer, parameter :: dp = 8 + + type complex_wrap1 + complex(dp) :: z(2) + end type complex_wrap1 + + type complex_wrap2 + complex(dp), dimension(:), allocatable :: z + end type complex_wrap2 + + type(complex_wrap1) :: x = complex_wrap1([ (1, 2), (3, 4) ]) + type(complex_wrap2) :: w + + w%z = x%z + + ! The following statements should get optimized away... + if (size (transfer ( x%z%re ,[1.0_dp])) /= 2) error stop 1 + if (size (transfer ((x%z%re),[1.0_dp])) /= 2) error stop 2 + if (size (transfer ([x%z%re],[1.0_dp])) /= 2) error stop 3 + if (size (transfer ( x%z%im ,[1.0_dp])) /= 2) error stop 4 + if (size (transfer ((x%z%im),[1.0_dp])) /= 2) error stop 5 + if (size (transfer ([x%z%im],[1.0_dp])) /= 2) error stop 6 + + ! ... while the following may not: + if (any (transfer ( x%z%re ,[1.0_dp]) /= x%z%re)) stop 7 + if (any (transfer ( x%z%im ,[1.0_dp]) /= x%z%im)) stop 8 + + if (size (transfer ( w%z%re ,[1.0_dp])) /= 2) stop 11 + if (size (transfer ((w%z%re),[1.0_dp])) /= 2) stop 12 + if (size (transfer ([w%z%re],[1.0_dp])) /= 2) stop 13 + if (size (transfer ( w%z%im ,[1.0_dp])) /= 2) stop 14 + if (size (transfer ((w%z%im),[1.0_dp])) /= 2) stop 15 + if (size (transfer ([w%z%im],[1.0_dp])) /= 2) stop 16 + + if (any (transfer ( w%z%re ,[1.0_dp]) /= x%z%re)) stop 17 + if (any (transfer ( w%z%im ,[1.0_dp]) /= x%z%im)) stop 18 + + deallocate (w%z) +end program main + +! { dg-final { scan-tree-dump-not "_gfortran_error_stop_numeric" "optimized" } } diff --git a/gcc/tree-switch-conversion.cc b/gcc/tree-switch-conversion.cc index dea217a..bd4de96 100644 --- a/gcc/tree-switch-conversion.cc +++ b/gcc/tree-switch-conversion.cc @@ -1793,12 +1793,14 @@ bit_test_cluster::find_bit_tests (vec<cluster *> &clusters, int max_c) end up with as few clusters as possible. */ unsigned l = clusters.length (); - auto_vec<min_cluster_item> min; - min.reserve (l + 1); - gcc_checking_assert (l > 0); + if (l == 0) + return clusters.copy (); gcc_checking_assert (l <= INT_MAX); + auto_vec<min_cluster_item> min; + min.reserve (l + 1); + int bits_in_word = GET_MODE_BITSIZE (word_mode); /* First phase: Compute the minimum number of clusters for each prefix of the diff --git a/libgcobol/ChangeLog b/libgcobol/ChangeLog index 47f087d..fe41ffb 100644 --- a/libgcobol/ChangeLog +++ b/libgcobol/ChangeLog @@ -1,3 +1,9 @@ +2025-05-10 Robert Dubner <rdubner@symas.com> + + * common-defs.h (ec_cmp): Delete "getenv("match_declarative")" calls. + (enabled_exception_match): Delete "getenv("match_declarative")" calls. + * libgcobol.cc: Eliminate __gg__odo_violation. + 2025-05-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure.ac: Handle --enable-libgcobol. diff --git a/libgcobol/common-defs.h b/libgcobol/common-defs.h index d088fff..026f377 100644 --- a/libgcobol/common-defs.h +++ b/libgcobol/common-defs.h @@ -409,11 +409,6 @@ enum module_type_t { static bool ec_cmp( ec_type_t raised, ec_type_t ec ) { - if( getenv("match_declarative") ) - { - fprintf(stderr, " ec_cmp %x %x\n", raised, ec); - } - if( raised == ec ) return true; // If both low bytes are nonzero, we had to match exactly, above. @@ -605,9 +600,6 @@ T enabled_exception_match( T beg, T end, ec_type_t type, size_t file ) { return elem.file == 0 && ec_cmp(ec, elem.ec); } ); - } else { - if( getenv("match_declarative") ) - fprintf(stderr, " enabled_exception_match found %x in input\n", type); } return output; } diff --git a/libgcobol/libgcobol.cc b/libgcobol/libgcobol.cc index d5fa5b1..2de87cb 100644 --- a/libgcobol/libgcobol.cc +++ b/libgcobol/libgcobol.cc @@ -131,7 +131,6 @@ int __gg__exception_line_number = 0 ; const char *__gg__exception_statement = NULL ; int __gg__default_compute_error = 0 ; int __gg__rdigits = 0 ; -int __gg__odo_violation = 0 ; int __gg__nop = 0 ; int __gg__main_called = 0 ; diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 8c4a7ee..d36fcc1 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,7 @@ +2025-05-10 Yuao Ma <c8ef@outlook.com> + + * io/read.c (read_f): Comment typo, explict -> explicit. + 2025-05-08 Jakub Jelinek <jakub@redhat.com> PR libfortran/120158 diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index a8a6a69..e34d31b 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -1375,7 +1375,7 @@ exponent: /* At this point a digit string is required. We calculate the value of the exponent in order to take account of the scale factor and - the d parameter before explict conversion takes place. */ + the d parameter before explicit conversion takes place. */ if (w == 0) { diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a4c2d7c..94d4d02 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2025-05-10 Alexandre Oliva <oliva@adacore.com> + + * src/c++23/print.cc [__VXWORKS__]: Include ioLib.h. + 2025-05-09 Tomasz KamiĆski <tkaminsk@redhat.com> * include/bits/chrono_io.h (__formatter_chrono::_M_format_to): |