Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
p_driver.c File Reference
#include "defines.h"
#include "host.m"
#include "host.h"
#include "target.m"
#include "target.h"
#include "globals.m"
#include "tokens.m"
#include "sytb.m"
#include "p_globals.m"
#include "debug.m"
#include "globals.h"
#include "tokens.h"
#include "sytb.h"
#include "p_globals.h"
#include "p_driver.h"
#include "fmath.h"
Include dependency graph for p_driver.c:

Go to the source code of this file.

Functions

void init_parse_prog_unit (void)
static void check_for_dup_derived_type_lbl (void)
static void ck_lbl_construct_name (void)
static void enter_intrinsic_info (void)
static void init_const_tbl (void)
static void set_integer_default_type (void)
static void stmt_level_semantics (void)
void complete_intrinsic_definition (int generic_attr)
void parse_prog_unit (void)
void gen_attr_and_IR_for_lbl (boolean check_stmt_type)
void determine_stmt_type (void)
boolean iss_blk_stk_err (void)
void parse_bad_stmt (void)
void init_type (void)
void implicit_use_semantics (void)

Variables

static char USMID [] = "\n@(#)5.0_pl/sources/p_driver.c 5.13 10/20/99 16:13:01\n"

Function Documentation

void complete_intrinsic_definition ( int  generic_attr)

Definition at line 93 of file p_driver.c.

References _QUAD_PRECISION, AL_ATTR_IDX, AL_NEXT_IDX, AT_DEF_COLUMN, AT_DEF_LINE, AT_ELEMENTAL_INTRIN, AT_IS_DARG, AT_IS_INTRIN, AT_NAME_IDX, AT_NAME_LEN, AT_OBJ_CLASS, AT_OPTIONAL, ATD_ARRAY_IDX, ATD_CLASS, ATD_FUNC_IDX, ATD_IM_A_DOPE, ATD_INTRIN_DARG, ATD_INTRIN_DARG_TYPE, ATD_TYPE_IDX, ATI_FIRST_SPECIFIC_IDX, ATI_INTRIN_TBL_IDX, ATI_NUM_SPECIFICS, ATP_ELEMENTAL, ATP_EXPL_ITRFC, ATP_EXT_NAME_IDX, ATP_EXT_NAME_LEN, ATP_EXTERNAL_INTRIN, ATP_FIRST_IDX, ATP_IN_INTERFACE_BLK, ATP_INTRIN_ENUM, ATP_NON_ANSI_INTRIN, ATP_NOSIDE_EFFECTS, ATP_NUM_DARGS, ATP_PGM_UNIT, ATP_PROC, ATP_PURE, ATP_RSLT_IDX, ATP_SCP_IDX, cmd_line_flags, Complex_16, Complex_8, COPY_COMMON_ATTR_INFO, CREATE_ID, curr_scp_idx, Data_Obj, intrin_tbl_entry::data_type, intrin_tbl_entry::dope, DOUBLE_COMPLEX_DEFAULT_TYPE, DOUBLE_DEFAULT_TYPE, Dummy_Argument, Dummy_Proc, intrin_tbl_entry::elemental, expanded_intrinsic_list, intrin_tbl_entry::external, Func_Entry, Func_Exit, Function, Function_Result, id_str(), intrin_tbl_entry::id_str, Integer_4, Integer_8, INTEGER_DEFAULT_TYPE, Internal, intrin_tbl_entry::intrin_enum, Intrin_Proc, intrin_tbl, Logical_4, Logical_8, LOGICAL_DEFAULT_TYPE, MAKE_EXTERNAL_NAME, intrin_tbl_entry::n_specifics, name, intrin_tbl_entry::name_len, intrin_tbl_entry::non_ansi, NTR_ATTR_LIST_TBL, NTR_ATTR_TBL, NTR_INTERFACE_IN_SN_TBL, NTR_NAME_POOL, NTR_SN_TBL, NULL, NULL_IDX, intrin_tbl_entry::optional, Pgm_Unit, PRINTMSG(), Real_16, Real_8, cmd_line_flags_entry::s_pointer8, SN_ATTR_IDX, SN_NAME_IDX, SN_NAME_LEN, stmt_start_col, stmt_start_line, strcpy, id_str_entry::string, Subroutine, TRACE, TRUE, and id_str_entry::words.

Referenced by generic_spec_semantics(), merge_intrinsic(), parse_call_stmt(), parse_deref(), parse_inline_always_never(), parse_sgi_dir_inline(), and update_intrinsic().

Here is the call graph for this function:

void init_parse_prog_unit ( void  )

Definition at line 1062 of file p_driver.c.

