00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 extern char release_level[];
00044 extern char frontend_version[];
00045
00046
00047
00048
00049
00050
00051 static char comp_date_time[DATE_TIME_STR_SIZE];
00052
00053 static char compiler_gen_time[] = __TIME__;
00054 static long max_field_len;
00055
00056
00057
00058
00059
00060 enum language {Pdgcs_Ansi_C = 1, Pdgcs_Fortran_77,
00061 Pdgcs_Fortran_90, Pdgcs_Fortran_77_MPP,
00062 Pdgcs_Fortran_90_MPP, Pdgcs_Other_Lang
00063 };
00064
00065
00066
00067
00068
00069
00070 ac_cmd_line_flags_type ac_cmd_line_flags;
00071 char *basic_type_str[] = {
00072 "INTEGER",
00073 "LOGICAL",
00074 "REAL",
00075 "COMPLEX",
00076 "Cray pointer",
00077 "Cray parcel pointer",
00078 "Cray character pointer",
00079 "typeless",
00080 "CHARACTER",
00081 "derived-type"
00082 };
00083
00084 char assembly_file[MAX_FILE_NAME_SIZE];
00085 char assembly_listing_file[MAX_FILE_NAME_SIZE];
00086 boolean assembly_output = FALSE;
00087 char bin_file[MAX_FILE_NAME_SIZE];
00088 boolean binary_output = FALSE;
00089 char dot_i_file[MAX_FILE_NAME_SIZE];
00090
00091 char debug_file_name[MAX_FILE_NAME_SIZE];
00092
00093 long ccg_dump_flags;
00094
00095 FILE *c_i_f;
00096
00097 FILE *cif_actual_file;
00098
00099
00100
00101
00102
00103
00104 int cif_C_opts;
00105
00106 boolean cif_first_pgm_unit;
00107 int cif_flags;
00108 int cif_internal_proc_start_line;
00109 int cif_module_proc_start_line;
00110 boolean cif_need_unit_rec;
00111 int cif_pgm_unit_start_line;
00112
00113
00114
00115
00116
00117
00118 boolean cif_tmp_so_no_msg = FALSE;
00119
00120
00121
00122
00123 FILE *cif_tmp_file;
00124
00125 boolean clearing_blk_stk;
00126 cmd_line_flags_type cmd_line_flags;
00127 int code_size = 0;
00128 int comp_phase;
00129 char compiler_gen_date[] = __DATE__;
00130 int contig_test_ir_idx = NULL_IDX;
00131 convert_to_string_type convert_to_string_fmt = Dont_Care;
00132 int curr_debug_lbl;
00133 int curr_glb_line = 0;
00134 int curr_internal_lbl;
00135 int curr_scp_idx;
00136 int curr_stmt_sh_idx;
00137 int curr_gl_stmt_sh_idx = NULL_IDX;
00138 int global_stmt_sh_idx = NULL_IDX;
00139 int const_safevl_idx;
00140 int data_size = 0;
00141
00142 linear_type_type default_linear_type[Num_Fortran_Types];
00143 long *dt_cmp_tbl = NULL;
00144 char *dir_mic_str[Tok_Mic_End-Tok_Mic_Start] =
00145 {" ",
00146 "CONTINUE",
00147 "CNCALL",
00148 "CASE",
00149 "DOPARALLEL",
00150 "DOALL",
00151 "ENDPARALLEL",
00152 "ENDGUARD",
00153 "ENDCASE",
00154 "ENDDO",
00155 "GUARD",
00156 "IF",
00157 "MAXCPUS",
00158 "NUMCPUS",
00159 "PERMUTATION",
00160 "PARALLEL",
00161 "POINT",
00162 "SEND",
00163 "SPAN",
00164 "TASKCOMMON",
00165 "WAIT"};
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177 char *directive_str[Tok_Dir_End-Tok_Dir_Start] =
00178 {" ",
00179 "ALIGN",
00180 "ATOMIC UPDATE",
00181 "AUTOSCOPE",
00182 "AUXILIARY",
00183 "BARRIER",
00184 "BL",
00185 "BLOCK",
00186 "BOUNDS",
00187 "CACHE_ALIGN",
00188 "CACHE_BYPASS",
00189 "CHUNKSIZE",
00190 "CNCALL",
00191 "CODE",
00192 "COMMON",
00193 "CONCURRENT",
00194 "CONTROL",
00195 "COPY_ASSUMED_SHAPE",
00196 "CRITICAL",
00197 "DOSHARED",
00198 "DYNAMIC",
00199 "EJECT",
00200 "END CRITICAL",
00201 "END MASTER",
00202 "FIXED",
00203 "FLOW",
00204 "FREE",
00205 "GEOMETRY",
00206 "GETFIRST",
00207 "GUIDED",
00208 "ID",
00209 "IF",
00210 "IGNORE_TKR",
00211 "INLINE",
00212 "INLINEALWAYS",
00213 "INLINENEVER",
00214 "INTEGER",
00215 "IVDEP",
00216 "LIST",
00217 "MASTER",
00218 "MAXCPUS",
00219 "MODINLINE",
00220 "NAME",
00221 "NCPUS_CHUNKS",
00222 "NEXTSCALAR",
00223 "NO BARRIER",
00224 "NOBL",
00225 "NOBOUNDS",
00226 "NOCODE",
00227 "NOFLOW",
00228 "NOINLINE",
00229 "NOINTERCHANGE",
00230 "NOLIST",
00231 "NOMARK",
00232 "NOMODINLINE",
00233 "NOPATTERN",
00234 "NORECURRENCE",
00235 "NOSIDEEFFECTS",
00236 "NOSPLIT",
00237 "NOTASK",
00238 "NOUNROLL",
00239 "NOVECTOR",
00240 "NOVSEARCH",
00241 "NUMCHUNKS",
00242 "NUMCPUS",
00243 "PARALLEL_ONLY",
00244 "PATTERN",
00245 "PE_PRIVATE",
00246 "PE_RESIDENT",
00247 "PERMUTATION",
00248 "PREFERTASK",
00249 "PREFERVECTOR",
00250 "PRIVATE",
00251 "RECURRENCE",
00252 "REGFILE",
00253 "SAVELAST",
00254 "SEMEXTERN",
00255 "SERIAL_ONLY",
00256 "SHARED",
00257 "SHORTLOOP",
00258 "SHORTSEQUENCE",
00259 "SINGLE",
00260 "SPLIT",
00261 "STACK",
00262 "STATIC",
00263 "SUPPRESS",
00264 "SYMMETRIC",
00265 "SYSTEM_MODULE",
00266 "TASK",
00267 "TASKCOMMON",
00268 "TASKHEAD",
00269 "UNKNOWN",
00270 "UNKNOWN_SHARED",
00271 "UNROLL",
00272 "USES_EREGS",
00273 "VECTOR",
00274 "VFUNCTION",
00275 "VSEARCH",
00276 "null",
00277 "null",
00278 "null",
00279 "null",
00280 "null",
00281 "null",
00282 "null",
00283 "null",
00284 "null",
00285 "null"};
00286
00287 boolean disregard_directive[Tok_Dir_End-Tok_Dir_Start];
00288 boolean disregard_mics[Tok_Mic_End-Tok_Mic_Start];
00289 boolean disregard_mips
00290 [Tok_SGI_Dir_End-Tok_SGI_Dir_Start];
00291 boolean disregard_open_mp
00292 [Tok_Open_Mp_Dir_End-Tok_Open_Mp_Dir_Start];
00293 boolean disregard_openad
00294 [Tok_OpenAD_Dir_End-Tok_OpenAD_Dir_Start];
00295 dump_flags_type dump_flags;
00296
00297 int expanded_intrinsic_list = NULL_IDX;
00298 expr_mode_type expr_mode = Regular_Expr;
00299
00300 void (*get_char) ();
00301 void (*get_char_literal) ();
00302
00303 long glb_tbl_idx[Num_Glb_Tbl_Idxs];
00304
00305 boolean have_unnamed_pgm_unit = FALSE;
00306 boolean need_pure_function = FALSE;
00307 boolean have_main_pgm_unit = FALSE;
00308
00309 boolean in_action_stmt_of_if_where_or_forall = FALSE;
00310
00311 int include_path_idx = NULL_IDX;
00312
00313 opnd_type init_target_opnd = INIT_OPND_TYPE;
00314
00315 boolean inline_global_sgi = FALSE;
00316 boolean noinline_global_sgi = FALSE;
00317
00318 int inline_path_idx = NULL_IDX;
00319
00320 boolean issue_overflow_msg_719 = TRUE;
00321
00322 long max_call_list_size = 0;
00323 long_type max_character_length = 0;
00324
00325 long mc_tbl[128];
00326 char mod_out_path[MAX_FILE_NAME_SIZE];
00327
00328 int module_path_idx = NULL_IDX;
00329
00330 boolean need_new_sh;
00331 boolean need_to_issue_719 = FALSE;
00332
00333 opnd_type null_opnd = INIT_OPND_TYPE;
00334 int num_ansi = 0;
00335 int num_cautions = 0;
00336 int num_comments = 0;
00337 int num_errors = 0;
00338 int num_notes = 0;
00339 int num_optz_msgs = 0;
00340 int num_warnings = 0;
00341
00342 int statement_number = 0;
00343
00344 int num_prog_unit_errors;
00345 int num_of_derived_types;
00346
00347 on_off_flags_type on_off_flags;
00348 opt_flags_type opt_flags;
00349
00350 char parse_operand_insert[40] = "operand";
00351 int pgm_unit_start_line = 0;
00352 char preinline_file[MAX_FILE_NAME_SIZE];
00353 int prev_statement_number = 0;
00354 char program_unit_name[MAX_ID_LEN+1] =
00355 UNNAMED_PROGRAM_NAME;
00356
00357 int sb_len[End_Name_Blk] = {5,6,10,8,11,5,4,12,6,6};
00358
00359 # if defined(_NO_AT_SIGN_IN_NAMES)
00360 char *sb_name[End_Name_Blk] = {
00361 ".WHAT",
00362 ".BASED",
00363 ".DATA_INIT",
00364 ".POINTEE",
00365 ".STACK_HOST",
00366 ".DATA",
00367 ".SYM",
00368 ".DATA_UNINIT",
00369 ".STACK",
00370 ".DARGS"};
00371 # else
00372 char *sb_name[End_Name_Blk] = {
00373 "@WHAT",
00374 "@BASED",
00375 "@DATA_INIT",
00376 "@POINTEE",
00377 "@STACK_HOST",
00378 "@DATA",
00379 "@SYM",
00380 "@DATA_UNINIT",
00381 "@STACK",
00382 "@DARGS"};
00383 # endif
00384
00385 src_form_type source_form;
00386 char src_file[MAX_FILE_NAME_SIZE];
00387 int stmt_end_col;
00388 int stmt_end_line;
00389 int stmt_label_idx;
00390 int stmt_start_col;
00391 int stmt_start_line;
00392 stmt_type_type stmt_type;
00393
00394 char *stmt_type_str[] = {"?????",
00395 "ALLOCATABLE",
00396 "AUTOMATIC",
00397 "COMMON",
00398 "CONTAINS",
00399 "component-def-stmt",
00400 "DATA",
00401 "TYPE type-name",
00402 "DIMENSION",
00403 "DIRECTIVE",
00404 "EQUIVALENCE",
00405 "EXTERNAL",
00406 "FORMAT",
00407 "IMPLICIT",
00408 "IMPLICIT NONE",
00409 "INTENT",
00410 "INTERFACE",
00411 "INTRINSIC",
00412 "MODULE PROCEDURE",
00413 "NAMELIST",
00414 "OPTIONAL",
00415 "PARAMETER",
00416 "POINTER",
00417 "PRIVATE",
00418 "PUBLIC",
00419 "SAVE",
00420 "SEQUENCE",
00421 "statement-function",
00422 "TARGET",
00423 "TASK COMMON",
00424 "type-declaration",
00425 "USE",
00426
00427 "BLOCKDATA",
00428 "ELEMENTAL",
00429 "FUNCTION",
00430 "MODULE",
00431 "PROGRAM",
00432 "PURE",
00433 "RECURSIVE",
00434 "SUBROUTINE",
00435
00436 "END BLOCKDATA",
00437 "END DO",
00438 "END FUNCTION",
00439 "END IF",
00440 "END INTERFACE",
00441 "END MODULE",
00442 "END PROGRAM",
00443 "END SELECT",
00444 "END",
00445 "END SUBROUTINE",
00446 "END TYPE",
00447 "END WHERE",
00448
00449 "ALLOCATE",
00450 "arithmetic IF",
00451 "ASSIGN",
00452 "assignment",
00453 "BACKSPACE",
00454 "BUFFER",
00455 "CALL",
00456 "CASE",
00457 "CLOSE",
00458 "CONTINUE",
00459 "CYCLE",
00460 "DEALLOCATE",
00461 "DECODE",
00462 "DO",
00463 "DO WHILE",
00464 "DO",
00465 "ELSE",
00466 "ELSE IF",
00467 "ELSE WHERE",
00468 "ENCODE",
00469 "ENDFILE",
00470 "ENTRY",
00471 "EXIT",
00472 "GO TO",
00473 "IF THEN",
00474 "IF",
00475 "INQUIRE",
00476 "NULLIFY",
00477 "OPEN",
00478 "Outmoded IF",
00479 "PAUSE",
00480 "PRINT",
00481 "READ",
00482 "RETURN",
00483 "REWIND",
00484 "SELECT CASE",
00485 "STOP",
00486 "THEN",
00487 "WHERE construct",
00488 "WHERE",
00489 "WRITE",
00490 "Type Init",
00491
00492 "Label Def",
00493 "Construct Def",
00494 "Automatic Base Calc",
00495 "Automatic Base Size",
00496
00497 "END PARALLEL",
00498 "END DO PARALLEL",
00499 "END PARALLEL CASE",
00500 "PARALLEL CASE",
00501 "END GUARD",
00502 "STATEMENT NUM",
00503 "SECTION",
00504 "END PSECTION",
00505 "END PDO",
00506 "SGI END PARALLEL",
00507 "END CRITICAL SECTION",
00508 "END SINGLE PROCESS",
00509 "REGION END",
00510 "OPEN MP SECTION",
00511 "OPEN MP END PARALLEL",
00512 "OPEN MP END DO",
00513 "OPEN MP END PARALLEL SECTIONS",
00514 "OPEN MP END SECTIONS",
00515 "OPEN MP END SECTION",
00516 "OPEN MP END SINGLE",
00517 "OPEN MP END PARALLEL DO",
00518 "OPEN MP END MASTER",
00519 "OPEN MP END CRITICAL",
00520 "OPEN MP END ORDERED",
00521 "OPEN MP END PARALLEL WORKSHARE",
00522 "OPEN MP END WORKSHARE",
00523 "FORALL Construct",
00524 "FORALL",
00525 "END FORALL",
00526 "ELSE WHERE MASK",
00527 "VOLATILE"
00528 };
00529
00530 target_machine_type target_machine;
00531 boolean target_ieee = FALSE;
00532 int target_safevl = DEFAULT_SAFEVL;
00533 boolean target_sv1 = FALSE;
00534 boolean target_triton = FALSE;
00535 boolean target_t3e = FALSE;
00536 int target_os;
00537 boolean host_ieee = FALSE;
00538 long true_value = -1;
00539
00540
00541
00542
00543
00544
00545
00546
00547 la_type la_ch;
00548 token_type token;
00549
00550
00551
00552
00553
00554
00555
00556 boolean sig_blank = FALSE;
00557 la_type stmt_EOS_la_ch = {EOS,
00558 Ch_Class_EOS,
00559 0,
00560 0
00561 };
00562
00563
00564
00565
00566
00567 boolean is_namelist;
00568 int imp_do_var_list = NULL_IDX;
00569 boolean two_word_fcd;
00570 boolean char_len_in_bytes;
00571
00572
00573
00574
00575
00576 boolean in_call_list = FALSE;
00577 boolean in_branch_true = FALSE;
00578 boolean defer_stmt_expansion = FALSE;
00579 boolean no_func_expansion = FALSE;
00580
00581 int number_of_functions = 0;
00582 boolean io_item_must_flatten = FALSE;
00583 boolean tree_has_constructor = FALSE;
00584
00585 boolean in_implied_do = FALSE;
00586
00587 boolean in_constructor = FALSE;
00588
00589 boolean in_io_list = FALSE;
00590
00591 boolean comp_gen_expr = FALSE;
00592
00593 boolean parsing_kind_selector = FALSE;
00594
00595 long message_error_tbl[MAX_MSG_SIZE];
00596 long message_suppress_tbl[MAX_MSG_SIZE];
00597 long message_warning_tbl[MAX_MSG_SIZE];
00598
00599
00600
00601
00602
00603 int shared_bd_idx = NULL_IDX;
00604 boolean reassign_XT_temps = FALSE;
00605
00606
00607
00608
00609
00610 cdir_switch_type cdir_switches;
00611
00612
00613
00614
00615
00616 int where_ir_idx = NULL_IDX;
00617 int where_dealloc_stmt_idx = NULL_IDX;
00618
00619
00620
00621
00622
00623 cif_usage_code_type xref_state;
00624
00625
00626
00627
00628
00629 boolean check_type_conversion = FALSE;
00630 int target_type_idx;
00631 int target_char_len_idx;
00632 int target_array_idx = NULL_IDX;
00633
00634 boolean insert_subs_ok = TRUE;
00635
00636
00637
00638
00639
00640
00641 extern void cif_fake_a_unit (void);
00642
00643
00644
00645
00646 extern FILE *tmp_msg_file;
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656 attr_list_tbl_type * RESTRICT attr_list_tbl;
00657 int attr_list_tbl_idx = NULL_IDX;
00658 int attr_list_tbl_inc = 50;
00659 int attr_list_tbl_init_size = 100;
00660 int attr_list_tbl_limit = (1 << 16) - 1;
00661 int attr_list_tbl_num_wds = NUM_AL_WDS;
00662 int attr_list_tbl_size = 0;
00663 int attr_list_tbl_largest_idx = NULL_IDX;
00664
00665 attr_tbl_type * RESTRICT attr_tbl;
00666 int attr_tbl_idx = NULL_IDX;
00667 int attr_tbl_inc = 500;
00668 int attr_tbl_init_size = 1000;
00669 int attr_tbl_limit = (1 << 20) - 1;
00670 int attr_tbl_num_wds = NUM_AT_WDS;
00671 int attr_tbl_size = 0;
00672 int attr_tbl_largest_idx = NULL_IDX;
00673
00674 attr_aux_tbl_type * RESTRICT attr_aux_tbl;
00675 int attr_aux_tbl_idx = NULL_IDX;
00676 int attr_aux_tbl_inc = 500;
00677 int attr_aux_tbl_init_size = 1000;
00678 int attr_aux_tbl_limit = (1 << 20) - 1;
00679 int attr_aux_tbl_num_wds = NUM_AA_WDS;
00680 int attr_aux_tbl_size = 0;
00681 int attr_aux_tbl_largest_idx = NULL_IDX;
00682
00683 bounds_tbl_type * RESTRICT bounds_tbl;
00684 int bounds_tbl_idx = BD_LAST_USED_IDX;
00685 int bounds_tbl_inc = 100;
00686 int bounds_tbl_init_size = 100;
00687 int bounds_tbl_limit = (1 << 20) - 1;
00688 int bounds_tbl_num_wds = NUM_BD_WDS;
00689 int bounds_tbl_size = 0;
00690 int bounds_tbl_largest_idx = BD_LAST_USED_IDX;
00691
00692 const_pool_type * RESTRICT const_pool;
00693 int const_pool_idx = NULL_IDX;
00694 int const_pool_inc = 500;
00695 int const_pool_init_size = 500;
00696 int const_pool_limit = (1 << 24) - 1;
00697 int const_pool_num_wds = NUM_CP_WDS;
00698 int const_pool_size = 0;
00699 int const_pool_largest_idx = NULL_IDX;
00700
00701
00702
00703
00704
00705 int ieee_const_tbl_idx[18];
00706
00707
00708 const_tbl_type * RESTRICT const_tbl;
00709 int const_tbl_idx = NULL_IDX;
00710 int const_tbl_inc = 1000;
00711 int const_tbl_init_size = 1000;
00712 int const_tbl_limit = (1 << 24) - 1;
00713 int const_tbl_num_wds = NUM_CN_WDS;
00714 int const_tbl_size = 0;
00715 int const_tbl_largest_idx = NULL_IDX;
00716
00717 int cn_root_idx[Num_Linear_Types];
00718
00719 equiv_tbl_type * RESTRICT equiv_tbl;
00720 int equiv_tbl_idx = NULL_IDX;
00721 int equiv_tbl_inc = 100;
00722 int equiv_tbl_init_size = 100;
00723 int equiv_tbl_limit = (1 << 16) - 1;
00724 int equiv_tbl_num_wds = NUM_EQ_WDS;
00725 int equiv_tbl_size = 0;
00726 int equiv_tbl_largest_idx = NULL_IDX;
00727
00728
00729
00730
00731
00732 file_path_tbl_type * RESTRICT file_path_tbl;
00733 int file_path_tbl_idx = NULL_IDX;
00734 int file_path_tbl_inc = 10;
00735 int file_path_tbl_init_size = 30;
00736 int file_path_tbl_limit = (1 << 16) - 1;
00737 int file_path_tbl_num_wds = NUM_FP_WDS;
00738 int file_path_tbl_size = 30;
00739 int file_path_tbl_largest_idx = NULL_IDX;
00740
00741 global_attr_tbl_type * RESTRICT global_attr_tbl;
00742 int global_attr_tbl_idx = NULL_IDX;
00743 int global_attr_tbl_inc = 10;
00744 int global_attr_tbl_init_size = 20;
00745 int global_attr_tbl_limit = (1 << 20) - 1;
00746 int global_attr_tbl_num_wds = NUM_GA_WDS;
00747 int global_attr_tbl_size = 20;
00748 int global_attr_tbl_largest_idx = NULL_IDX;
00749
00750 global_bounds_tbl_type * RESTRICT global_bounds_tbl;
00751 int global_bounds_tbl_idx = NULL_IDX;
00752 int global_bounds_tbl_inc = 10;
00753 int global_bounds_tbl_init_size = 20;
00754 int global_bounds_tbl_limit = (1 << 16) - 1;
00755 int global_bounds_tbl_num_wds = NUM_GB_WDS;
00756 int global_bounds_tbl_size = 20;
00757 int global_bounds_tbl_largest_idx = NULL_IDX;
00758
00759 global_line_tbl_type * RESTRICT global_line_tbl;
00760 long global_line_tbl_idx = 0;
00761 int global_line_tbl_inc = 5;
00762 int global_line_tbl_init_size = 5;
00763 long global_line_tbl_limit = OUR_LONG_MAX;
00764 int global_line_tbl_num_wds = NUM_GL_WDS;
00765 long global_line_tbl_size = 5;
00766 long global_line_tbl_largest_idx = 1;
00767
00768 global_name_tbl_type * RESTRICT global_name_tbl;
00769 long global_name_tbl_idx = 0;
00770 int global_name_tbl_inc = 10;
00771 int global_name_tbl_init_size = 50;
00772 long global_name_tbl_limit = OUR_LONG_MAX;
00773 int global_name_tbl_num_wds = NUM_GN_WDS;
00774 long global_name_tbl_size = 50;
00775 long global_name_tbl_largest_idx = 1;
00776
00777 global_type_tbl_type * RESTRICT global_type_tbl;
00778 int global_type_tbl_idx = 0;
00779 int global_type_tbl_inc = 10;
00780 int global_type_tbl_init_size = 10;
00781 int global_type_tbl_limit = (1 << 16) - 1;
00782 int global_type_tbl_num_wds = NUM_TYP_WDS;
00783 int global_type_tbl_size = 10;
00784 int global_type_tbl_largest_idx = 1;
00785
00786 global_ir_tbl_type * RESTRICT global_ir_tbl = NULL;
00787 int global_ir_tbl_idx = NULL_IDX;
00788 int global_ir_tbl_inc = 100;
00789 int global_ir_tbl_init_size = 100;
00790 int global_ir_tbl_limit = (1 << 24) - 1;
00791 int global_ir_tbl_num_wds = NUM_IR_WDS;
00792 int global_ir_tbl_size = 100;
00793 int global_ir_tbl_largest_idx = NULL_IDX;
00794
00795 global_ir_list_tbl_type * RESTRICT global_ir_list_tbl = NULL;
00796 int global_ir_list_tbl_idx = NULL_IDX;
00797 int global_ir_list_tbl_inc = 100;
00798 int global_ir_list_tbl_init_size = 100;
00799 int global_ir_list_tbl_limit = (1 << 24) - 1;
00800 int global_ir_list_tbl_num_wds = NUM_IL_WDS;
00801 int global_ir_list_tbl_size = 100;
00802 int global_ir_list_tbl_largest_idx = NULL_IDX;
00803
00804 global_sh_tbl_type * RESTRICT global_sh_tbl = NULL;
00805 int global_sh_tbl_idx = NULL_IDX;
00806 int global_sh_tbl_inc = 100;
00807 int global_sh_tbl_init_size = 100;
00808 int global_sh_tbl_limit = (1 << 24) - 1;
00809 int global_sh_tbl_num_wds = NUM_SH_WDS;
00810 int global_sh_tbl_size = 100;
00811 int global_sh_tbl_largest_idx = NULL_IDX;
00812
00813
00814 loc_name_tbl_type * RESTRICT hidden_name_tbl;
00815 int hidden_name_tbl_idx = NULL_IDX;
00816 int hidden_name_tbl_inc = 100;
00817 int hidden_name_tbl_init_size = 500;
00818 int hidden_name_tbl_limit = (1 << 20) - 1;
00819 int hidden_name_tbl_num_wds = NUM_HN_WDS;
00820 int hidden_name_tbl_size = 0;
00821 int hidden_name_tbl_largest_idx = NULL_IDX;
00822
00823 ir_tbl_type * RESTRICT ir_tbl;
00824 int ir_tbl_idx = NULL_IDX;
00825 int ir_tbl_inc = 1000;
00826 int ir_tbl_init_size = 1000;
00827 int ir_tbl_limit = (1 << 24) - 1;
00828 int ir_tbl_num_wds = NUM_IR_WDS;
00829 int ir_tbl_size = 0;
00830 int ir_tbl_largest_idx = NULL_IDX;
00831
00832 ir_list_tbl_type * RESTRICT ir_list_tbl;
00833 int ir_list_tbl_idx = NULL_IDX;
00834 int ir_list_tbl_inc = 1000;
00835 int ir_list_tbl_init_size = 1000;
00836 int ir_list_tbl_limit = (1 << 24) - 1;
00837 int ir_list_tbl_num_wds = NUM_IL_WDS;
00838 int ir_list_tbl_size = 0;
00839 int ir_list_tbl_largest_idx = NULL_IDX;
00840
00841 loc_name_tbl_type * RESTRICT loc_name_tbl;
00842 int loc_name_tbl_idx = NULL_IDX;
00843 int loc_name_tbl_inc = 100;
00844 int loc_name_tbl_init_size = 500;
00845 int loc_name_tbl_limit = (1 << 20) - 1;
00846 int loc_name_tbl_num_wds = NUM_LN_WDS;
00847 int loc_name_tbl_size = 0;
00848 int loc_name_tbl_largest_idx = NULL_IDX;
00849
00850 mod_link_tbl_type * RESTRICT mod_link_tbl;
00851 long mod_link_tbl_idx = NULL_IDX;
00852 int mod_link_tbl_inc = 10;
00853 int mod_link_tbl_init_size = 0;
00854 long mod_link_tbl_limit = OUR_LONG_MAX;
00855 int mod_link_tbl_num_wds = NUM_ML_WDS;
00856 long mod_link_tbl_size = 0;
00857 long mod_link_tbl_largest_idx = NULL_IDX;
00858
00859 name_pool_type * RESTRICT name_pool;
00860 int name_pool_idx = NP_LAST_USED_IDX;
00861 int name_pool_inc = 500;
00862 int name_pool_init_size = 500;
00863 int name_pool_limit = (1 << 24) - 1;
00864 int name_pool_num_wds = NUM_NP_WDS;
00865 int name_pool_size = 0;
00866 int name_pool_largest_idx = NP_LAST_USED_IDX;
00867
00868 pdg_link_tbl_type * RESTRICT pdg_link_tbl;
00869 long pdg_link_tbl_idx = NULL_IDX;
00870 int pdg_link_tbl_inc = 0;
00871 int pdg_link_tbl_init_size = 0;
00872 long pdg_link_tbl_limit = OUR_LONG_MAX;
00873 int pdg_link_tbl_num_wds = NUM_PDG_WDS;
00874 long pdg_link_tbl_size = 0;
00875 long pdg_link_tbl_largest_idx = NULL_IDX;
00876
00877 rename_only_tbl_type * RESTRICT rename_only_tbl;
00878 int rename_only_tbl_idx = NULL_IDX;
00879 int rename_only_tbl_inc = 5;
00880 int rename_only_tbl_init_size = 0;
00881 int rename_only_tbl_num_wds = NUM_RO_WDS;
00882 int rename_only_tbl_limit = (1 << 12) - 1;
00883 int rename_only_tbl_size = 0;
00884 int rename_only_tbl_largest_idx = NULL_IDX;
00885
00886 scp_tbl_type * RESTRICT scp_tbl;
00887 int scp_tbl_idx = NULL_IDX;
00888 int scp_tbl_inc = 2;
00889 int scp_tbl_init_size = 5;
00890 int scp_tbl_limit = (1 << 16) - 1;
00891 int scp_tbl_num_wds = NUM_SCP_WDS;
00892 int scp_tbl_size = 0;
00893 int scp_tbl_largest_idx = NULL_IDX;
00894
00895 sec_name_tbl_type * RESTRICT sec_name_tbl;
00896 int sec_name_tbl_idx = NULL_IDX;
00897 int sec_name_tbl_inc = 500;
00898 int sec_name_tbl_init_size = 1000;
00899 int sec_name_tbl_limit = (1 << 24) - 1;
00900 int sec_name_tbl_num_wds = NUM_SN_WDS;
00901 int sec_name_tbl_size = 0;
00902 int sec_name_tbl_largest_idx = NULL_IDX;
00903
00904 sh_tbl_type * RESTRICT sh_tbl;
00905 int sh_tbl_idx = NULL_IDX;
00906 int sh_tbl_inc = 1000;
00907 int sh_tbl_init_size = 1000;
00908 int sh_tbl_limit = (1 << 24) - 1;
00909 int sh_tbl_num_wds = NUM_SH_WDS;
00910 int sh_tbl_size = 0;
00911 int sh_tbl_largest_idx = NULL_IDX;
00912
00913 stor_blk_tbl_type * RESTRICT stor_blk_tbl;
00914 int stor_blk_tbl_idx = NULL_IDX;
00915 int stor_blk_tbl_inc = 10;
00916 int stor_blk_tbl_init_size = 40;
00917 int stor_blk_tbl_limit = (1 << 16) - 1;
00918 int stor_blk_tbl_num_wds = NUM_SB_WDS;
00919 int stor_blk_tbl_size = 0;
00920 int stor_blk_tbl_largest_idx = NULL_IDX;
00921
00922 name_pool_type * RESTRICT str_pool;
00923 int str_pool_idx = NULL_IDX;
00924 int str_pool_inc = 50;
00925 int str_pool_init_size = 100;
00926 int str_pool_limit = (1 << 20) - 1;
00927 int str_pool_num_wds = NUM_NP_WDS;
00928 int str_pool_size = 100;
00929 int str_pool_largest_idx = NULL_IDX;
00930
00931 type_tbl_type * RESTRICT type_tbl;
00932 int type_tbl_idx = TYP_LAST_USED_IDX;
00933 int type_tbl_inc = 20;
00934 int type_tbl_init_size = 100;
00935 int type_tbl_limit = (1 << 16) - 1;
00936 int type_tbl_num_wds = NUM_TYP_WDS;
00937 int type_tbl_size = 0;
00938 int type_tbl_largest_idx = NULL_IDX;
00939
00940
00941
00942
00943
00944 # ifdef _ARITH_H
00945
00946 # if defined(_TARGET32) || defined(_WHIRL_HOST64_TARGET64)
00947
00948 long linear_to_arith[Num_Linear_Types] = {
00949 0,
00950 AR_Int_32_S,
00951 AR_Int_32_S,
00952 AR_Int_32_S,
00953 AR_Int_32_S,
00954 AR_Int_32_S,
00955 AR_Int_64_S,
00956 0,
00957 AR_Int_32_S,
00958 AR_Int_32_S,
00959 AR_Int_32_S,
00960 AR_Int_64_S,
00961 AR_Float_IEEE_NR_32,
00962 AR_Float_IEEE_NR_64,
00963 AR_Float_IEEE_NR_128,
00964 AR_Complex_IEEE_NR_32,
00965 AR_Complex_IEEE_NR_64,
00966 AR_Complex_IEEE_NR_128,
00967 0,
00968 AR_Logical,
00969 AR_Logical,
00970 AR_Logical,
00971 AR_Logical,
00972 0,
00973 0,
00974 0,
00975 0,
00976 0,
00977 0
00978 };
00979
00980 # else
00981
00982
00983 long linear_to_arith[Num_Linear_Types] = {
00984 0,
00985 AR_Int_64_S,
00986 AR_Int_64_S,
00987 AR_Int_32_S,
00988 AR_Int_32_S,
00989 AR_Int_32_S,
00990 AR_Int_64_S,
00991 0,
00992 # ifdef _TARGET_OS_MAX
00993 AR_Int_32_S,
00994 AR_Int_32_S,
00995 AR_Int_32_S,
00996 # else
00997 AR_Int_64_S,
00998 AR_Int_64_S,
00999 AR_Int_64_S,
01000 # endif
01001 AR_Int_64_S,
01002 AR_Float_Cray1_64,
01003 AR_Float_Cray1_64,
01004 AR_Float_Cray1_128,
01005 AR_Complex_Cray1_64,
01006 AR_Complex_Cray1_64,
01007 AR_Complex_Cray1_128,
01008 0,
01009 AR_Logical,
01010 AR_Logical,
01011 AR_Logical,
01012 AR_Logical,
01013 0,
01014 0,
01015 0,
01016 0,
01017 0,
01018 0
01019 };
01020 # endif
01021
01022 # if defined(_TARGET32) || defined(_WHIRL_HOST64_TARGET64)
01023
01024 long input_arith_type[Num_Linear_Types] = {
01025 0,
01026 0,
01027 0,
01028 0,
01029 0,
01030 0,
01031 0,
01032 0,
01033 AR_Int_32_U,
01034 AR_Int_32_U,
01035 AR_Int_32_U,
01036 AR_Int_64_U,
01037 AR_Float_IEEE_NR_32,
01038 AR_Float_IEEE_NR_64,
01039 AR_Float_IEEE_NR_128,
01040 AR_Complex_IEEE_NR_32,
01041 AR_Complex_IEEE_NR_64,
01042 AR_Complex_IEEE_NR_128,
01043 0,
01044 0,
01045 0,
01046 0,
01047 0,
01048 0,
01049 0,
01050 0,
01051 0,
01052 0,
01053 0
01054 };
01055
01056 char arith_type_string[Num_Linear_Types][25] = {
01057 "",
01058 "",
01059 "",
01060 "",
01061 "",
01062 "",
01063 "",
01064 "",
01065 "AR_Int_32_U",
01066 "AR_Int_32_U",
01067 "AR_Int_32_U",
01068 "AR_Int_64_U",
01069 "AR_Float_IEEE_NR_32",
01070 "AR_Float_IEEE_NR_64",
01071 "AR_Float_IEEE_NR_128",
01072 "AR_Complex_IEEE_NR_32",
01073 "AR_Complex_IEEE_NR_64",
01074 "AR_Complex_IEEE_NR_128",
01075 "",
01076 "",
01077 "",
01078 "",
01079 "",
01080 "",
01081 "",
01082 "",
01083 "",
01084 "",
01085 ""
01086 };
01087
01088 # else
01089
01090
01091 long input_arith_type[Num_Linear_Types] = {
01092 0,
01093 0,
01094 0,
01095 0,
01096 0,
01097 0,
01098 0,
01099 0,
01100 # ifdef _TARGET_OS_MAX
01101 AR_Int_32_U,
01102 AR_Int_32_U,
01103 AR_Int_32_U,
01104 # else
01105 AR_Int_64_U,
01106 AR_Int_64_U,
01107 AR_Int_64_U,
01108 # endif
01109 AR_Int_64_U,
01110 AR_Float_Cray1_64,
01111 AR_Float_Cray1_64,
01112 AR_Float_Cray1_128,
01113 AR_Complex_Cray1_64,
01114 AR_Complex_Cray1_64,
01115 AR_Complex_Cray1_128,
01116 0,
01117 0,
01118 0,
01119 0,
01120 0,
01121 0,
01122 0,
01123 0,
01124 0,
01125 0,
01126 0
01127 };
01128
01129 char arith_type_string[Num_Linear_Types][25] = {
01130 "",
01131 "",
01132 "",
01133 "",
01134 "",
01135 "",
01136 "",
01137 "",
01138 # ifdef _TARGET_OS_MAX
01139 "AR_Int_32_U",
01140 "AR_Int_32_U",
01141 "AR_Int_32_U",
01142 # else
01143 "AR_Int_64_U",
01144 "AR_Int_64_U",
01145 "AR_Int_64_U",
01146 # endif
01147 "AR_Int_64_U",
01148 "AR_Float_Cray1_64",
01149 "AR_Float_Cray1_64",
01150 "AR_Float_Cray1_128",
01151 "AR_Complex_Cray1_64",
01152 "AR_Complex_Cray1_64",
01153 "AR_Complex_Cray1_128",
01154 "",
01155 "",
01156 "",
01157 "",
01158 "",
01159 "",
01160 "",
01161 "",
01162 "",
01163 "",
01164 ""
01165 };
01166
01167 # endif
01168
01169 # endif
01170
01171
01172
01173
01174
01175
01176
01177 extern exp_tbl_type eq_ne_tbl[Num_Linear_Types][Num_Linear_Types];
01178 extern exp_tbl_type lg_tbl[Num_Linear_Types][Num_Linear_Types];
01179 extern exp_tbl_type gt_lt_tbl[Num_Linear_Types][Num_Linear_Types];
01180
01181 extern void preprocess_only_driver(void);
01182
01183
01184
01185
01186
01187
01188
01189 static int some_scp_in_err;
01190
01191 boolean directives_are_global = TRUE;
01192 boolean insert_global_directives = FALSE;
01193
01194 boolean label_allowed = FALSE;
01195
01196 int curr_stmt_stk_il_idx = NULL_IDX;
01197
01198 int active_forall_sh_idx = NULL_IDX;
01199 boolean within_forall_construct = FALSE;
01200 boolean within_forall_mask_expr = FALSE;
01201
01202 int alloc_block_start_idx = NULL_IDX;
01203 int alloc_block_end_idx = NULL_IDX;