References AT_COMPILER_GEND, AT_DEF_COLUMN, AT_DEF_LINE, AT_DEFINED, AT_NAME_IDX, AT_NAME_LEN, AT_OBJ_CLASS, AT_SEMANTICS_DONE, ATD_CLASS, ATD_CONST_IDX, ATD_FLD, ATD_SYMBOLIC_CONSTANT, ATD_TYPE_IDX, ATP_EXPL_ITRFC, ATP_EXT_NAME_IDX, ATP_EXT_NAME_LEN, ATP_PGM_UNIT, ATP_SCP_IDX, attr_aux_tbl, attr_list_tbl, attr_tbl, BD_ARRAY_CLASS, BD_DEFERRED_1_IDX, BD_DEFERRED_7_IDX, BD_GLOBAL_IDX, BD_LAST_USED_IDX, BD_NTRY_SIZE, BD_RANK, BD_USED_NTRY, blk_stk, bounds_tbl, C_INT_TO_CN, CG_INTEGER_DEFAULT_TYPE, Character_1, Character_2, Character_4, CHECK_INITIAL_ALLOC, cif_prog_unit_init(), CLEAR_TBL_NTRY, cmd_line_flags, CN_INTEGER_ONE_IDX, CN_Tbl_Idx, const_pool, const_safevl_idx, const_tbl, Constant, CREATE_ID, CRI_Ptr_8, CURR_BLK_FIRST_SH_IDX, curr_debug_lbl, curr_glb_line, curr_internal_lbl, curr_scp_idx, curr_stmt_category, curr_stmt_sh_idx, Data_Obj, Deferred_Shape, enter_intrinsic_info(), EOPU_encountered, equiv_tbl, FALSE, Func_Entry, Func_Exit, glb_tbl_idx, hidden_name_tbl, id_str(), idx, if_stmt_lbl_idx, IM_SET, IM_TYPE_IDX, IMPL_IDX, init_const_tbl(), init_directive(), init_name_and_stor_tbls(), Init_Stmt_Cat, init_target_opnd, Integer_8, INTEGER_DEFAULT_TYPE, intrin_map, INTRINSIC_SCP_IDX, ir_list_tbl, ir_tbl, LARGE_WORD_FOR_TBL_SRCH, LN_DEF_LOC, loc_name_tbl, Main_Attr_Idx, intrin_map_entry::mapped_4, intrin_map_entry::mapped_8, MAX_IMPL_CHS, MAX_INTRIN_MAP_SIZE, cmd_line_flags_entry::MPP_num_pes, name, name_pool_entry::name_long, name_pool, name_pool_idx, need_new_sh, NP_LAST_USED_IDX, NTR_ATTR_TBL, NTR_NAME_POOL, NTR_SCP_TBL, ntr_sh_tbl(), ntr_sym_tbl(), NULL, NULL_IDX, null_opnd, Null_Stmt, Num_Glb_Tbl_Idxs, Num_Linear_Types, NUM_TYP_WDS, on_off_flags, Pgm_Unit, PRINT_INTRIN, Program, Program_Blk, PUSH_BLK_STK, REAL_DEFAULT_TYPE, on_off_flags_entry::recognize_minus_zero, SCP_ATTR_IDX, SCP_FIRST_CHILD_IDX, SCP_FIRST_SH_IDX, SCP_IMPL_NONE, SCP_NUM_CHILDREN, SCP_PARENT_IDX, SCP_PARENT_NONE, scp_tbl, sec_name_tbl, set_integer_default_type(), SH_STMT_TYPE, sh_tbl, srch_sym_tbl(), stmt_start_line, stor_blk_tbl, storage_bit_size_tbl, id_str_entry::string, target_safevl, TOKEN_COLUMN, TOKEN_ID, TOKEN_LEN, TOKEN_LINE, TOKEN_STR, TRACE, TRUE, TYP_FLD, TYP_IDX, TYP_LAST_USED_IDX, TYP_LINEAR, type_init_tbl, type_tbl, UNNAMED_PROGRAM_NAME, UNNAMED_PROGRAM_NAME_LEN, Variable, and id_str_entry::words.

Referenced by init_compiler(), iss_blk_stk_err(), and parse_prog_unit().

Here is the call graph for this function:

Definition at line 1743 of file p_driver.c.

References ATP_PGM_UNIT, BASIC_RECS, BLK_ERR, blk_err_msgs, BLK_HEAD_IDX, blk_stk_idx, BLK_TYPE, Blockdata, Blockdata_Stmt, cif_flags, cif_send_sytb(), Contains_Blk, CURR_BLK, curr_scp_idx, Error, EXIT, FALSE, Func_Entry, Func_Exit, Function, Function_Stmt, if_stmt_lbl_idx, init_parse_prog_unit(), Interface_Blk, Internal, Module, Module_Stmt, NULL, NULL_IDX, pop_and_err_blk_stk(), PRINTMSG(), Private_Stmt, Program, Program_Stmt, Public_Stmt, Return_Stmt, SCP_ATTR_IDX, SCP_IN_ERR, STMT_CANT_BE_IN_BLK, STMT_LEGAL_IN_BLK, stmt_start_col, stmt_start_line, stmt_type, stmt_type_str, Subroutine, Subroutine_Stmt, TRACE, and TRUE.

Referenced by parse_access_stmt(), parse_allocate_stmt(), parse_assign_stmt(), parse_assignment_stmt(), parse_attrs(), parse_backspace_stmt(), parse_buffer_stmt(), parse_call_stmt(), parse_close_stmt(), parse_common_stmt(), parse_contains_stmt(), parse_continue_stmt(), parse_cycle_stmt(), parse_data_stmt(), parse_deallocate_stmt(), parse_decode_stmt(), parse_derived_type_stmt(), parse_do_stmt(), parse_encode_stmt(), parse_endfile_stmt(), parse_entry_stmt(), parse_equivalence_stmt(), parse_exit_stmt(), parse_forall(), parse_format_stmt(), parse_function_stmt(), parse_goto_stmt(), parse_if_stmt(), parse_implicit_stmt(), parse_inquire_stmt(), parse_interface_stmt(), parse_module_stmt(), parse_namelist_stmt(), parse_nullify_stmt(), parse_open_stmt(), parse_parameter_stmt(), parse_pointer_stmt(), parse_prefix_spec(), parse_print_stmt(), parse_read_stmt(), parse_return_stmt(), parse_rewind_stmt(), parse_save_stmt(), parse_select_stmt(), parse_sequence_stmt(), parse_stmt_func_stmt(), parse_stop_pause_stmt(), parse_subroutine_stmt(), parse_type_dcl_stmt(), parse_use_stmt(), parse_where_stmt(), parse_write_stmt(), and start_new_prog_unit().

Here is the call graph for this function:

void parse_bad_stmt ( void  )

Definition at line 1899 of file p_driver.c.

References Func_Entry, Func_Exit, Internal, NULL, PRINTMSG(), token, TOKEN_COLUMN, TOKEN_LINE, and TRACE.

Here is the call graph for this function:

void parse_prog_unit ( void  )

Definition at line 540 of file p_driver.c.

References _ERROR_DUPLICATE_GLOBALS, Allocate_Stmt, Arith_If_Stmt, Assign_Stmt, Assignment_Stmt, AT_DCL_ERR, AT_DEF_COLUMN, AT_DEF_LINE, AT_DEFINED, AT_Tbl_Idx, ATL_FWD_REF_IDX, Backspace_Stmt, BLK_HEAD_IDX, blk_stk, blk_stk_idx, Blockdata_Stmt, Buffer_Stmt, Call_Stmt, Case_Stmt, cdir_switches, Ch_Class_Digit, Ch_Class_EOF, cif_begin_scope_rec(), cif_flags, cif_need_unit_rec, CIF_Symbol_Declaration, cif_unit_rec(), cif_usage_rec(), ck_lbl_construct_name(), CLEAR_TBL_NTRY, clearing_blk_stk, Close_Stmt, cmd_line_flags, Continue_Stmt, CURR_BLK, CURR_BLK_NAME, curr_scp_idx, curr_stmt_category, curr_stmt_sh_idx, Cycle_Stmt, Deallocate_Stmt, cmd_line_flags_entry::debug_lvl, Debug_Lvl_0, Debug_Lvl_1, Decode_Stmt, Derived_Type_Blk, determine_stmt_type(), Directive_Stmt, directives_are_global, Do_Infinite_Stmt, Do_Iterative_Stmt, Do_While_Stmt, Elemental_Stmt, Else_If_Stmt, Else_Stmt, Else_Where_Stmt, Encode_Stmt, End_Do_Parallel_Stmt, End_Guard_Stmt, End_Inline_Here_Star_Opr, End_Parallel_Case_Stmt, End_Parallel_Stmt, End_Stmt, Endfile_Stmt, Entry_Stmt, EOPU_encountered, Error, Exit_Stmt, cmd_line_flags_entry::expression_eval_expr, cmd_line_flags_entry::expression_eval_stmt, FALSE, Find_EOS, first_time_tbl_alloc, Func_Entry, Func_Exit, Function_Stmt, gen_attr_and_IR_for_lbl(), gen_debug_lbl_stmt(), glb_tbl_idx, Goto_Stmt, If_Cstrct_Stmt, If_Stmt, cdir_switch_entry::implicit_use_idx, implicit_use_semantics(), init_parse_prog_unit(), Init_Stmt_Cat, cdir_switch_entry::inline_here_sgi, Inquire_Stmt, IR_COL_NUM, IR_LINE_NUM, IR_OPR, IR_TYPE_IDX, LA_CH_CLASS, LA_CH_COLUMN, LA_CH_LINE, LA_CH_VALUE, label_ok, label_token, Ldbg_Stmt_Lbl, LPAREN, Main_Attr_Idx, main_token, MATCHED_TOKEN_CLASS, Module_Stmt, need_new_sh, NEXT_LA_CH, NTR_IR_TBL, ntr_sh_tbl(), NULL, NULL_IDX, Null_Stmt, Nullify_Stmt, Open_MP_End_Critical_Stmt, Open_MP_End_Do_Stmt, Open_MP_End_Master_Stmt, Open_MP_End_Ordered_Stmt, Open_MP_End_Parallel_Do_Stmt, Open_MP_End_Parallel_Sections_Stmt, Open_MP_End_Parallel_Stmt, Open_MP_End_Parallel_Workshare_Stmt, Open_MP_End_Section_Stmt, Open_MP_End_Sections_Stmt, Open_MP_End_Single_Stmt, Open_MP_End_Workshare_Stmt, Open_MP_Section_Stmt, Open_Stmt, Outmoded_If_Stmt, Parallel_Case_Stmt, parse_err_flush(), Pause_Stmt, pgm_unit_start_line, pop_and_err_blk_stk(), Print_Stmt, PRINTMSG(), Program, Program_Blk, Program_Stmt, PU_Start, Pure_Stmt, Read_Stmt, Recursive_Stmt, resolve_fwd_lbl_refs(), Return_Stmt, Rewind_Stmt, SCP_ATTR_IDX, SCP_IN_ERR, SCP_USED_MODULE_LIST, Select_Stmt, SGI_End_Critical_Section_Stmt, SGI_End_Parallel_Stmt, SGI_End_Pdo_Stmt, SGI_End_Psection_Stmt, SGI_End_Single_Process_Stmt, SGI_Region_End_Stmt, SGI_Section_Stmt, SH_COL_NUM, SH_ERR_FLG, SH_GLB_LINE, SH_IR_IDX, SH_NEXT_IDX, SH_PREV_IDX, SH_STMT_TYPE, sh_tbl, srch_sym_tbl(), start_new_prog_unit(), stmt_construct_idx, stmt_has_double_colon(), stmt_label_idx, stmt_level_semantics(), stmt_parsers, stmt_start_col, stmt_start_line, stmt_type, Stop_Stmt, Subroutine_Stmt, TBL_FREE, Then_Stmt, Tok_Class_Keyword, Tok_Kwd_Type, token, TOKEN_COLUMN, TOKEN_LEN, TOKEN_LINE, TOKEN_STR, TRACE, TRACE_NEW_STMT, TRUE, Type_Decl_Stmt, TYPELESS_DEFAULT_TYPE, Use_Stmt, Use_Stmt_Cat, use_stmt_semantics(), Warning, Where_Cstrct_Stmt, Where_Stmt, Write_Stmt, and XREF_RECS.

Referenced by main().

Here is the call graph for this function:

static void stmt_level_semantics ( void  ) [static]

Definition at line 2457 of file p_driver.c.

References Allocatable_Stmt, Allocate_Stmt, Arith_If_Stmt, Assign_Stmt, Assignment_Stmt, AT_DCL_ERR, AT_DEFINED, ATL_BLK_STMT_IDX, ATL_CLASS, ATL_CMIC_BLK_STMT_IDX, ATL_DEBUG_CLASS, ATL_EXECUTABLE, ATL_FWD_REF_IDX, Automatic_Base_Calc_Stmt, Automatic_Base_Size_Stmt, Automatic_Stmt, Backspace_Stmt, BLK_CIF_SCOPE_ID, BLK_FIRST_SH_IDX, BLK_HEAD_IDX, BLK_IS_PARALLEL_REGION, blk_stk_idx, BLK_TYPE, Blockdata_Stmt, Buffer_Stmt, Call_Stmt, Case_Stmt, Ch_Class_EOF, check_for_dup_derived_type_lbl(), cif_begin_scope_rec(), cif_copy_temp_to_actual_CIF(), cif_flags, cif_need_unit_rec, cif_pgm_unit_error_recovery, cif_unit_rec(), Close_Stmt, Common_Stmt, Construct_Def, Contains_Stmt, Continue_Stmt, Cpnt_Decl_Stmt, CURR_BLK, CURR_BLK_NAME, curr_scp_idx, curr_stmt_category, curr_stmt_sh_idx, Cycle_Stmt, Data_Stmt, Deallocate_Stmt, Decode_Stmt, Derived_Type_Blk, Derived_Type_Stmt, Dimension_Stmt, Directive_Stmt, Do_Blk, Do_Infinite_Stmt, Do_Iterative_Stmt, Do_Parallel_Blk, Do_While_Stmt, Elemental_Stmt, Else_If_Stmt, Else_Stmt, Else_Where_Stmt, Encode_Stmt, End_Blockdata_Stmt, End_Do_Parallel_Stmt, End_Do_Stmt, End_Forall_Stmt, End_Function_Stmt, End_Guard_Stmt, End_If_Stmt, End_Interface_Stmt, end_labeled_do(), End_Module_Stmt, End_Parallel_Case_Stmt, End_Parallel_Stmt, End_Program_Stmt, End_Select_Stmt, End_Stmt, End_Subroutine_Stmt, End_Type_Stmt, End_Where_Stmt, Endfile_Stmt, Entry_Stmt, Equivalence_Stmt, Error, Exit_Stmt, External_Stmt, FALSE, Forall_Cstrct_Stmt, Forall_Stmt, Format_Stmt, Func_Entry, Func_Exit, Function_Stmt, gen_attr_and_IR_for_lbl(), glb_tbl_idx, Goto_Stmt, If_Cstrct_Stmt, If_Stmt, Implicit_None_Stmt, Implicit_Stmt, Init_Stmt_Cat, Inquire_Stmt, Intent_Stmt, Interface_Body_Blk, Interface_Stmt, Intrinsic_Stmt, LA_CH_CLASS, Label_Def, Lbl_User, Ldbg_User_Lbl, Main_Attr_Idx, main_token, Module_Proc_Stmt, Module_Stmt, Namelist_Stmt, need_new_sh, NULL, NULL_IDX, Null_Stmt, Nullify_Stmt, Open_MP_End_Critical_Stmt, Open_MP_End_Do_Stmt, Open_MP_End_Master_Stmt, Open_MP_End_Ordered_Stmt, Open_MP_End_Parallel_Do_Stmt, Open_MP_End_Parallel_Sections_Stmt, Open_MP_End_Parallel_Stmt, Open_MP_End_Parallel_Workshare_Stmt, Open_MP_End_Section_Stmt, Open_MP_End_Sections_Stmt, Open_MP_End_Single_Stmt, Open_MP_End_Workshare_Stmt, Open_MP_Section_Stmt, Open_Stmt, Optional_Stmt, Outmoded_If_Stmt, Parallel_Case_Stmt, Parameter_Stmt, Pause_Stmt, Pointer_Stmt, Print_Stmt, PRINTMSG(), Private_Stmt, Program, Program_Blk, Program_Stmt, Public_Stmt, Pure_Stmt, Read_Stmt, Recursive_Stmt, resolve_fwd_lbl_refs(), Return_Stmt, Rewind_Stmt, Save_Stmt, SCP_ATTR_IDX, Select_Stmt, Sequence_Stmt, SGI_End_Critical_Section_Stmt, SGI_End_Parallel_Stmt, SGI_End_Pdo_Stmt, SGI_End_Psection_Stmt, SGI_End_Single_Process_Stmt, SGI_Region_Blk, SGI_Region_End_Stmt, SGI_Section_Stmt, SH_P2_SKIP_ME, start_new_prog_unit(), Statement_Num_Stmt, stmt_construct_idx, Stmt_Func_Stmt, stmt_label_idx, stmt_start_col, stmt_start_line, stmt_type, stmt_type_str, Stop_Stmt, Subroutine_Stmt, Target_Stmt, Task_Common_Stmt, Then_Stmt, token, TOKEN_COLUMN, TOKEN_LINE, TRACE, TRUE, Type_Decl_Stmt, Type_Init_Stmt, Use_Stmt, Use_Stmt_Cat, Volatile_Stmt, Wait_Blk, Where_Cstrct_Stmt, Where_Stmt, and Write_Stmt.

Referenced by parse_prog_unit().

Here is the call graph for this function:


Variable Documentation

char USMID[] = "\n@(#)5.0_pl/sources/p_driver.c 5.13 10/20/99 16:13:01\n" [static]

Definition at line 37 of file p_driver.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines