cmd_line.c

Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 
00037 static char USMID[] = "\n@(#)5.0_pl/sources/cmd_line.c  5.16    10/20/99 17:17:46\n";
00038 
00039 #include <unistd.h> /* for getopt(), optarg, optind, opterr, optopt */
00040 #if defined(__linux__) 
00041 # include <getopt.h> /* for optind, opterr, optopt */
00042 #endif
00043 
00044 # include "defines.h"           /* Machine dependent ifdefs */
00045 
00046 # include "host.m"              /* Host machine dependent macros.*/
00047 # include "host.h"              /* Host machine dependent header.*/
00048 # include "target.m"            /* Target machine dependent macros.*/
00049 # include "target.h"            /* Target machine dependent header.*/
00050 
00051 # include "globals.m"
00052 # include "tokens.m"
00053 # include "sytb.m"
00054 # include "src_input.m"
00055 # include "cmd_line.m"
00056 # include "debug.m"
00057 
00058 # include "globals.h"
00059 # include "tokens.h"
00060 # include "sytb.h"
00061 # include "cmd_line.h"
00062 
00063 /*****************************************************************\
00064 |* function prototypes of static functions declared in this file *|
00065 \*****************************************************************/
00066 
00067 extern  char                    release_level[];
00068 extern  char                    frontend_version[];
00069 
00070 
00071 static  void dump_help_screen (void);
00072 static  void init_cmd_line    (void);
00073 static  void process_A_option (char *);
00074 static  void process_a_option (char *);
00075 static  void process_b_option (char *);
00076 static  void process_C_option (char *, char *[]);
00077 static  void process_d_option (char *);
00078 static  void process_e_option (char *);
00079 static  void process_f_option (char *);
00080 static  void process_G_option (char *);
00081 static  void process_i_option (char *);
00082 static  void process_J_option (char *);
00083 static  void process_k_option (char *);
00084 static  void process_m_option (char *);
00085 static  void process_M_option (char *);
00086 static  void process_N_option (char *);
00087 static  void process_O_option (char *, int);
00088 static  void add_to_fp_table  (char *, int *, int);
00089 static  void process_P_option (char *);
00090 static  void process_q_option (char *);
00091 static  void process_r_option (char *);
00092 static  void process_R_option (char *);
00093 static  void process_s_option (char *);
00094 static  void process_S_option (char *);
00095 static  void process_t_option (char *);
00096 static  void process_u_option (char *);
00097 static  void process_v_option (char *);
00098 static  void process_x_option (char *);
00099 static  void process_X_option (char *);
00100 static  void process_Y_option (char *);
00101 static  void set_prog_file_names (char *argv[]);
00102 static  void validate_O_option (void);
00103 static  void validate_G_option (void);
00104 static  void validate_R_option (void);
00105 static  void validate_s_option (void);
00106 static  void process_D_option(char *);
00107 static  void process_U_option(char *);
00108 extern  void process_v_dbg_flags(char *);
00109 static  void set_system_module_path( void );
00110 static  void process_reshape_array(char *);
00111 static  void dump_options(void);
00112 
00113 
00114 /******************************************************************************\
00115 |*                                                                            *|
00116 |* Description:                                                               *|
00117 |*      Process_cmd_line is called to accept and validate command line        *|
00118 |*      options and arguments to change compiler flags.                       *|
00119 |*                                                                            *|
00120 |* Input parameters:                                                          *|
00121 |*      argc                    number of command line arguments              *|
00122 |*      argv                    argument strings                              *|
00123 |*                                                                            *|
00124 |* Output parameters:                                                         *|
00125 |*      NONE                                                                  *|
00126 |*                                                                            *|
00127 |* Returns:                                                                   *|
00128 |*      NOTHING                                                               *|
00129 |*                                                                            *|
00130 \******************************************************************************/
00131   
00132 int process_cmd_line(int   argc,
00133                          char *argv[])
00134 {
00135    char         err_char;
00136    int          err_ind;
00137    int          option;
00138    int          i;
00139 
00140    int          save_argc;
00141 
00142 
00143 /******************************************************************************/
00144 /*                                                                            */
00145 /* NOTE:                                                                      */
00146 /*    To add a new commandline option to the compiler, you must add the letter*/
00147 /*    to opt_string.  Any letter you add must go in the list alphabetically.  */
00148 /*    Those that have args must have a colon follwing.  Those that do not have*/
00149 /*    args must NOT have a colon following. Currently they are -g, -V, -z, -Z */
00150 /*                                                                            */
00151 /******************************************************************************/
00152 
00153    char *opt_string="a:b:d:e:f:ghi:k:m:p:q:r:s:t:u:v:x:z"
00154                     "A:C:D:FG:I:J:M:N:O:P:R:S:T:U:Y:X:VZ";
00155 
00156    char  str[7];
00157 
00158 
00159    TRACE (Func_Entry, "process_cmd_line", NULL);
00160 
00161    save_argc = argc;
00162 
00163    opterr = 0;                                          /* disable lib msgs  */
00164 
00165    init_cmd_line ();
00166 
00167 # ifdef _DEBUG
00168 # ifdef _ENABLE_FEI
00169    str[0] = 'N';
00170    str[1] = '\0';
00171    process_v_dbg_flags (str);   /* pass -vN always */
00172 # endif
00173 # endif
00174    err_ind = optind;
00175 
00176    while ((option = getopt (argc, argv, opt_string)) != EOF) {
00177 
00178       switch (option) {
00179          case 'h':
00180            dump_options();
00181            return 1;
00182            break;
00183          case 'a':                                      /* memory options     */
00184             process_a_option (optarg);
00185             break;
00186 
00187          case 'b':                                      /* binary file name   */
00188             process_b_option (optarg);
00189             break;
00190 
00191          case 'd':                                      /* off flags          */
00192             process_d_option (optarg);
00193             break;
00194 
00195          case 'e':                                      /* on flags           */
00196             process_e_option (optarg);
00197             break;
00198     
00199          case 'f':                                      /* source form        */
00200             process_f_option (optarg);
00201             break;
00202     
00203          case 'g':                                      /* -G 0               */
00204             cmd_line_flags.debug_lvl = Debug_Lvl_0;
00205             break;
00206     
00207          case 'i':                                      /* integer size       */
00208             process_i_option (optarg);
00209             break;
00210 
00211          case 'k':                                      /* Solaris profiling  */
00212             process_k_option (optarg);
00213             break;
00214 
00215       /* When the -l option is implemented (to specify what file the CIF      */
00216       /* output should go to), also update cif_misc_compiler_opts_rec in      */
00217       /* cif.c.                                                               */
00218       /*                                                                      */
00219       /* case 'l':                                         CIF name           */
00220       /*    break;                                                            */
00221 
00222          case 'm':                                      /* msg level suppr'd  */
00223             process_m_option (optarg);
00224             break;
00225 
00226          case 'O':                                      /* optimization opts  */
00227             process_O_option (optarg, argc);
00228             break;
00229 
00230          case 'p':                                      /* module path name  */
00231             add_to_fp_table (optarg, &module_path_idx, option);
00232             break;
00233 
00234          case 'q':                                      /* expression eval    */
00235             process_q_option (optarg);
00236             break;
00237 
00238          case 'r':                                      /* list options       */
00239             process_r_option (optarg);
00240             break;
00241 
00242          case 'R':                                      /* runtime checking   */
00243             process_R_option (optarg);
00244             break;
00245 
00246          case 's':                                      /* type size option   */
00247             process_s_option (optarg);
00248             break;
00249 
00250          case 'S':                                      /* cal file name      */
00251             process_S_option (optarg);
00252             break;
00253 
00254          case 't':                                      /* truncate bits      */
00255             process_t_option (optarg);
00256             break;
00257 
00258          case 'u':                                      /* debug dump flags   */
00259             process_u_option (optarg);
00260             break;
00261 
00262          case 'v':                                      /* PDGCS debug opts   */
00263             process_v_option (optarg);
00264             break;
00265 
00266          case 'A':                                      /* implicit use       */
00267             process_A_option (optarg);
00268             break;
00269 
00270          case 'C':                                      /* CIF flags          */
00271             process_C_option (optarg, argv);
00272             break;
00273 
00274          case 'D':                                      /* DEFINE */
00275 # ifdef _FRONTEND_CONDITIONAL_COMP
00276             process_D_option (optarg);
00277 # endif
00278             break;
00279 
00280          case 'x':                                      /* disregard CDIRs    */
00281             process_x_option (optarg);
00282             break;
00283 
00284          case 'F':                                      /* fortran macro exp */
00285 # ifdef _FRONTEND_CONDITIONAL_COMP
00286             cmd_line_flags.pp_macro_expansion   = TRUE;
00287             on_off_flags.preprocess = TRUE;
00288 # endif
00289             break;
00290     
00291     
00292          case 'G':                                      /* debug option       */
00293             process_G_option (optarg);
00294             break;
00295     
00296          case 'I':                                      /* include option     */
00297             add_to_fp_table(optarg, &include_path_idx, option);
00298             break;
00299 
00300          case 'J':                                      /* .mod output locate */
00301             process_J_option (optarg);
00302             break;
00303 
00304          case 'M':                                      /* disable msg numbers*/
00305             process_M_option (optarg);
00306             break;
00307     
00308          case 'N':                                      /* fixed line size    */
00309             process_N_option (optarg);
00310             break;
00311 
00312          case 'P':                                      /* position independ  */
00313             process_P_option (optarg);
00314             break;
00315     
00316          case 'U':                                      /* UNDEF */
00317 # ifdef _FRONTEND_CONDITIONAL_COMP
00318             process_U_option (optarg);
00319 # endif
00320             break;
00321 
00322          case 'V':                                      /* version option     */
00323             cmd_line_flags.verify_option = TRUE;
00324             break;
00325 
00326          case 'X':                                      /* MPP num PE's opt   */
00327             process_X_option (optarg);
00328             break;
00329 
00330          case 'Y':
00331             process_Y_option (optarg);                  /* ccg debug options  */
00332             break;
00333 
00334 # ifdef COARRAY_FORTRAN
00335          case 'Z':
00336             cmd_line_flags.co_array_fortran     = TRUE;
00337             dump_flags.f_minus_minus            = TRUE;
00338             dump_flags.fmm1                     = TRUE;
00339           break;
00340 # endif
00341 
00342          case 'z':                                      /* cleanup whirl      */
00343             cmd_line_flags.cleanUpWhirl=1;
00344             break;
00345 
00346 
00347          default:     /* Command line has an invalid option. */
00348 
00349             err_char = argv[err_ind][1];
00350 
00351             if (err_char == 'O') {
00352 
00353                /* Accept -O with no arguments.  It means use defaults. */
00354                /* Intentionally blank */
00355 
00356                ntr_msg_queue(0, 1221, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00357             }
00358             else {
00359                err_char = optopt;
00360                ntr_msg_queue(0, 77, Log_Error, 0, 
00361                              (char *) NULL, optopt, ARG_ARG);
00362             }
00363             break;
00364       }  /* switch */
00365 
00366       err_ind = optind;
00367    }  /* while */
00368 
00369 /* # ifdef _DEBUG */
00370 
00371    if (dump_flags.help_dbg) {
00372       dump_help_screen();
00373       return 1;
00374    }
00375 
00376 /* # endif */
00377 
00378    if (argc == 2  &&  cmd_line_flags.verify_option) {
00379 
00380       /* cft90 call only requests compiler version info.    */
00381       /* message will be produced by init_compiler in main. */
00382    }
00383    else {
00384 
00385       if (on_off_flags.MPP_apprentice) {
00386          cif_flags = cif_flags | ALL_RECS      |
00387                                  XREF_RECS     | MISC_RECS |
00388                                  MESSAGE_RECS  | INFO_RECS |
00389                                  BASIC_RECS    | COMPILER_RECS;
00390       }
00391 
00392 #     if defined(GENERATE_WHIRL)
00393 
00394          if (dump_flags.cray_compatible) {
00395             cmd_line_flags.s_default64 = TRUE;
00396          }
00397 #     endif
00398 
00399       if (on_off_flags.all_debug) {  /* Turn on all debugging options. */
00400 
00401          /* -eD implies -O0 -G0 -ei -m2 -RabcsCE -rl */
00402 
00403          opt_flags.support_lvl                  = 0;
00404          cmd_line_flags.debug_lvl               = Debug_Lvl_0;
00405          on_off_flags.indef_init                = TRUE;
00406          cmd_line_flags.msg_lvl_suppressed      = Caution_Lvl;
00407          cmd_line_flags.runtime_argument        = TRUE;
00408          cmd_line_flags.runtime_bounds          = TRUE;
00409          cmd_line_flags.runtime_conformance     = TRUE;
00410          cmd_line_flags.runtime_substring       = TRUE;
00411          cmd_line_flags.runtime_ptr_chk         = TRUE;
00412          cmd_line_flags.runtime_arg_call        = TRUE;
00413          cmd_line_flags.runtime_arg_entry       = TRUE;
00414          cif_flags = cif_flags | ALL_RECS      |
00415                                  XREF_RECS     | MISC_RECS |
00416                                  MESSAGE_RECS  | INFO_RECS |
00417                                  BASIC_RECS    | COMPILER_RECS;
00418          cif_C_opts = cif_C_opts | ALL_RECS;
00419 
00420          if (on_off_flags.zero_init) {  /* Conflict - issue warning */
00421             on_off_flags.zero_init = FALSE;
00422             ntr_msg_queue(0, 1313, Log_Warning, 0, "ei\ne0", 0,MULT_STR_ARG);
00423          }
00424 
00425          if (! set_scalar_option) {
00426             opt_flags.scalar_lvl = Scalar_Lvl_0;
00427          }
00428 
00429 #        if defined(_ACCEPT_VECTOR)
00430 
00431          if (! set_vector_option) {
00432             opt_flags.vector_lvl = Vector_Lvl_0;
00433          }
00434 
00435 #        endif
00436 
00437 #        if defined(_ACCEPT_TASK)
00438 
00439          if (! set_task_option) {
00440             opt_flags.task_lvl = Task_Lvl_0;
00441          }
00442 #        endif
00443 
00444 #        if defined(_ACCEPT_STREAM)
00445 
00446          if (! set_stream_option) {
00447             opt_flags.stream_lvl = Stream_Lvl_0;
00448          }
00449 
00450 #        endif
00451       }
00452 
00453       /* Validate G before O, because G can override O levels. */
00454 
00455       if (cmd_line_flags.debug_lvl < No_Debugging) {
00456          validate_G_option ();
00457       }
00458 
00459       validate_O_option ();
00460       validate_R_option ();
00461       validate_s_option ();
00462 
00463       if (cmd_line_flags.align32 && cmd_line_flags.align64) {
00464          cmd_line_flags.align32         = FALSE;
00465          ntr_msg_queue(0, 1353, Log_Warning, 0, 
00466                        "-a align32\n-a align64\n-a align32",
00467                        0, MULT_STR_ARG);
00468       }
00469 
00470       if (target_ieee) {
00471 
00472          if (set_ieeeconform_option && opt_flags.ieeeconform && 
00473              !on_off_flags.eu) {
00474             on_off_flags.eu = FALSE;
00475 
00476             if (set_eu_option) {  /* -du has been specified. */
00477                ntr_msg_queue(0, 1215, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00478             }
00479             else {                /* -du is default. */
00480                ntr_msg_queue(0, 1216, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00481             }
00482          }
00483 
00484          if (opt_flags.ieeeconform) {
00485             on_off_flags.reciprical_divide = FALSE;
00486          }
00487          else {
00488             on_off_flags.reciprical_divide = !on_off_flags.eu;
00489          }
00490       }
00491       else {
00492          on_off_flags.round_integer_divide = on_off_flags.eu;
00493       }
00494 
00495       if (on_off_flags.assembly_listing_file && !cmd_line_flags.binary_output) {
00496          cmd_line_flags.binary_output = TRUE;
00497          ntr_msg_queue(0, 913, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00498       }
00499 
00500       if (cmd_line_flags.co_array_fortran) {
00501 # if defined(_TASK_COMMON_EXTENSION)
00502          cmd_line_flags.taskcommon      = TRUE;
00503 # endif
00504          opt_flags.task_lvl             = Task_Lvl_0;
00505       }
00506 
00507 # if defined(_NO_BINARY_OUTPUT)
00508       binary_output     = FALSE;
00509       assembly_output   = cmd_line_flags.binary_output ||
00510                           cmd_line_flags.assembly_output;
00511 # else
00512       binary_output     = cmd_line_flags.binary_output;
00513       assembly_output   = cmd_line_flags.assembly_output;
00514 # endif
00515 
00516 /*
00517       if (no_preprocessing) {
00518          on_off_flags.preprocess = FALSE;
00519          on_off_flags.preprocess_only = FALSE;
00520          on_off_flags.save_dot_i = FALSE;
00521       }
00522 */
00523 
00524       set_prog_file_names (argv);
00525 
00526       if (optind < (argc-1)) { /* Options not allowed after input file name. */
00527          ntr_msg_queue(0, 79, Log_Error, 0, (char *) NULL, 0, NO_ARG);
00528       }
00529    }
00530 
00531    if (cmd_line_flags.mod_out_path && !on_off_flags.module_to_mod) {
00532 
00533       /* Must specify -em to specify -J */
00534 
00535       ntr_msg_queue(0, 1658, Log_Error, 0, (char *) NULL, 0, NO_ARG);
00536    }
00537 
00538    PRINT_CMD_LINE_TBLS;  /* Will print if -u cmd is specified for a DEBUG comp*/
00539 
00540    if (dump_flags.show_cmd_line) {
00541       printf("\n");
00542       for (i = 0; i < save_argc; i++) {
00543          printf("%s ", argv[i]);
00544       }
00545       printf("\n\n");
00546    }
00547 
00548    issue_deferred_msgs();
00549 
00550    TRACE (Func_Exit, "process_cmd_line", NULL);
00551 
00552    return 0;
00553   
00554 }  /* process_cmd_line */
00555 
00556 
00557 /******************************************************************************\
00558 |*                                                                            *|
00559 |* Description:                                                               *|
00560 |*      Validate_G_option is called to check the combination of debug options *|
00561 |*      and optimization options.                                             *|
00562 |*                                                                            *|
00563 |* Input parameters:                                                          *|
00564 |*      NONE                                                                  *|
00565 |*                                                                            *|
00566 |* Output parameters:                                                         *|
00567 |*      NONE                                                                  *|
00568 |*                                                                            *|
00569 |* Returns:                                                                   *|
00570 |*      NOTHING                                                               *|
00571 |*                                                                            *|
00572 \******************************************************************************/
00573 
00574 static void validate_G_option (void)
00575 {
00576 /* KAY - This routine needs help.  It doesn't appear to be finished. */
00577 
00578    int          correct_scalar_lvl;
00579    int          correct_vector_lvl;
00580    int          correct_task_lvl;
00581    int          debug_lvl;
00582 
00583 
00584    TRACE (Func_Entry, "validate_G_option", NULL);
00585 
00586    if (!cmd_line_flags.binary_output) {
00587 
00588 # if !defined(_NO_BINARY_OUTPUT)
00589 
00590       /* Warning - binary output needs to be on for debugging. */
00591 
00592       ntr_msg_queue(0, 82, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00593       cmd_line_flags.assembly_output    = FALSE;
00594       cmd_line_flags.binary_output      = TRUE;
00595 # endif
00596 
00597    }
00598 
00599    switch (cmd_line_flags.debug_lvl) {
00600    case Debug_Lvl_0:
00601 
00602       if (set_scalar_option && opt_flags.scalar_lvl > Scalar_Lvl_0) {
00603          ntr_msg_queue(0, 1536, Log_Warning, 0,
00604                        scalar_lvl_str[Scalar_Lvl_0], 
00605                        Debug_Lvl_0, STR_ARG_ARG);
00606       }
00607 
00608       if (set_vector_option && opt_flags.vector_lvl > Vector_Lvl_0) {
00609         ntr_msg_queue(0, 1536, Log_Warning, 0,
00610                        vector_lvl_str[Vector_Lvl_0], 
00611                        Debug_Lvl_0, STR_ARG_ARG);
00612       }
00613 
00614       if (set_stream_option && opt_flags.stream_lvl > Stream_Lvl_0) {
00615          ntr_msg_queue(0, 1536, Log_Warning, 0,
00616                        stream_lvl_str[Stream_Lvl_0], 
00617                        Debug_Lvl_0, STR_ARG_ARG);
00618       }
00619 
00620       if (set_task_option && opt_flags.task_lvl > Task_Lvl_0) {
00621          ntr_msg_queue(0, 1536, Log_Warning, 0,
00622                        task_lvl_str[Task_Lvl_0], 
00623                        Debug_Lvl_0, STR_ARG_ARG);
00624       }
00625 
00626       if (set_support_lvl_option && opt_flags.support_lvl > 0) {
00627          ntr_msg_queue(0, 1536, Log_Warning, 0,
00628                        "-O0", Debug_Lvl_0, STR_ARG_ARG);
00629       }
00630 
00631       if (opt_flags.inline_lvl > Inline_Lvl_0 ||
00632           set_inlinefrom_option) {
00633          ntr_msg_queue(0, 1199, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00634       }
00635 
00636       cmd_line_flags.do_UDB_checks      = opt_flags.scalar_lvl > Scalar_Lvl_0;
00637       opt_flags.scalar_lvl              = Scalar_Lvl_0;
00638       opt_flags.stream_lvl              = Stream_Lvl_0;
00639       opt_flags.vector_lvl              = Vector_Lvl_0;
00640       opt_flags.task_lvl                = Task_Lvl_0;
00641       opt_flags.inline_lvl              = Inline_Lvl_0; 
00642       opt_flags.support_lvl             = 0;
00643 
00644       if (set_aggress_option) {
00645          ntr_msg_queue(0, 1069, Log_Warning, 0,
00646                        "aggress", Debug_Lvl_0, STR_ARG_ARG);
00647       }
00648 
00649       if (set_bottom_load_option) {
00650          ntr_msg_queue(0, 1069, Log_Warning, 0,
00651                        "bl", Debug_Lvl_0, STR_ARG_ARG);
00652       }
00653 
00654       if (set_loop_align_option) {
00655          ntr_msg_queue(0, 1069, Log_Warning, 0,
00656                        "loopalign", Debug_Lvl_0, STR_ARG_ARG);
00657       }
00658 
00659       if (set_pattern_option) {
00660          ntr_msg_queue(0, 1069, Log_Warning, 0,
00661                        "pattern", Debug_Lvl_0, STR_ARG_ARG);
00662       }
00663 
00664       if (set_pipeline_option) {
00665          ntr_msg_queue(0, 1069, Log_Warning, 0,
00666                        "pipeline", Debug_Lvl_0, STR_ARG_ARG);
00667       }
00668 
00669       if (set_recurrence_option) {
00670          ntr_msg_queue(0, 1069, Log_Warning, 0,
00671                        "recurrence", Debug_Lvl_0, STR_ARG_ARG);
00672       }
00673 
00674       if (set_vsearch_option) {
00675          ntr_msg_queue(0, 1069, Log_Warning, 0,
00676                        "vsearch", Debug_Lvl_0, STR_ARG_ARG);
00677       }
00678 
00679       if (set_zeroinc_option) {
00680          ntr_msg_queue(0, 1069, Log_Warning, 0,
00681                        "zeroinc", Debug_Lvl_0, STR_ARG_ARG);
00682       }
00683 
00684       opt_flags.aggress         = FALSE;
00685       opt_flags.bottom_load     = FALSE;
00686       opt_flags.loopalign       = FALSE;
00687       opt_flags.recurrence      = FALSE;
00688       opt_flags.pattern         = FALSE;
00689       opt_flags.pipeline_lvl    = 0;
00690       opt_flags.vsearch         = FALSE;
00691       opt_flags.zeroinc         = FALSE;
00692       set_debug_option          = TRUE;
00693       break;
00694 
00695 
00696    case Debug_Lvl_1:
00697 
00698       debug_lvl                 = Debug_Lvl_1;
00699       set_debug_option          = TRUE;
00700 
00701       if (opt_flags.scalar_lvl > Scalar_Lvl_2) {
00702 
00703          if (set_scalar_option) {
00704             ntr_msg_queue(0, 1536, Log_Warning, 0,
00705                           scalar_lvl_str[Scalar_Lvl_2], 
00706                           Debug_Lvl_1, STR_ARG_ARG);
00707          }
00708          opt_flags.scalar_lvl   = Scalar_Lvl_2;
00709       }
00710 
00711       if (opt_flags.inline_lvl > Inline_Lvl_0 ||
00712           set_inlinefrom_option) {
00713          opt_flags.inline_lvl = Inline_Lvl_0; 
00714          ntr_msg_queue(0, 1199, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
00715       }
00716 
00717 # if defined(_ACCEPT_STREAM)
00718 
00719       if (opt_flags.stream_lvl > Stream_Lvl_1) {
00720 
00721          if (set_stream_option) {
00722             ntr_msg_queue(0, 1536, Log_Warning, 0,
00723                           stream_lvl_str[Stream_Lvl_1], 
00724                           Debug_Lvl_1, STR_ARG_ARG);
00725          }
00726 
00727          opt_flags.stream_lvl   = Stream_Lvl_1;
00728       }
00729 # endif
00730 
00731 
00732 # if defined(_ACCEPT_VECTOR)
00733 
00734       if (opt_flags.vector_lvl > Vector_Lvl_1) {
00735 
00736          if (set_vector_option) {
00737             ntr_msg_queue(0, 1536, Log_Warning, 0,
00738                           vector_lvl_str[Vector_Lvl_1], 
00739                           Debug_Lvl_1, STR_ARG_ARG);
00740          }
00741 
00742          opt_flags.vector_lvl   = Vector_Lvl_1;
00743       }
00744 # endif
00745 
00746       if (set_support_lvl_option && opt_flags.support_lvl > 1) {
00747          ntr_msg_queue(0, 1536, Log_Warning, 0,
00748                        "-O1", Debug_Lvl_1, STR_ARG_ARG);
00749          opt_flags.support_lvl  = 1;
00750       }
00751 
00752       break;
00753 
00754 
00755    case Debug_Lvl_2:
00756 
00757       set_debug_option          = TRUE;
00758       correct_vector_lvl        = Vector_Lvl_3;
00759       correct_task_lvl          = Task_Lvl_3;
00760       correct_scalar_lvl        = Scalar_Lvl_3;
00761       debug_lvl                 = Debug_Lvl_2;
00762       break;
00763 
00764    case Debug_Lvl_3:
00765 
00766       /* Ignore these for now.  gsf says -G doesn't affect levels */
00767 
00768       correct_vector_lvl        = Vector_Lvl_3;
00769       correct_task_lvl          = Task_Lvl_3;
00770       correct_scalar_lvl        = Scalar_Lvl_3;
00771       debug_lvl                 = Debug_Lvl_3;
00772       break;
00773    }
00774 
00775    TRACE (Func_Exit, "validate_G_option", NULL);
00776 
00777    return;
00778 
00779 }  /* validate_G_option */
00780 
00781 /******************************************************************************\
00782 |*                                                                            *|
00783 |* Description:                                                               *|
00784 |*      <description>                                                         *|
00785 |*                                                                            *|
00786 |* Input parameters:                                                          *|
00787 |*      NONE                                                                  *|
00788 |*                                                                            *|
00789 |* Output parameters:                                                         *|
00790 |*      NONE                                                                  *|
00791 |*                                                                            *|
00792 |* Returns:                                                                   *|
00793 |*      NOTHING                                                               *|
00794 |*                                                                            *|
00795 \******************************************************************************/
00796 
00797 static void validate_R_option( void )
00798 
00799 {
00800 
00801 
00802    TRACE (Func_Entry, "validate_R_option", NULL);
00803 
00804    if (cmd_line_flags.runtime_arg_count_only &&
00805        ! cmd_line_flags.runtime_argument &&
00806        ! cmd_line_flags.runtime_arg_call &&
00807        ! cmd_line_flags.runtime_arg_entry) {
00808 
00809       cmd_line_flags.runtime_argument = TRUE;
00810    }
00811 
00812    TRACE (Func_Exit, "validate_R_option", NULL);
00813 
00814    return;
00815 
00816 }  /* validate_R_option */
00817 
00818 /******************************************************************************\
00819 |*                                                                            *|
00820 |* Description:                                                               *|
00821 |*      Init_flags is called to set all flag structs to their default values. *|
00822 |*      These flags control the compiler.  The user is able to change any of  *|
00823 |*      these flag values through commmand line options and compiler          *|
00824 |*      directives.                                                           *|
00825 |*                                                                            *|
00826 |* Input parameters:                                                          *|
00827 |*      NONE                                                                  *|
00828 |*                                                                            *|
00829 |* Output parameters:                                                         *|
00830 |*      NONE                                                                  *|
00831 |*                                                                            *|
00832 |* Returns:                                                                   *|
00833 |*      NOTHING                                                               *|
00834 |*                                                                            *|
00835 \******************************************************************************/
00836            
00837 static void init_cmd_line (void)
00838  
00839 {
00840    int  idx;
00841    char *u_option;
00842 
00843    TRACE (Func_Entry, "init_cmd_line", NULL);
00844 
00845 # if defined(_ACCEPT_STREAM)
00846 # if defined(_TARGET_SV2)
00847      accept_stream = TRUE;
00848 # else
00849      accept_stream = target_sv1;
00850 # endif
00851 # endif
00852 
00853    set_support_lvl_option       = FALSE;
00854 
00855    /* Set defaults for CIF option flags.                                      */
00856    cif_flags              = 0;
00857    cif_C_opts             = 0;
00858 
00859    /* set defaults for command line level option flags */
00860 
00861    cmd_line_flags.dalign                = (cft90_dash_a_dalign_option == 1);
00862    cmd_line_flags.align32               = FALSE;
00863    cmd_line_flags.align64               = FALSE;
00864                                                                 /* -a  dalign */
00865    cmd_line_flags.taskcommon            = FALSE;                /*-ataskcommon*/
00866    cmd_line_flags.static_threadprivate  = FALSE;                /*-astatic_th */
00867    cmd_line_flags.solaris_profile       = FALSE;                /* -k  s/g    */
00868 
00869    cmd_line_flags.binary_output         = TRUE;                 /* -b  name   */
00870    cmd_line_flags.assembly_output       = FALSE;                /* -s  name   */
00871 
00872    cmd_line_flags.runtime_argument      = FALSE;                /* -R a       */
00873    cmd_line_flags.runtime_arg_call      = FALSE;                /* -R C       */
00874    cmd_line_flags.runtime_arg_entry     = FALSE;                /* -R E       */
00875    cmd_line_flags.runtime_arg_count_only= FALSE;                /* -R n       */
00876    cmd_line_flags.runtime_bounds        = FALSE;                /* -R b       */
00877    cmd_line_flags.runtime_conformance   = FALSE;                /* -R c       */
00878    cmd_line_flags.runtime_intrinsics    = FALSE;                /* -R i       */
00879    cmd_line_flags.runtime_substring     = FALSE;                /* -R s       */
00880    cmd_line_flags.runtime_ptr_chk       = FALSE;                /* -R p       */
00881    cmd_line_flags.s_float64             = FALSE;                /*-s float64  */
00882    cmd_line_flags.s_default32           = FALSE;                /*-s default32*/
00883    cmd_line_flags.s_default64           = FALSE;                /*-s default64*/
00884    cmd_line_flags.s_cf77types           = FALSE;                /*-s cf77types*/
00885    cmd_line_flags.s_integer8            = FALSE;                /*-s integer8 */
00886    cmd_line_flags.s_logical8            = FALSE;                /*-s logical8 */
00887    cmd_line_flags.s_real8               = FALSE;                /*-s real8    */
00888    cmd_line_flags.s_complex8            = FALSE;                /*-s complex8 */
00889    cmd_line_flags.s_doubleprecision16   = FALSE;                /*-s doublep  */
00890    cmd_line_flags.s_doublecomplex16     = FALSE;                /*-s doublec  */
00891 
00892 # if defined(_TARGET_SV2) || \
00893        ((defined(_HOST_OS_IRIX) || defined(_HOST_OS_LINUX)) && defined(_TARGET_OS_UNICOS))
00894    cmd_line_flags.s_pointer8            = TRUE;                 /*-s pointer8 */
00895 # else
00896    cmd_line_flags.s_pointer8            = FALSE;                /*-s pointer8 */
00897 # endif
00898    cmd_line_flags.src_form              = Fixed_Form;
00899    cmd_line_flags.disregard_all_mpp_cdirs       = FALSE;        /* -x mpp     */
00900    cmd_line_flags.disregard_all_directives      = FALSE;        /* -x all     */
00901    cmd_line_flags.disregard_all_dirs            = FALSE;        /* -x dir     */
00902    cmd_line_flags.disregard_all_mics            = FALSE;        /* -x mic     */
00903    cmd_line_flags.disregard_all_mips            = FALSE;        /* -x SGI     */
00904    cmd_line_flags.disregard_all_omps            = FALSE;        /* -x omp     */
00905    cmd_line_flags.disregard_conditional_omp     = FALSE;        /* -x cond_.. */
00906    /* eraxxon: OpenAD directive */
00907    cmd_line_flags.disregard_all_openads         = FALSE;        /* -x openad  */
00908    cmd_line_flags.msg_lvl_suppressed    = (msg_lvl_type) cft90_dash_m_option;
00909    cmd_line_flags.truncate_bits         = 0;                    /* -t  0      */
00910    cmd_line_flags.implicit_use_idx      = NULL_IDX;
00911    cmd_line_flags.debug_lvl             = (debug_lvl_type) 
00912                                            cft90_dash_G_debug_option;
00913 
00914    cmd_line_flags.mod_out_path          = FALSE;                /* -J         */
00915    cmd_line_flags.dwarf_debug           = TRUE;         /* -Gd        */
00916    cmd_line_flags.num_msgs_suppressed   = 0;                    /* num -M msgs*/
00917    cmd_line_flags.line_size_80          = (cft90_dash_N_option == 80);
00918    cmd_line_flags.line_size_132         = (cft90_dash_N_option == 132);
00919    cmd_line_flags.verify_option         = FALSE;                /* -V  FALSE  */
00920    cmd_line_flags.malleable             = FALSE;                /* -Xm FALSE  */
00921    cmd_line_flags.MPP_num_pes           = cft90_dash_X_option;  /* -X n$pes   */
00922    cmd_line_flags.integer_32            = FALSE;
00923    cmd_line_flags.co_array_fortran      = FALSE;
00924    cmd_line_flags.pp_macro_expansion    = FALSE;
00925 
00926    /* Set defaults for -e / -d option flags */
00927 
00928    on_off_flags.abort_if_any_errors     = (cft90_dash_e_a_option == 1);
00929 
00930    /* Hard code this as turned on by default for now because we want IEEE     */
00931    /* intrinsics to always be recognized.  Leave the option here in case      */
00932    /* customers scream too much about name space encroachment.                */
00933 
00934    on_off_flags.pad_char_literals       = FALSE;                /* -dc FALSE  */
00935    on_off_flags.ieee                    = TRUE;                 /* -ee TRUE   */
00936    on_off_flags.flowtrace_option        = FALSE;                /* -ef FALSE  */
00937    on_off_flags.assembly_listing_file   = FALSE;                /* -eg FALSE  */
00938 
00939 # if defined(_INTEGER_1_AND_2) && !defined(_ACCEPT_CMD_ed_h)
00940    on_off_flags.integer_1_and_2         = TRUE;
00941 # else
00942    on_off_flags.integer_1_and_2         = FALSE;
00943 # endif
00944 
00945    on_off_flags.indef_init              = (cft90_dash_e_i_option == 1);
00946    on_off_flags.exec_doloops_once       = FALSE;                /* -ej FALSE  */
00947    on_off_flags.module_to_mod           = (cft90_dash_e_m_option == 1);
00948    on_off_flags.issue_ansi_messages     = (cft90_dash_e_n_option == 1);
00949    on_off_flags.enable_double_precision = (cft90_dash_e_p_option == 1);
00950    on_off_flags.abort_on_100_errors     = TRUE;                 /* -eq TRUE   */
00951    on_off_flags.round_mult_operations   = (cft90_dash_e_r_option == 1);
00952    on_off_flags.alloc_autos_on_stack    = (cft90_dash_e_t_option == 1);
00953 
00954    /* This gets translated into reciprical divide /strong round flag */
00955    /* in process_cmd_line.   For now, turn them all off.             */
00956 
00957    on_off_flags.eu                      = (cft90_dash_e_u_option == 1);
00958    on_off_flags.reciprical_divide       = FALSE;
00959    on_off_flags.round_integer_divide    = FALSE;
00960    on_off_flags.recognize_minus_zero    = FALSE;
00961    on_off_flags.zero_init               = FALSE;
00962    on_off_flags.save_all_vars           = (cft90_dash_e_v_option == 1);
00963    on_off_flags.MPP_apprentice          = FALSE;                /* -dA        */
00964    on_off_flags.shared_to_private_coer  = FALSE;                /* -dC        */
00965    on_off_flags.all_debug               = FALSE;                /* -dD        */
00966    on_off_flags.top_test_shortloops     = FALSE;                /* -dL        */
00967    on_off_flags.remove_trailing_uscore  = FALSE;                /* -dN        */
00968    on_off_flags.allow_leading_uscore    = FALSE;                /* -dQ        */
00969    on_off_flags.output_pound_lines      = TRUE;                 /* -dP        */
00970    on_off_flags.preprocess_only         = FALSE;                /*            */
00971    on_off_flags.preprocess              = FALSE;
00972    on_off_flags.save_dot_i              = FALSE;                /* -ek        */
00973    on_off_flags.recursive               = FALSE;                /* -dR        */
00974    on_off_flags.atexpert                = FALSE;                /* -dX        */
00975    on_off_flags.upper_case_names        = FALSE;
00976    on_off_flags.d_lines                 = FALSE;
00977  
00978    /* Set defaults for -O option flags.                                       */
00979 
00980    /* If these options vary depending on platform, use cmd_line.h and the     */
00981    /* cft90_dash_O method to initialize.  That way all platform information   */
00982    /* for commandline initialization is in one place.                         */
00983 
00984    opt_flags.aggress                    = (cft90_dash_O_aggress_option == 1);
00985    opt_flags.bottom_load                = (cft90_dash_O_bl_option == 1);
00986    opt_flags.set_fastint_option         = FALSE;
00987    opt_flags.set_nofastint_option       = FALSE;
00988    opt_flags.set_allfastint_option      = FALSE;
00989    opt_flags.ieeeconform                = (cft90_dash_O_ieeeconform_option==1);
00990    opt_flags.inline_lvl                 = Inline_Lvl_0;
00991    opt_flags.extent_assert              = FALSE;
00992    opt_flags.short_circuit_lvl          = Short_Circuit_Present;
00993    opt_flags.jump                       = (cft90_dash_O_jump_option == 1);
00994    opt_flags.loopalign                  = (cft90_dash_O_loopalign_option == 1);
00995    opt_flags.modinline                  = FALSE;
00996    opt_flags.msgs                       = FALSE;
00997    opt_flags.neg_msgs                   = FALSE;
00998    opt_flags.nointerchange              = FALSE;
00999    opt_flags.opt_info                   = FALSE;
01000    opt_flags.over_index                 = (cft90_dash_O_overindex_option == 1);
01001    opt_flags.pattern                    = (cft90_dash_O_pattern_option == 1);
01002    opt_flags.pipeline_lvl               = 0;
01003    opt_flags.recurrence                 = (cft90_dash_O_recurrence_option == 1);
01004    opt_flags.taskinner                  = (cft90_dash_O_taskinner_option == 1);
01005    opt_flags.threshold                  = (cft90_dash_O_threshold_option == 1);
01006    opt_flags.vsearch                    = (cft90_dash_O_vsearch_option == 1);
01007    opt_flags.zeroinc                    = (cft90_dash_O_zeroinc_option == 1);
01008    opt_flags.support_lvl                = cft90_dash_O_support_option;
01009    opt_flags.scalar_lvl                 = cft90_dash_O_scalar_option;
01010    opt_flags.split_lvl                  = cft90_dash_O_split_option;
01011    opt_flags.vector_lvl                 = cft90_dash_O_vector_option;
01012    opt_flags.task_lvl                   = cft90_dash_O_task_option;
01013    opt_flags.unroll_lvl                 = cft90_dash_O_unroll_option;
01014    opt_flags.reshape_idx                = NULL_IDX;
01015    opt_flags.reshape                    = FALSE;
01016    opt_flags.reshape_all_arrays         = FALSE;
01017    opt_flags.matmul_inline              = FALSE;
01018    opt_flags.mv_matmul_inline           = FALSE;
01019  
01020    /* Set defaults for -x option flags.                                       */
01021 
01022    for (idx = 0; idx < (Tok_Dir_End-Tok_Dir_Start); idx++) {
01023       disregard_directive[idx]  = FALSE;
01024    }
01025 
01026    for (idx = 0; idx < (Tok_Mic_End-Tok_Mic_Start); idx++) {
01027       disregard_mics[idx]       = FALSE;
01028    }
01029 
01030    for (idx = 0; idx < (Tok_SGI_Dir_End-Tok_SGI_Dir_Start); idx++) {
01031       disregard_mips[idx]       = FALSE;
01032    }
01033 
01034    for (idx = 0; idx < (Tok_Open_Mp_Dir_End-Tok_Open_Mp_Dir_Start); idx++) {
01035       disregard_open_mp[idx]    = FALSE;
01036    }
01037    
01038    for (idx = 0; idx < (Tok_OpenAD_Dir_End-Tok_OpenAD_Dir_Start); idx++) {
01039       /* eraxxon: OpenAD directive */           
01040       disregard_openad[idx]     = FALSE;
01041    }
01042 
01043    /* set defaults for -u option flags */
01044    dump_flags.pvp_test                  = 0;
01045    dump_flags.blk_stk                   = FALSE;
01046    dump_flags.bd_tbl                    = FALSE;
01047    dump_flags.cmd_line_tbls             = FALSE;
01048    dump_flags.cn_tbl                    = FALSE;
01049    dump_flags.fp_tbl                    = FALSE;
01050    dump_flags.ftrace_info               = FALSE;
01051    dump_flags.gl_tbl                    = FALSE;
01052    dump_flags.intrin_tbl                = FALSE;
01053    dump_flags.ir1_tbl                   = FALSE;
01054    dump_flags.ir2_tbl                   = FALSE;
01055    dump_flags.ir3_tbl                   = FALSE;
01056    dump_flags.ir4_tbl                   = FALSE;
01057    dump_flags.mem_report                = FALSE;
01058    dump_flags.mod_version               = FALSE;
01059    dump_flags.mtrace_info               = FALSE;
01060    dump_flags.name_tbls                 = FALSE;
01061    dump_flags.pdgcs                     = FALSE;
01062    dump_flags.pdt_dump                  = FALSE;
01063    dump_flags.sb_tbl                    = FALSE;
01064    dump_flags.scp_tbl                   = FALSE;
01065    dump_flags.src_dmp                   = FALSE;
01066    dump_flags.std_err                   = FALSE;
01067    dump_flags.stmt_dmp                  = FALSE;
01068    dump_flags.sytb                      = FALSE;
01069    dump_flags.typ_tbl                   = FALSE;
01070    dump_flags.defines                   = FALSE;
01071    dump_flags.constant_bits             = FALSE;
01072    dump_flags.abort_on_ansi             = FALSE;
01073    dump_flags.no_dimension_padding      = FALSE;
01074    dump_flags.no_module_output          = FALSE;
01075    dump_flags.f_minus_minus             = FALSE;
01076    dump_flags.fmm1                      = FALSE;
01077    dump_flags.fmm2                      = FALSE;
01078    dump_flags.show_cmd_line             = FALSE;
01079    dump_flags.mp                        = FALSE;
01080    dump_flags.open_mp                   = FALSE;
01081    dump_flags.dsm                       = FALSE;
01082    dump_flags.cray_compatible           = FALSE;
01083    dump_flags.pack_half_word            = FALSE;
01084 
01085    /* Set defaults for -Y CCG option flags.                                   */
01086 
01087    ccg_dump_flags                       = 0;                     /* All FALSE */
01088 
01089 
01090    /* Clear the message tables.   */
01091 
01092    for (idx = 0; idx < MAX_MSG_SIZE; idx++) {
01093       message_suppress_tbl[idx] = 0L;
01094       message_error_tbl[idx]    = 0L;
01095       message_warning_tbl[idx]  = 0L;
01096    }
01097 
01098    u_option = getenv("FE_DASH_U_OPTION");
01099 
01100    if (u_option != NULL) {
01101       process_u_option(u_option);
01102    }
01103 
01104    TRACE (Func_Exit, "init_cmd_line", NULL);
01105 
01106    return;
01107 
01108 }  /* init_cmd_line */
01109 
01110 
01111 /******************************************************************************\
01112 |*                                                                            *|
01113 |* Description:                                                               *|
01114 |*      Process_c_option handles command line CIF options passed via argv     *|
01115 |*      (c switch).                                                           *|
01116 |*                                                                            *|
01117 |* Input parameters:                                                          *|
01118 |*      optargs                 -C option arguments                           *|
01119 |*      argv                    argument list                                 *|
01120 |*                                                                            *|
01121 |* Output parameters:                                                         *|
01122 |*      NONE                                                                  *|
01123 |*                                                                            *|
01124 |* Returns:                                                                   *|
01125 |*      NOTHING                                                               *|
01126 |*                                                                            *|
01127 |* Algorithm notes:                                                           *|
01128 |*   CIF file output is requested via the -C option.                          *|
01129 |*                                                                            *|
01130 |*   Qualifier    Constant         Meaning                                    *|
01131 |*   ---------    --------         --------                                   *|
01132 |*      a         ALL_RECS         All available CIF record types             *|
01133 |*      c         COMPILER_RECS    Only CIF records that contain compiler     *|
01134 |*                                   information, plus f-level records        *|
01135 |*      f         BASIC_RECS       Basic CIF records (file info, unit markers,*|
01136 |*                                   include files, etc.)                     *|
01137 |*      i         INFO_RECS        Information records for variables, labels, *|
01138 |*                                   constants, etc., plus f-level records    *|
01139 |*      m         MESSAGE_RECS     Message records plus f-level records       *|
01140 |*      o         MISC_RECS        Miscellaneous other records (stmt types,   *|
01141 |*                                   call sites, etc.) plus f- and i-level    *|
01142 |*                                   records                                  *|
01143 |*      s         OUTPUT_TO_STDOUT Redirect CIF output to stdout instead of   *|
01144 |*                                   file.T                                   *|
01145 |*      x         XREF_RECS        Cross-reference information plus f- and    *|
01146 |*                                   i-level records                          *|
01147 |*                                                                            *|
01148 \******************************************************************************/
01149  
01150 static void process_C_option (char *optargs,
01151                               char *argv[])
01152 
01153 {
01154    int          ch;
01155    char         err_str[2];
01156    long         orig_cmd_len;
01157 
01158    extern int   optind;                                 /* defined in getopt  */
01159 
01160 
01161    TRACE (Func_Entry, "process_C_option", NULL);
01162 
01163    while (ch = *optargs++) {
01164 
01165       switch (ch) {
01166          case 'a':
01167             cif_flags = cif_flags | ALL_RECS      |
01168                                     XREF_RECS     | MISC_RECS |
01169                                     MESSAGE_RECS  | INFO_RECS |
01170                                     BASIC_RECS    | COMPILER_RECS;
01171             cif_C_opts = cif_C_opts | ALL_RECS;
01172             break;
01173 
01174          case 'c':
01175             cif_flags  = cif_flags | COMPILER_RECS | BASIC_RECS;
01176             cif_C_opts = cif_C_opts | COMPILER_RECS;
01177             break;
01178 
01179          case 'f':
01180             cif_flags  = cif_flags | BASIC_RECS;
01181             cif_C_opts = cif_C_opts | BASIC_RECS;
01182             break;
01183 
01184          case 'i':
01185             cif_flags  = cif_flags | INFO_RECS | BASIC_RECS;
01186             cif_C_opts = cif_C_opts | INFO_RECS;
01187             break;
01188 
01189          case 'm':
01190             cif_flags  = cif_flags | MESSAGE_RECS | BASIC_RECS;
01191             cif_C_opts = cif_C_opts | MESSAGE_RECS;
01192             break;
01193 
01194          case 'o':
01195             cif_flags  = cif_flags | MISC_RECS | INFO_RECS | BASIC_RECS;
01196             cif_C_opts = cif_C_opts | MISC_RECS;
01197             break;
01198 
01199          case 's':
01200             cif_flags  = cif_flags | OUTPUT_TO_STDOUT;
01201             cif_C_opts = cif_C_opts | OUTPUT_TO_STDOUT;
01202             break;      
01203 
01204          case 'x':
01205             cif_flags  = cif_flags | XREF_RECS | INFO_RECS | BASIC_RECS;
01206             cif_C_opts = cif_C_opts | XREF_RECS;
01207             break;
01208 
01209          case 'Y':
01210 
01211             /* -CY is NOT a user-specifiable option.  It is used by the MPP   */
01212             /* driver to pass the command line as entered by the user and     */
01213             /* added to by the driver for the Original Command Line CIF       */
01214             /* record which cflist requires.  The PVP driver adds this        */
01215             /* record when it consolidates the .T files.                      */
01216 
01217             orig_cmd_len = (long) strlen(argv[optind]);
01218             ++orig_cmd_len;
01219             MEM_ALLOC(orig_cmd_line, char, orig_cmd_len);
01220             strcpy(orig_cmd_line, argv[optind]);
01221             ++optind;
01222             break;
01223 
01224          case 'Z':
01225 
01226             /* -CZ is NOT a user-specifiable option.  It is the option the    */
01227             /* command line processor uses to pass the CIF name to us.  The   */
01228             /* command line processor issues the error if it's specified by a */
01229             /* user.                                                          */
01230 
01231             strcpy(cif_name, optargs);
01232             
01233             /* Since the string following the CZ is a file name, skip past    */
01234             /* the entire string to complete the while loop.  No additional   */
01235             /* -C options are allowed after a -CZ.                            */
01236 
01237             optargs = optargs + strlen(optargs);
01238             break;
01239 
01240          default:
01241             err_str[0] = ch;
01242             err_str[1] = EOS;
01243 
01244             /* The CIF option has an invalid argument */
01245 
01246             ntr_msg_queue(0, 917, Log_Error, 0, err_str, 0, STR_ARG);
01247             break;
01248 
01249          }  /* switch */
01250 
01251    }  /* while */
01252 
01253    if (cif_flags != 0) {
01254       cif_C_opts = cif_C_opts | CMD_PROVIDED_CIF;
01255    }
01256 
01257    /* If the only suboption specified was the "s" (output to stdout)          */
01258    /* suboption, don't attempt to produce any CIF records.                    */
01259 
01260    if (cif_flags == OUTPUT_TO_STDOUT) {
01261       cif_flags = 0;
01262       cif_C_opts = 0;
01263    }
01264 
01265    TRACE (Func_Exit, "process_C_option", NULL);
01266 
01267    return;
01268  
01269 }  /* process_C_option */
01270 
01271 
01272 /******************************************************************************\
01273 |*                                                                            *|
01274 |* Description:                                                               *|
01275 |*      Process_d_option handles command line on/off options passed via argv  *|
01276 |*      (d switch).                                                           *|
01277 |*                                                                            *|
01278 |* Input parameters:                                                          *|
01279 |*      optargs                 -d option arguments                           *|
01280 |*                                                                            *|
01281 |* Output parameters:                                                         *|
01282 |*      NONE                                                                  *|
01283 |*                                                                            *|
01284 |* Returns:                                                                   *|
01285 |*      NOTHING                                                               *|
01286 |*                                                                            *|
01287 \******************************************************************************/
01288  
01289 static void process_d_option (char *optargs)
01290 
01291 {
01292    int  ch;
01293    char err_str[2];
01294  
01295 
01296    TRACE (Func_Entry, "process_d_option", NULL);
01297 
01298    while (ch = *optargs++) {
01299       switch (ch) {
01300       case 'a':
01301          on_off_flags.abort_if_any_errors = FALSE;
01302          break;
01303 
01304 # if defined(GENERATE_WHIRL)
01305       case 'c':
01306          on_off_flags.pad_char_literals = FALSE;
01307          break;
01308 # endif
01309 
01310 # ifdef _D_LINES_SUPPORTED
01311       case 'd':
01312          on_off_flags.d_lines = FALSE;
01313          break;
01314 # endif
01315 
01316 # if 0
01317 
01318       /* Take this out for now because we want IEEE intrinsics to always      */
01319       /* be recognized.  Leave the option here in case customers scream too   */
01320       /* much about name space encroachment.                                  */
01321 
01322       case 'e':
01323          on_off_flags.ieee = FALSE;
01324          break;
01325 
01326 # endif
01327 
01328       case 'f':
01329 
01330 #        if defined(_ACCEPT_FLOW)
01331             on_off_flags.flowtrace_option = FALSE;
01332 #        else
01333             ntr_msg_queue(0, 744, Log_Warning, 0, "f", 'd', ARG_STR_ARG);
01334 #        endif
01335          break;
01336 
01337       case 'g':
01338 
01339 #        if defined(_ACCEPT_CMD_ed_g)
01340             on_off_flags.assembly_listing_file = FALSE;
01341 #        else
01342             ntr_msg_queue(0, 744, Log_Warning, 0, "g", 'd', ARG_STR_ARG);
01343 #        endif
01344          break;
01345 
01346       case 'h':
01347 
01348 #        if defined(_ACCEPT_CMD_ed_h)
01349             on_off_flags.integer_1_and_2 = FALSE;
01350 #        else
01351             ntr_msg_queue(0, 744, Log_Warning, 0, "h", 'd', ARG_STR_ARG);
01352 #        endif
01353          break;
01354 
01355       case 'i':
01356 
01357 #        if defined(_ACCEPT_CMD_ed_i)
01358             ntr_msg_queue(0, 744, Log_Warning, 0, "i", 'd', ARG_STR_ARG);
01359 #        else
01360             on_off_flags.indef_init = FALSE;
01361 #        endif
01362          break;
01363 
01364       case 'j':
01365 
01366 #        if defined(_ACCEPT_CMD_ed_j)
01367             on_off_flags.exec_doloops_once = FALSE;
01368 #        else
01369             ntr_msg_queue(0, 744, Log_Warning, 0, "j", 'd', ARG_STR_ARG);
01370 #        endif
01371          break;
01372 
01373       case 'k': on_off_flags.output_pound_lines = FALSE;
01374          break;
01375 
01376       case 'm':
01377 
01378          /* If turning off -em, need an alternative to write out the module. */
01379 
01380 #        if defined(_MODULE_TO_DOT_o) || defined(_MODULE_TO_DOT_M)
01381             on_off_flags.module_to_mod = FALSE;
01382 #        else
01383             PRINTMSG (0, 744, Log_Warning, 0, 'd', "m");
01384 #        endif
01385          break;
01386 
01387       case 'n':
01388          on_off_flags.issue_ansi_messages = FALSE;
01389          break;
01390 
01391       case 'p':
01392          on_off_flags.enable_double_precision = FALSE;
01393          break;
01394 
01395       case 'q':
01396          on_off_flags.abort_on_100_errors = FALSE;
01397          break;
01398 
01399       case 'r':
01400 
01401 #        if defined(_ACCEPT_CMD_ed_r)
01402 
01403             if (set_trunc_option) {
01404                set_round_option = FALSE;
01405 
01406                /* Rounding(-dr) /truncation (-t) conflict detected. */
01407 
01408                ntr_msg_queue(0, 75, Log_Warning, 0, "-dr", 0, STR_ARG);
01409             }
01410 
01411             cmd_line_flags.truncate_bits        = 0;
01412             on_off_flags.round_mult_operations  = FALSE;
01413             set_round_option                    = TRUE;
01414 #        else
01415             ntr_msg_queue(0, 744, Log_Warning, 0, "r", 'd', ARG_STR_ARG);
01416 #        endif
01417          break;
01418 
01419       case 't':
01420          on_off_flags.alloc_autos_on_stack = FALSE;
01421          break;
01422 
01423       case 'u':
01424          set_eu_option   = TRUE;
01425          on_off_flags.eu = FALSE;
01426          break;
01427 
01428       case 'v':
01429          on_off_flags.save_all_vars = FALSE;
01430          break;
01431 
01432       case 'z':
01433 
01434 #        if defined(_ACCEPT_CMD_ed_z)
01435             on_off_flags.recognize_minus_zero = FALSE;
01436 #        else
01437             ntr_msg_queue(0, 744, Log_Warning, 0, "z", 'd', ARG_STR_ARG);
01438 #        endif
01439          break;
01440 
01441       case '0':
01442 #        if defined(_ACCEPT_CMD_ed_0)
01443             on_off_flags.zero_init = FALSE;
01444 #        else
01445             ntr_msg_queue(0, 744, Log_Warning, 0, "0", 'd', ARG_STR_ARG);
01446 #        endif
01447          break;
01448 
01449       case 'A':
01450 
01451 #        if defined(_ACCEPT_CMD_ed_A)
01452             on_off_flags.MPP_apprentice = FALSE;
01453 #        else
01454             ntr_msg_queue(0, 744, Log_Warning, 0, "A", 'd', ARG_STR_ARG);
01455 #        endif
01456          break;
01457     
01458       case 'B':
01459          cmd_line_flags.binary_output = FALSE;
01460          break;
01461 
01462       case 'C':
01463 
01464 #        if defined(_ACCEPT_CMD_ed_C)
01465             on_off_flags.shared_to_private_coer = FALSE;
01466 #        else
01467             ntr_msg_queue(0, 744, Log_Warning, 0, "C", 'd', ARG_STR_ARG);
01468 #        endif
01469          break;
01470 
01471       case 'D':
01472 #        if defined(_ACCEPT_CMD_ed_i)
01473             on_off_flags.all_debug = FALSE;
01474 #        else
01475             ntr_msg_queue(0, 744, Log_Warning, 0, "D", 'd', ARG_STR_ARG);
01476 #        endif
01477          break;
01478 
01479       case 'I':
01480          on_off_flags.implicit_none = FALSE;
01481          break;
01482 
01483       case 'L':
01484          on_off_flags.top_test_shortloops = FALSE;
01485          break;
01486 
01487       case 'N':
01488          on_off_flags.remove_trailing_uscore = FALSE;
01489          break;
01490 
01491       case 'Q':   /* Q is undocumented */
01492          on_off_flags.allow_leading_uscore = FALSE;
01493          break;
01494     
01495       case 'R':
01496          on_off_flags.recursive = FALSE;
01497          break;
01498 
01499       case 'S':
01500          cmd_line_flags.assembly_output = FALSE;
01501          break;
01502 
01503       case 'T':
01504 # ifdef _FRONTEND_CONDITIONAL_COMP
01505          no_preprocessing = TRUE;
01506          on_off_flags.preprocess = FALSE;
01507          on_off_flags.preprocess_only = FALSE;
01508          on_off_flags.save_dot_i = FALSE;
01509 # endif
01510          break;
01511 
01512       case 'U':   /* U is undocumented */
01513 #        if defined(_ACCEPT_CMD_ed_U)
01514             on_off_flags.upper_case_names = FALSE;
01515 #        else
01516             ntr_msg_queue(0, 744, Log_Warning, 0, "U", 'd', ARG_STR_ARG);
01517 #        endif
01518          break;
01519 
01520       case 'X':
01521 
01522 #        if defined(_ACCEPT_CMD_ed_X)
01523             on_off_flags.atexpert = FALSE;
01524 #        else
01525             ntr_msg_queue(0, 744, Log_Warning, 0, "X", 'd', ARG_STR_ARG);
01526 #        endif
01527          break;
01528 
01529       default:
01530          err_str[0] = ch;
01531          err_str[1] = EOS;
01532 
01533          /* option has an invalid argument */
01534 
01535          ntr_msg_queue(0, 78, Log_Error, 0, err_str, 'd', ARG_STR_ARG);
01536          break;
01537 
01538       }  /* switch */
01539    }  /* while */
01540 
01541    TRACE (Func_Exit, "process_d_option", NULL);
01542 
01543    return;
01544  
01545 }  /* process_d_option */
01546 
01547 /******************************************************************************\
01548 |*                                                                            *|
01549 |* Description:                                                               *|
01550 |*      Process_e_option handles command line on/off options passed via argv  *|
01551 |*      (e switch).                                                           *|
01552 |*                                                                            *|
01553 |* Input parameters:                                                          *|
01554 |*      optargs                 -e option arguments                           *|
01555 |*                                                                            *|
01556 |* Output parameters:                                                         *|
01557 |*      NONE                                                                  *|
01558 |*                                                                            *|
01559 |* Returns:                                                                   *|
01560 |*      NOTHING                                                               *|
01561 |*                                                                            *|
01562 \******************************************************************************/
01563 
01564 static void process_e_option (char *optargs)
01565 
01566 {
01567    int           ch;
01568    char          err_str[2];
01569 
01570 
01571    TRACE (Func_Entry, "process_e_option", NULL);
01572 
01573    while (ch = *optargs++) {
01574       switch (ch) {
01575       case 'a':
01576          on_off_flags.abort_if_any_errors = TRUE; 
01577          break;
01578 
01579 # if defined(GENERATE_WHIRL)
01580       case 'c':
01581          on_off_flags.pad_char_literals = TRUE;
01582          break;
01583 # endif
01584 
01585 # ifdef _D_LINES_SUPPORTED
01586       case 'd':
01587          on_off_flags.d_lines = TRUE;
01588          break;
01589 # endif
01590 
01591 
01592 # if 0
01593       /* Take this out for now because we want IEEE intrinsics to always      */
01594       /* be recognized.  Leave the option here in case customers scream too   */
01595       /* much about name space encroachment.                                  */
01596 
01597       case 'e':
01598          on_off_flags.ieee = TRUE;
01599          break;
01600 
01601 # endif
01602 
01603       case 'f':
01604 
01605 #        if defined(_ACCEPT_FLOW)
01606             on_off_flags.flowtrace_option = TRUE;
01607 #        else
01608             ntr_msg_queue(0, 744, Log_Warning, 0, "f", 'e', ARG_STR_ARG);
01609 #        endif
01610          break;
01611 
01612       case 'g':
01613 
01614 #        if defined(_ACCEPT_CMD_ed_g)
01615             on_off_flags.assembly_listing_file = TRUE;
01616 
01617             /* issue warning if cal file output is being overridden */  
01618 
01619             if (cmd_line_flags.assembly_output) {        
01620                ntr_msg_queue(0, 388, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
01621                cmd_line_flags.assembly_output   = FALSE;  
01622                cmd_line_flags.binary_output     = TRUE;  
01623             }
01624 #        else /* doc'd as -rg */
01625             ntr_msg_queue(0, 744, Log_Warning, 0, "g", 'r', ARG_STR_ARG);
01626 #        endif
01627          break;
01628 
01629 
01630       case 'h':
01631 
01632 #        if defined(_ACCEPT_CMD_ed_h)
01633             on_off_flags.integer_1_and_2 = TRUE;
01634 #        else
01635             ntr_msg_queue(0, 744, Log_Warning, 0, "h", 'e', ARG_STR_ARG);
01636 #        endif
01637          break;
01638 
01639 
01640       case 'i':
01641 
01642 #        if defined(_ACCEPT_CMD_ed_i)
01643             on_off_flags.indef_init = TRUE;
01644 
01645             if (on_off_flags.zero_init) {  /* Conflict - issue warning */
01646                on_off_flags.zero_init = FALSE;
01647                ntr_msg_queue(0, 1313, Log_Warning, 0, "ei\ne0", 0,MULT_STR_ARG);
01648             }
01649 #        else
01650             ntr_msg_queue(0, 744, Log_Warning, 0, "i", 'e', ARG_STR_ARG);
01651 #        endif
01652          break;
01653 
01654       case 'j':
01655 
01656 #        if defined(_ACCEPT_CMD_ed_j)
01657             on_off_flags.exec_doloops_once = TRUE;
01658 #        else
01659             ntr_msg_queue(0, 744, Log_Warning, 0, "j", 'e', ARG_STR_ARG);
01660 #        endif
01661          break;
01662 
01663       case 'k':
01664          on_off_flags.save_dot_i = TRUE;
01665          break;
01666 
01667       case 'm':
01668          on_off_flags.module_to_mod = TRUE;
01669          break;
01670 
01671       case 'n':
01672          on_off_flags.issue_ansi_messages = TRUE;
01673          break;
01674 
01675       case 'p':
01676          on_off_flags.enable_double_precision = TRUE;
01677          break;
01678 
01679       case 'q':
01680          on_off_flags.abort_on_100_errors = TRUE;
01681          break;
01682 
01683       case 'r':
01684 
01685 #        if defined(_ACCEPT_CMD_ed_r)
01686 
01687             if (set_trunc_option) {
01688 
01689                /* Rounding(-er) /truncation (-t) conflict detected. */
01690 
01691                ntr_msg_queue(0, 75, Log_Warning, 0, "-er", 0, STR_ARG);
01692                set_trunc_option                 = FALSE;
01693             }
01694 
01695             on_off_flags.round_mult_operations  = TRUE;
01696             cmd_line_flags.truncate_bits        = 0;
01697             set_round_option                    = TRUE;
01698 #        else
01699             ntr_msg_queue(0, 744, Log_Warning, 0, "r", 'e', ARG_STR_ARG);
01700 #        endif
01701          break;
01702 
01703       case 't':
01704          on_off_flags.alloc_autos_on_stack = TRUE;
01705          break;
01706 
01707       case 'u':
01708          on_off_flags.eu        = TRUE;
01709          set_eu_option          = TRUE;
01710          break;
01711     
01712       case 'v':
01713          on_off_flags.save_all_vars = TRUE;
01714          break;
01715 
01716       case 'z':
01717 
01718 #        if defined(_ACCEPT_CMD_ed_z)
01719             on_off_flags.recognize_minus_zero = TRUE;
01720 #        else
01721             ntr_msg_queue(0, 744, Log_Warning, 0, "z", 'e', ARG_STR_ARG);
01722 #        endif
01723          break;
01724 
01725       case '0':
01726 #        if defined(_ACCEPT_CMD_ed_0)
01727             on_off_flags.zero_init = TRUE;
01728 
01729             if (on_off_flags.indef_init) {  /* Conflict - issue warning */
01730                on_off_flags.indef_init = FALSE;
01731                ntr_msg_queue(0, 1313, Log_Warning, 0, "e0\nei", 0,MULT_STR_ARG);
01732             }
01733 
01734 #        else
01735             ntr_msg_queue(0, 744, Log_Warning, 0, "0", 'e', ARG_STR_ARG);
01736 #        endif
01737          break;
01738 
01739       case 'A':
01740 
01741 #        if defined(_ACCEPT_CMD_ed_A)
01742             on_off_flags.MPP_apprentice = TRUE;
01743 #        else
01744             ntr_msg_queue(0, 744, Log_Warning, 0, "A", 'e', ARG_STR_ARG);
01745 #        endif
01746          break;
01747     
01748       case 'B':
01749 
01750          /* issue warning if cal output is being overridden */ 
01751 
01752          if (cmd_line_flags.assembly_output) { 
01753             ntr_msg_queue(0, 715, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
01754             cmd_line_flags.assembly_output = FALSE; 
01755          }
01756 
01757          cmd_line_flags.binary_output = TRUE;
01758          break;
01759 
01760       case 'C':
01761 
01762 #        if defined(_ACCEPT_CMD_ed_C)
01763             on_off_flags.shared_to_private_coer = TRUE;
01764 #        else
01765             ntr_msg_queue(0, 744, Log_Warning, 0, "C", 'e', ARG_STR_ARG);
01766 #        endif
01767          break;
01768 
01769       case 'D':
01770 #        if defined(_ACCEPT_CMD_ed_D)
01771             on_off_flags.all_debug = TRUE;
01772 #        else
01773             ntr_msg_queue(0, 744, Log_Warning, 0, "D", 'e', ARG_STR_ARG);
01774 #        endif
01775          break;
01776 
01777       case 'I':
01778          on_off_flags.implicit_none = TRUE;
01779          break;
01780 
01781       case 'L':
01782          on_off_flags.top_test_shortloops = TRUE;
01783          break;
01784 
01785       case 'N':
01786          on_off_flags.remove_trailing_uscore = TRUE;
01787          break;
01788 
01789       case 'Q':
01790          on_off_flags.allow_leading_uscore = TRUE;
01791          break;
01792 
01793       case 'R':
01794          on_off_flags.recursive = TRUE;
01795          break;
01796 
01797       case 'S':
01798 
01799          /* issue warning if binary output is being overridden */  
01800 
01801          if (cmd_line_flags.binary_output) {     
01802 /*          PRINTMSG (0, 74, Log_Warning, 0);       LRR: driver now does this */
01803             cmd_line_flags.binary_output = FALSE;  
01804          }
01805 
01806          /* issue warning if cal file listing is being overridden */  
01807 
01808          if (on_off_flags.assembly_listing_file) {       
01809             ntr_msg_queue(0, 911, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
01810             on_off_flags.assembly_listing_file = FALSE;  
01811          }
01812      
01813          cmd_line_flags.assembly_output = TRUE;
01814          break;
01815 
01816       case 'T':
01817 # ifdef _FRONTEND_CONDITIONAL_COMP
01818          no_preprocessing = FALSE;
01819          on_off_flags.preprocess = TRUE;
01820 # endif
01821          break;
01822 
01823       case 'U':
01824 #        if defined(_ACCEPT_CMD_ed_U)
01825             on_off_flags.upper_case_names = TRUE;
01826 #        else
01827             ntr_msg_queue(0, 744, Log_Warning, 0, "U", 'e', ARG_STR_ARG);
01828 #        endif
01829          break;
01830 
01831       case 'X':
01832         
01833 #        if defined(_ACCEPT_CMD_ed_X)
01834             on_off_flags.atexpert = TRUE;
01835 #        else
01836             ntr_msg_queue(0, 744, Log_Warning, 0, "X", 'e', ARG_STR_ARG);
01837 #        endif
01838          break;
01839 
01840       case 'Z':
01841 # ifdef _FRONTEND_CONDITIONAL_COMP
01842          no_preprocessing = FALSE;
01843          on_off_flags.preprocess_only = TRUE;
01844          on_off_flags.preprocess = TRUE;
01845 # endif
01846          break;
01847     
01848       default:
01849          err_str[0] = ch;
01850          err_str[1] = EOS;
01851 
01852          /* option has an invalid argument */
01853 
01854          ntr_msg_queue(0, 78, Log_Error, 0, err_str, 'e', ARG_STR_ARG);
01855          break;
01856       }  /* switch */
01857    }  /* while */
01858  
01859    TRACE (Func_Exit, "process_e_option", NULL);
01860 
01861    return;
01862 
01863 }  /* process_e_option */
01864 
01865 /******************************************************************************\
01866 |*                                                                            *|
01867 |* Description:                                                               *|
01868 |*      Process_O_option handles command line optimization options passed via *|
01869 |*      argv (O switch).                                                      *|
01870 |*                                                                            *|
01871 |* Input parameters:                                                          *|
01872 |*      optargs                 -O option arguments                           *|
01873 |*                                                                            *|
01874 |* Output parameters:                                                         *|
01875 |*      NONE                                                                  *|
01876 |*                                                                            *|
01877 |* Returns:                                                                   *|
01878 |*      NOTHING                                                               *|
01879 |*                                                                            *|
01880 \******************************************************************************/
01881 
01882 static void process_O_option (char      *optargs,
01883                               int        argc)
01884 
01885 {
01886                 char            *cp;
01887                 boolean          err;
01888                 boolean          first;
01889    extern       int              optind;        /* defined in getopt  */
01890 
01891 
01892    TRACE (Func_Entry, "process_O_option", NULL);
01893 
01894    if (*optargs == '-') {
01895 
01896       /* Just a -O, issue warning, backup getopt and continue.  If      */
01897       /* optarg is a "-", the next item following -O is another option. */
01898 
01899       ntr_msg_queue(0, 1221, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
01900       --optind;
01901       return;
01902    }
01903 
01904    first        = TRUE;
01905 
01906    while (*optargs != EOS) {
01907 
01908       for (cp = optargs;
01909           *optargs != BLANK  &&  *optargs != COMMA  &&  *optargs != EOS;
01910           ++optargs);
01911 
01912       if (*optargs != EOS) {
01913          *optargs = EOS;
01914          *optargs++;
01915       }
01916 
01917       err = FALSE;
01918 
01919       switch (*cp) {
01920 
01921          case '0':
01922             if (EQUAL_STRS(cp, "0")) {
01923                opt_flags.support_lvl  = 0;
01924                set_support_lvl_option = TRUE;
01925 
01926                if (! set_scalar_option) {
01927                   opt_flags.scalar_lvl = Scalar_Lvl_0;
01928                }
01929 
01930 #              if defined(_ACCEPT_VECTOR)
01931 
01932                if (! set_vector_option) {
01933                   opt_flags.vector_lvl = Vector_Lvl_0;
01934                }
01935 
01936 #              endif
01937 
01938 #              if defined(_ACCEPT_STREAM)
01939 
01940                if (! set_stream_option) {
01941                   opt_flags.stream_lvl = Stream_Lvl_0;
01942                }
01943 
01944 #              endif
01945 
01946 
01947 #              if defined(_ACCEPT_TASK)
01948 
01949                if (! set_task_option) {
01950                   opt_flags.task_lvl = Task_Lvl_0;
01951                }
01952 
01953 #              endif
01954 
01955             }
01956             else {
01957                err = TRUE;
01958             }
01959 
01960             break;
01961 
01962 
01963          case '1':
01964             if (EQUAL_STRS(cp, "1")) {
01965                opt_flags.support_lvl  = 1;
01966                set_support_lvl_option = TRUE;
01967 
01968                if (! set_scalar_option) {
01969                   opt_flags.scalar_lvl = Scalar_Lvl_1;
01970                }
01971 
01972 #              if defined(_ACCEPT_VECTOR)
01973 
01974                if (! set_vector_option) {
01975                   opt_flags.vector_lvl = Vector_Lvl_1;
01976                }
01977 
01978 #              endif
01979 
01980 #              if defined(_ACCEPT_STREAM)
01981 
01982                if (! set_stream_option) {
01983 
01984 # if defined(_TARGET_SV2)
01985                   opt_flags.stream_lvl = Stream_Lvl_1;
01986 # else
01987                   opt_flags.stream_lvl = Stream_Lvl_0;
01988 # endif
01989                }
01990 
01991 #              endif
01992 
01993 #              if defined(_ACCEPT_TASK)
01994 
01995                if (! set_task_option) {
01996                   opt_flags.task_lvl = Task_Lvl_1;
01997                }
01998 
01999 #              endif
02000 
02001             }
02002             else {
02003                err = TRUE;
02004             }
02005 
02006             break;
02007 
02008 
02009          case '2':
02010             if (EQUAL_STRS(cp, "2")) {
02011                opt_flags.support_lvl  = 2;
02012                set_support_lvl_option = TRUE;
02013 
02014                if (! set_scalar_option) {
02015                   opt_flags.scalar_lvl = Scalar_Lvl_2;
02016                }
02017 
02018 #              if defined(_ACCEPT_STREAM)
02019 
02020                if (! set_stream_option) {
02021 
02022 # if defined(_TARGET_SV2)
02023                   opt_flags.stream_lvl = Stream_Lvl_2;
02024 # else
02025                   opt_flags.stream_lvl = Stream_Lvl_0;
02026 # endif
02027                }
02028 
02029 #              endif
02030 
02031 #              if defined(_ACCEPT_VECTOR)
02032 
02033                if (! set_vector_option) {
02034                   opt_flags.vector_lvl = Vector_Lvl_2;
02035                }
02036 
02037 #              endif
02038 
02039 #              if defined(_ACCEPT_TASK)
02040 
02041                if (! set_task_option) {
02042                   opt_flags.task_lvl = Task_Lvl_1;
02043                }
02044 
02045 #              endif
02046 
02047             }
02048             else {
02049                err = TRUE;
02050             }
02051 
02052             break;
02053 
02054 
02055          case '3':
02056             if (EQUAL_STRS(cp, "3")) {
02057                opt_flags.support_lvl  = 3;
02058                set_support_lvl_option = TRUE;
02059            
02060                if (! set_scalar_option) {
02061                   opt_flags.scalar_lvl = Scalar_Lvl_2;
02062                }
02063 
02064 #              if defined(_ACCEPT_VECTOR)
02065 
02066                if (! set_vector_option) {
02067                   opt_flags.vector_lvl = Vector_Lvl_3;
02068                }
02069 
02070 #              endif
02071 
02072 #              if defined(_ACCEPT_STREAM)
02073 
02074                if (! set_stream_option) {
02075 
02076 # if defined(_TARGET_SV2)
02077                   opt_flags.stream_lvl = Stream_Lvl_3;
02078 # else
02079                   opt_flags.stream_lvl = Stream_Lvl_0;
02080 # endif
02081                }
02082 
02083 #              endif
02084 
02085 
02086 #              if defined(_ACCEPT_TASK)
02087 
02088                if (! set_task_option) {
02089                   opt_flags.task_lvl = Task_Lvl_2;
02090                }
02091 
02092 #              endif
02093 
02094             }
02095             else {
02096                err = TRUE;
02097             }
02098 
02099             break;
02100 
02101 
02102          case 'a':
02103             if (EQUAL_STRS(cp, "aggress")) {
02104                opt_flags.aggress = TRUE;
02105                set_aggress_option = TRUE;
02106             }
02107             else if (EQUAL_STRS(cp, "allfastint")) {
02108 
02109 # if defined(_ACCEPT_CMD_O_FASTINT)
02110                opt_flags.set_allfastint_option = TRUE;
02111 
02112                if (set_i_option) {
02113                   ntr_msg_queue(0, 1192, Log_Warning, 0,
02114                                 "-i\n-O allfastint\n-i",
02115                                 0, MULT_STR_ARG);
02116                }
02117 # else
02118                ntr_msg_queue(0, 744, Log_Warning, 0,
02119                              "allfastint", 'O', ARG_STR_ARG);
02120 # endif
02121             }
02122             else {
02123                err = TRUE;
02124             }
02125 
02126             break;
02127 
02128 
02129          case 'b':
02130             if (! EQUAL_STRS(cp, "bl")) {
02131                err = TRUE;
02132             }
02133             else {
02134 
02135 #              if defined(_ACCEPT_BL)
02136 
02137                opt_flags.bottom_load  = TRUE;
02138                set_bottom_load_option = TRUE;
02139 
02140 #              else
02141 
02142                ntr_msg_queue(0, 744, Log_Warning, 0, "bl", 'O', ARG_STR_ARG);
02143 
02144 #              endif
02145 
02146             }
02147 
02148             break;
02149     
02150 
02151          case 'f':
02152 
02153             if (EQUAL_STRS(cp, "fastint")) {
02154 
02155 # if defined(_ACCEPT_CMD_O_FASTINT)
02156                opt_flags.set_fastint_option = TRUE;
02157                if (set_i_option) {
02158                   ntr_msg_queue(0, 1192, Log_Warning, 0,
02159                                 "-i\n-O fastint\n-i",
02160                                 0, MULT_STR_ARG);
02161                }
02162 # else
02163                ntr_msg_queue(0, 744, Log_Warning, 0,
02164                             "fastint", 'O', ARG_STR_ARG);
02165 # endif
02166             }
02167             else if (EQUAL_STRS(cp, "fusion")) {
02168 
02169 # if defined(_ACCEPT_CMD_O_FUSION)
02170                opt_flags.fusion = TRUE;
02171 # else
02172                ntr_msg_queue(0, 744, Log_Warning, 0,
02173                             "fusion", 'O', ARG_STR_ARG);
02174 # endif
02175             }
02176             else {
02177                err = TRUE;
02178             }
02179             break;
02180 
02181 
02182          case 'i': 
02183 
02184             if (EQUAL_STRS(cp, "ieeeconform")) {
02185 
02186                if (target_ieee) {
02187                   opt_flags.ieeeconform         = TRUE;
02188                   set_ieeeconform_option        = TRUE;
02189                } 
02190                else {
02191                   ntr_msg_queue(0, 744, Log_Warning, 0,
02192                                "ieeeconform", 'O', ARG_STR_ARG);
02193                } 
02194             }
02195             else if ((strncmp (cp, "inlinefrom=", 11) == IDENTICAL)) {
02196                cp = cp+11;
02197                add_to_fp_table (cp, &inline_path_idx, 'O');
02198                set_inlinefrom_option = TRUE;
02199             }
02200             else if (EQUAL_STRS(cp, "inline0")) {
02201 
02202 #              if defined(_ACCEPT_INLINE)
02203 
02204                opt_flags.inline_lvl = Inline_Lvl_0;   
02205 
02206 #              else
02207 
02208                ntr_msg_queue(0, 744, Log_Warning, 0,
02209                              "inline0", 'O', ARG_STR_ARG);
02210 
02211 #              endif
02212 
02213             }
02214             else if (EQUAL_STRS(cp, "inline1") ||
02215                      EQUAL_STRS(cp, "inlinee1")) {
02216 
02217 #              if defined(_ACCEPT_INLINE)
02218 
02219                if (EQUAL_STRS(cp, "inlinee1")) {
02220                   opt_flags.extent_assert = TRUE;
02221                }
02222 
02223                opt_flags.inline_lvl = Inline_Lvl_1;   
02224 
02225 #              else
02226 
02227                ntr_msg_queue(0, 744, Log_Warning, 0,
02228                              "inline1", 'O', ARG_STR_ARG);
02229 
02230 #              endif
02231 
02232             }
02233             else if (EQUAL_STRS(cp, "inline2") ||
02234                      EQUAL_STRS(cp, "inlinee2")) {
02235 
02236 #              if defined(_ACCEPT_INLINE)
02237 
02238                if (EQUAL_STRS(cp, "inlinee2")) {
02239                   opt_flags.extent_assert = TRUE;
02240                }
02241 
02242                opt_flags.inline_lvl = Inline_Lvl_2;
02243 
02244 #              else
02245 
02246                ntr_msg_queue(0, 744, Log_Warning, 0,
02247                              "inline2", 'O', ARG_STR_ARG);
02248 
02249 #              endif
02250 
02251             }
02252             else if (EQUAL_STRS(cp, "inline3") ||
02253                      EQUAL_STRS(cp, "inlinee3")) {
02254 
02255 #              if defined(_ACCEPT_INLINE)
02256 
02257                if (EQUAL_STRS(cp, "inlinee3")) {
02258                   opt_flags.extent_assert = TRUE;
02259                }
02260 
02261                opt_flags.inline_lvl = Inline_Lvl_3;
02262                ntr_msg_queue(0, 1548, Log_Warning, 0,
02263                              "-O inline3", 0, STR_ARG);
02264 
02265 #              else
02266 
02267                ntr_msg_queue(0, 744, Log_Warning, 0,
02268                              "inline3", 'O', ARG_STR_ARG);
02269 
02270 #              endif
02271             }
02272             else if (EQUAL_STRS(cp, "inline4") ||
02273                      EQUAL_STRS(cp, "inlinee4")) {
02274 
02275 #              if defined(_ACCEPT_INLINE)
02276 
02277                if (EQUAL_STRS(cp, "inlinee4")) {
02278                   opt_flags.extent_assert = TRUE;
02279                }
02280 
02281                opt_flags.inline_lvl = Inline_Lvl_4;
02282 
02283 #              else
02284 
02285                ntr_msg_queue(0, 744, Log_Warning, 0,
02286                              "inline4", 'O', ARG_STR_ARG);
02287 
02288 #              endif
02289             }
02290             else {  
02291                err = TRUE;
02292             }
02293 
02294             if (set_debug_option) {
02295                opt_flags.inline_lvl = Inline_Lvl_0;
02296             }
02297 
02298             break;
02299 
02300 
02301          case 'j':
02302 
02303             if (! EQUAL_STRS(cp, "jump")) {
02304                err = TRUE;
02305             }
02306             else {
02307 
02308 #              if defined(_ACCEPT_CMD_O_JUMP)
02309                opt_flags.jump  = TRUE;
02310 #              else
02311                ntr_msg_queue(0, 744, Log_Warning, 0, "jump", 'O', ARG_STR_ARG);
02312 #              endif
02313 
02314             }
02315 
02316             break;
02317 
02318     
02319          case 'l': 
02320 
02321             if ( !EQUAL_STRS(cp, "loopalign")) {
02322                err = TRUE;
02323             }
02324             else {
02325 
02326 #              if defined(_ACCEPT_CMD_O_LOOPALIGN)
02327 
02328                opt_flags.loopalign   = TRUE;
02329                set_loop_align_option = TRUE;
02330 
02331 #              else
02332 
02333                ntr_msg_queue(0, 744, Log_Warning, 0,
02334                              "loopalign", 'O', ARG_STR_ARG);
02335 
02336 #              endif
02337 
02338             }
02339 
02340             break;
02341 
02342 
02343          case 'm': 
02344 
02345             if (EQUAL_STRS(cp, "modinline")) {
02346 
02347 #              if defined(_ACCEPT_INLINE)
02348                opt_flags.modinline = TRUE;
02349 #              else
02350 
02351                ntr_msg_queue(0, 744, Log_Warning, 0,
02352                              "modinline", 'O', ARG_STR_ARG);
02353 
02354 #              endif
02355 
02356             }
02357             else if (EQUAL_STRS(cp, "msgs")) {
02358                opt_flags.msgs = TRUE;
02359             }
02360             else if (strncmp(cp, "mark", 4) == 0) {
02361                opt_flags.mark = TRUE;
02362                cp             +=4;
02363 
02364                if (*cp != EOS) {
02365 
02366                   if (*cp != EQUAL) {
02367                      err = TRUE;
02368                   }
02369                   else {  /* Check strlen ??  KAY */
02370                      ++cp;
02371                      strcpy(opt_flags.mark_name.string, cp);
02372                   }
02373                }
02374             }
02375             else if (EQUAL_STRS(cp, "matmul_inline")) {
02376 
02377 #              if defined(_ACCEPT_CMD_O_MATMUL_INLINE)
02378                   opt_flags.matmul_inline = TRUE;
02379 #              else
02380                   PRINTMSG (0, 744, Log_Warning, 0, 'O', "matmul_inline");
02381 #              endif
02382 
02383             }
02384             else if (EQUAL_STRS(cp, "mv_matmul_inline")) {
02385 
02386 #              if defined(_ACCEPT_CMD_O_MATMUL_INLINE)
02387                   opt_flags.mv_matmul_inline = TRUE;
02388 #              else
02389                   PRINTMSG (0, 744, Log_Warning, 0, 'O', "mv_matmul_inline");
02390 #              endif
02391 
02392             }
02393             else { 
02394                err = TRUE;
02395             }
02396 
02397             break;
02398 
02399 
02400          case 'n': 
02401 
02402             if (EQUAL_STRS(cp, "negmsgs")) {
02403                opt_flags.neg_msgs = TRUE;
02404             }
02405             else if (EQUAL_STRS(cp, "noaggress")) {
02406                opt_flags.aggress = FALSE;
02407             }
02408             else if (EQUAL_STRS(cp, "nobl")) {
02409 
02410 #              if defined(_ACCEPT_BL)
02411 
02412                opt_flags.bottom_load = FALSE;
02413 
02414 #              else
02415 
02416                ntr_msg_queue(0, 744, Log_Warning, 0, "nobl", 'O', ARG_STR_ARG);
02417 
02418 #              endif
02419 
02420             } 
02421             else if (EQUAL_STRS(cp, "nofastint")) {
02422 
02423 # if defined(_ACCEPT_CMD_O_FASTINT)
02424                opt_flags.set_nofastint_option = TRUE;
02425 
02426                if (set_i_option) {
02427                   ntr_msg_queue(0, 1192, Log_Warning, 0,
02428                                 "-i\n-O nofastint\n-i",
02429                                 0, MULT_STR_ARG);
02430                }
02431 # else
02432                ntr_msg_queue(0, 744, Log_Warning, 0,
02433                              "nofastint", 'O', ARG_STR_ARG);
02434 # endif
02435 
02436             }
02437             else if (EQUAL_STRS(cp, "nofusion")) {
02438 
02439 # if defined(_ACCEPT_CMD_O_FUSION)
02440                opt_flags.fusion = FALSE;
02441 # else
02442                ntr_msg_queue(0, 744, Log_Warning, 0,
02443                              "nofusion", 'O', ARG_STR_ARG);
02444 # endif
02445             }
02446             else if (EQUAL_STRS(cp, "noieeeconform")) {
02447 
02448                if (target_ieee) {
02449                   opt_flags.ieeeconform         = FALSE;
02450                   set_ieeeconform_option        = TRUE;
02451                } 
02452                else {
02453                   ntr_msg_queue(0, 744, Log_Warning, 0,
02454                                 "noieeeconform", 'O', ARG_STR_ARG);
02455                } 
02456             }
02457             else if (EQUAL_STRS(cp, "nointerchange")) {
02458                opt_flags.nointerchange          = TRUE;
02459             }
02460             else if (EQUAL_STRS(cp, "nojump")) {
02461 
02462 #              if defined(_ACCEPT_CMD_O_JUMP)
02463 
02464                opt_flags.jump = FALSE;
02465 
02466 #              else
02467 
02468                ntr_msg_queue(0, 744, Log_Warning, 0,
02469                              "nojump", 'O', ARG_STR_ARG);
02470 
02471 #              endif
02472 
02473             }
02474             else if (EQUAL_STRS(cp, "noloopalign")) {
02475 
02476 #              if defined(_ACCEPT_CMD_O_LOOPALIGN)
02477 
02478                opt_flags.loopalign = FALSE;
02479 
02480 #              else
02481 
02482                ntr_msg_queue(0, 744, Log_Warning, 0,
02483                              "noloopalign", 'O', ARG_STR_ARG);
02484 
02485 #              endif
02486 
02487             }
02488             else if (EQUAL_STRS(cp, "nomodinline")) {
02489 
02490 #              if defined(_ACCEPT_INLINE)
02491                opt_flags.modinline = FALSE;
02492 #              else
02493 
02494                ntr_msg_queue(0, 744, Log_Warning, 0,
02495                              "nomodinline", 'O', ARG_STR_ARG);
02496 
02497 #              endif
02498 
02499             }
02500             else if (EQUAL_STRS(cp, "nomsgs")) {
02501                opt_flags.msgs = FALSE;
02502             }
02503             else if (EQUAL_STRS(cp, "nonegmsgs")) {
02504                opt_flags.neg_msgs = FALSE;
02505             }
02506             else if (EQUAL_STRS(cp, "nopattern")) {
02507                opt_flags.pattern = FALSE;
02508             }
02509             else if (EQUAL_STRS(cp, "nooverindex")) {
02510                opt_flags.over_index = FALSE;
02511             }
02512             else if (EQUAL_STRS(cp, "norecurrence")) {
02513                opt_flags.recurrence = FALSE;
02514             }
02515             else if (EQUAL_STRS(cp, "notaskinner")) {
02516 
02517 #              if defined(_ACCEPT_TASK)
02518 
02519                opt_flags.taskinner = FALSE;
02520 
02521 #              else
02522 
02523                ntr_msg_queue(0, 744, Log_Warning, 0,
02524                              "notaskinner", 'O', ARG_STR_ARG);
02525 
02526 #              endif
02527 
02528             }
02529             else if (EQUAL_STRS(cp, "nothreshold")) {
02530 
02531 #              if defined(_ACCEPT_TASK)
02532 
02533                opt_flags.threshold  = FALSE;
02534 
02535 #              else
02536 
02537                ntr_msg_queue(0, 744, Log_Warning, 0,
02538                              "nothreshold", 'O', ARG_STR_ARG);
02539 
02540 #              endif
02541             }
02542             else if (EQUAL_STRS(cp, "novsearch")) {
02543 
02544 #              if defined(_ACCEPT_VSEARCH)
02545 
02546                opt_flags.vsearch = FALSE;
02547 
02548 #              else
02549 
02550                ntr_msg_queue(0, 744, Log_Warning, 0,
02551                              "novsearch", 'O', ARG_STR_ARG);
02552 
02553 #              endif
02554 
02555             }
02556             else if (EQUAL_STRS(cp, "nozeroinc")) {
02557 
02558 #              if defined(_ACCEPT_CMD_O_ZEROINC)
02559 
02560                opt_flags.zeroinc = FALSE;
02561 
02562 #              else
02563 
02564                ntr_msg_queue(0, 744, Log_Warning, 0,
02565                              "nozeroinc", 'O', ARG_STR_ARG);
02566 
02567 #              endif
02568 
02569             }
02570             else {
02571                err = TRUE;
02572             }
02573 
02574             break;
02575 
02576 
02577          case 'o':
02578 
02579             if (EQUAL_STRS(cp, "overindex")) {
02580                opt_flags.over_index = TRUE;
02581             }
02582             else if (EQUAL_STRS(cp, "opt_info")) {
02583 
02584 #              if defined(_ACCEPT_CMD_O_OPT_INFO)
02585                   opt_flags.opt_info    = TRUE;
02586 #              else
02587                   ntr_msg_queue(0, 744, Log_Warning, 0,
02588                                 "opt_info", 'O', ARG_STR_ARG);
02589 #              endif
02590             }
02591             else {
02592                err = TRUE;
02593             }
02594 
02595             break;
02596 
02597 
02598          case 'p': 
02599 
02600             if (EQUAL_STRS(cp, "pattern")) {
02601                opt_flags.pattern  = TRUE;
02602                set_pattern_option = TRUE;
02603             }
02604             else if (EQUAL_STRS(cp, "pipeline0")) {
02605 
02606 #              if defined(_ACCEPT_CMD_O_PIPELINE)
02607                   opt_flags.pipeline_lvl        = 0;
02608                   set_pipeline_option           = TRUE;
02609 #              else
02610                   ntr_msg_queue(0, 744, Log_Warning, 0,
02611                                 "pipeline0", 'O', ARG_STR_ARG);
02612 #              endif
02613             }
02614             else if (EQUAL_STRS(cp, "pipeline1")) {
02615 
02616 #              if defined(_ACCEPT_CMD_O_PIPELINE)
02617                   opt_flags.pipeline_lvl        = 1;
02618                   set_pipeline_option           = TRUE;
02619 #              else
02620                   ntr_msg_queue(0, 744, Log_Warning, 0,
02621                                 "pipeline1", 'O', ARG_STR_ARG);
02622 #              endif
02623             }
02624             else if (EQUAL_STRS(cp, "pipeline2")) {
02625 
02626 #              if defined(_ACCEPT_CMD_O_PIPELINE)
02627                   opt_flags.pipeline_lvl        = 2;
02628                   set_pipeline_option           = TRUE;
02629 #              else
02630                   ntr_msg_queue(0, 744, Log_Warning, 0,
02631                                 "pipeline2", 'O', ARG_STR_ARG);
02632 #              endif
02633             }
02634             else if (EQUAL_STRS(cp, "pipeline3")) {
02635 
02636 #              if defined(_ACCEPT_CMD_O_PIPELINE)
02637                   opt_flags.pipeline_lvl        = 3;
02638                   set_pipeline_option           = TRUE;
02639 #              else
02640                   ntr_msg_queue(0, 744, Log_Warning, 0,
02641                                 "pipeline3", 'O', ARG_STR_ARG);
02642 #              endif
02643             }
02644             else {
02645                err = TRUE;
02646             }
02647 
02648             break;
02649 
02650     
02651          case 'r': 
02652 
02653             if (EQUAL_STRS(cp, "reshape")) {
02654 
02655 #  if defined(_ACCEPT_CMD_O_RESHAPE)
02656                opt_flags.reshape_all_arrays     = TRUE;
02657                opt_flags.reshape                = TRUE;
02658 # else
02659                ntr_msg_queue(0, 744, Log_Warning, 0,
02660                             "reshape", 'O', ARG_STR_ARG);
02661 # endif
02662             }
02663             else if ((strncmp (cp, "reshape=", 8) == IDENTICAL)) {
02664                cp += 8;
02665                process_reshape_array(cp);
02666             }
02667             else if (! EQUAL_STRS(cp, "recurrence")) {
02668                err = TRUE;
02669             }
02670             else {
02671                opt_flags.recurrence  = TRUE;
02672                set_recurrence_option = TRUE;
02673             }
02674 
02675             break;
02676 
02677 
02678          case 's':
02679 
02680             if (EQUAL_STRS(cp, "scalar0")) {
02681                opt_flags.scalar_lvl = Scalar_Lvl_0;
02682                set_scalar_option    = TRUE;
02683             }
02684             else if (EQUAL_STRS(cp, "scalar1")) {
02685                opt_flags.scalar_lvl = Scalar_Lvl_1;
02686                set_scalar_option    = TRUE;
02687             }
02688             else if (EQUAL_STRS(cp, "scalar2")) {
02689                opt_flags.scalar_lvl = Scalar_Lvl_2;
02690                set_scalar_option    = TRUE;
02691             }
02692             else if (EQUAL_STRS(cp, "scalar3")) {
02693                opt_flags.scalar_lvl = Scalar_Lvl_3;
02694                set_scalar_option    = TRUE;
02695             }
02696             else if (EQUAL_STRS(cp, "split0")) {
02697 
02698 #              if defined(_ACCEPT_SPLIT)
02699                   opt_flags.split_lvl = Split_Lvl_0;
02700 #              else
02701                   ntr_msg_queue(0, 744, Log_Warning, 0,
02702                                 "split0", 'O', ARG_STR_ARG);
02703 #              endif
02704             }
02705             else if (EQUAL_STRS(cp, "split1")) {
02706 
02707 #              if defined(_ACCEPT_SPLIT)
02708                   opt_flags.split_lvl = Split_Lvl_1;
02709 
02710 #              else
02711                   ntr_msg_queue(0, 744, Log_Warning, 0,
02712                                 "split1", 'O', ARG_STR_ARG);
02713 #              endif
02714             }
02715             else if (EQUAL_STRS(cp, "split2")) {
02716 
02717 #              if defined(_ACCEPT_SPLIT)
02718                   opt_flags.split_lvl = Split_Lvl_2;
02719 #             else 
02720                   ntr_msg_queue(0, 744, Log_Warning, 0,
02721                                 "split2", 'O', ARG_STR_ARG);
02722 #              endif
02723             }
02724             else if (EQUAL_STRS(cp, "shortcircuit0")) {
02725 
02726 #              if defined(_ACCEPT_SHORTCIRCUIT)
02727                   opt_flags.short_circuit_lvl = Short_Circuit_Off;
02728 #              else
02729                   ntr_msg_queue(0, 744, Log_Warning, 0,
02730                                 "shortcircuit0", 'O', ARG_STR_ARG);
02731 #              endif
02732 
02733             }
02734             else if (EQUAL_STRS(cp, "shortcircuit1")) {
02735 
02736 #              if defined(_ACCEPT_SHORTCIRCUIT)
02737                   opt_flags.short_circuit_lvl = Short_Circuit_Present;
02738 #              else
02739                   ntr_msg_queue(0, 744, Log_Warning, 0,
02740                                 "shortcircuit1", 'O', ARG_STR_ARG);
02741 #              endif
02742 
02743             }
02744             else if (EQUAL_STRS(cp, "shortcircuit2")) {
02745 
02746 #              if defined(_ACCEPT_SHORTCIRCUIT)
02747                   opt_flags.short_circuit_lvl = Short_Circuit_Left_Right;
02748 #              else
02749                   ntr_msg_queue(0, 744, Log_Warning, 0,
02750                                 "shortcircuit2", 'O', ARG_STR_ARG);
02751 #              endif
02752 
02753             }
02754             else if (EQUAL_STRS(cp, "shortcircuit3")) {
02755 
02756 #              if defined(_ACCEPT_SHORTCIRCUIT)
02757                   opt_flags.short_circuit_lvl = Short_Circuit_Functions;
02758 #              else
02759                   ntr_msg_queue(0, 744, Log_Warning, 0,
02760                                 "shortcircuit3", 'O', ARG_STR_ARG);
02761 #              endif
02762 
02763             }
02764             else if (EQUAL_STRS(cp, "stream0")) {
02765 
02766                if (accept_stream) { 
02767                   set_stream_option     = TRUE;
02768                   opt_flags.stream_lvl  = Stream_Lvl_0;
02769                }
02770                else {
02771                   PRINTMSG (0, 744, Log_Warning, 0, 'O', "stream0");
02772                }
02773             }
02774             else if (EQUAL_STRS(cp, "stream1")) {
02775 
02776                if (accept_stream) { 
02777                   set_stream_option     = TRUE;
02778                   opt_flags.stream_lvl  = Stream_Lvl_1;
02779                }
02780                else {
02781                   PRINTMSG (0, 744, Log_Warning, 0, 'O', "stream1");
02782                }
02783             }
02784             else if (EQUAL_STRS(cp, "stream2")) {
02785 
02786                if (accept_stream) { 
02787                   set_stream_option     = TRUE;
02788                   opt_flags.stream_lvl  = Stream_Lvl_2;
02789                }
02790                else {
02791                   PRINTMSG (0, 744, Log_Warning, 0, 'O', "stream2");
02792                }
02793             }
02794             else if (EQUAL_STRS(cp, "stream3")) {
02795 
02796                if (accept_stream) { 
02797                   set_stream_option     = TRUE;
02798                   opt_flags.stream_lvl  = Stream_Lvl_3;
02799                }
02800                else {
02801                   PRINTMSG (0, 744, Log_Warning, 0, 'O', "stream3");
02802                }
02803             }
02804             else {
02805                err = TRUE;
02806             }
02807 
02808             break;
02809 
02810 
02811          case 't': 
02812 
02813             if (EQUAL_STRS(cp, "task0")) {
02814 
02815 #              if defined(_ACCEPT_TASK)
02816 
02817                opt_flags.task_lvl = Task_Lvl_0;
02818                set_task_option    = TRUE;
02819 
02820 #              else
02821 
02822                ntr_msg_queue(0, 744, Log_Warning, 0, "task0", 'O', ARG_STR_ARG);
02823 
02824 #              endif
02825 
02826             }
02827             else if (EQUAL_STRS(cp, "task1")) {
02828 
02829 #              if defined(_ACCEPT_TASK)
02830 
02831                opt_flags.task_lvl = Task_Lvl_1;
02832                set_task_option    = TRUE;
02833 
02834 #              else
02835 
02836                ntr_msg_queue(0, 744, Log_Warning, 0, "task1", 'O', ARG_STR_ARG);
02837 
02838 #              endif
02839 
02840             }
02841             else if (EQUAL_STRS(cp, "task2")) {
02842 
02843 #              if defined(_ACCEPT_TASK)
02844 
02845                opt_flags.task_lvl = Task_Lvl_2;
02846                set_task_option    = TRUE;
02847 
02848 #              else
02849 
02850                ntr_msg_queue(0, 744, Log_Warning, 0, "task2", 'O', ARG_STR_ARG);
02851 
02852 #              endif
02853 
02854             }
02855             else if (EQUAL_STRS(cp, "task3")) {
02856 
02857 #              if defined(_ACCEPT_TASK)
02858 
02859                opt_flags.task_lvl = Task_Lvl_3;
02860                set_task_option    = TRUE;
02861 
02862 #              else
02863 
02864                ntr_msg_queue(0, 744, Log_Warning, 0, "task3", 'O', ARG_STR_ARG);
02865 
02866 #              endif
02867 
02868             }
02869             else if (EQUAL_STRS(cp, "taskinner")) {
02870 
02871 #              if defined(_ACCEPT_TASK)
02872 
02873                opt_flags.taskinner  = TRUE;
02874                set_taskinner_option = TRUE;
02875 
02876 #              else
02877 
02878                ntr_msg_queue(0, 744, Log_Warning, 0,
02879                              "taskinner", 'O', ARG_STR_ARG);
02880 
02881 #              endif
02882 
02883             }
02884             else if (EQUAL_STRS(cp, "threshold")) {
02885 
02886 #              if defined(_ACCEPT_TASK)
02887                opt_flags.threshold  = TRUE;
02888 #              else
02889                ntr_msg_queue(0, 744, Log_Warning, 0,
02890                              "threshold", 'O', ARG_STR_ARG);
02891 #              endif
02892             }
02893             else {
02894                err = TRUE;
02895             }
02896 
02897             break;
02898 
02899 
02900          case 'u':
02901 
02902             if (EQUAL_STRS(cp, "unroll0")) {
02903 
02904 #              if defined(_ACCEPT_CMD_O_UNROLL)
02905                   opt_flags.unroll_lvl = Unroll_Lvl_0;
02906 #              else
02907                   ntr_msg_queue(0, 744, Log_Warning, 0,
02908                                 "unroll0", 'O', ARG_STR_ARG);
02909 #              endif
02910             }
02911             else if (EQUAL_STRS(cp, "unroll1")) {
02912    
02913 #              if defined(_ACCEPT_CMD_O_UNROLL)
02914                   opt_flags.unroll_lvl = Unroll_Lvl_1;
02915 #              else
02916                   ntr_msg_queue(0, 744, Log_Warning, 0,
02917                                 "unroll1", 'O', ARG_STR_ARG);
02918 #              endif
02919             }
02920             else if (EQUAL_STRS(cp, "unroll2")) {
02921 
02922 #              if defined(_ACCEPT_CMD_O_UNROLL)
02923                   opt_flags.unroll_lvl = Unroll_Lvl_2;
02924 #              else
02925                   ntr_msg_queue(0, 744, Log_Warning, 0,
02926                                 "unroll2", 'O', ARG_STR_ARG);
02927 #              endif
02928             }
02929             else {
02930                err = TRUE;
02931             }
02932             break;
02933 
02934 
02935          case 'v':
02936 
02937             if (EQUAL_STRS(cp, "vector0")) {
02938 
02939 #              if defined(_ACCEPT_VECTOR)
02940                   opt_flags.vector_lvl = Vector_Lvl_0;
02941                   set_vector_option    = TRUE;
02942 #              else
02943                   ntr_msg_queue(0, 744, Log_Warning, 0,
02944                                 "vector0", 'O', ARG_STR_ARG);
02945 #              endif
02946 
02947             }
02948             else if (EQUAL_STRS(cp, "vector1")) {
02949 
02950 #              if defined(_ACCEPT_VECTOR)
02951 
02952                opt_flags.vector_lvl = Vector_Lvl_1;
02953                set_vector_option    = TRUE;
02954 
02955 #              else
02956 
02957                ntr_msg_queue(0, 744, Log_Warning, 0,
02958                              "vector1", 'O', ARG_STR_ARG);
02959 
02960 #              endif
02961 
02962             }
02963             else if (EQUAL_STRS(cp, "vector2")) {
02964 
02965 #              if defined(_ACCEPT_VECTOR)
02966 
02967                opt_flags.vector_lvl = Vector_Lvl_2;
02968                set_vector_option    = TRUE;
02969 
02970 #              else
02971 
02972                ntr_msg_queue(0, 744, Log_Warning, 0,
02973                              "vector2", 'O', ARG_STR_ARG);
02974 
02975 #              endif
02976 
02977             }
02978             else if (EQUAL_STRS(cp, "vector3")) {
02979 
02980 #              if defined(_ACCEPT_VECTOR)
02981 
02982                opt_flags.vector_lvl = Vector_Lvl_3;
02983                set_vector_option    = TRUE;
02984 
02985 #              else
02986 
02987                ntr_msg_queue(0, 744, Log_Warning, 0,
02988                              "vector3", 'O', ARG_STR_ARG);
02989 
02990 #              endif
02991 
02992             }
02993             else if (EQUAL_STRS(cp, "vsearch")) {
02994 
02995 #              if defined(_ACCEPT_VSEARCH)
02996 
02997                opt_flags.vsearch  = TRUE;
02998                set_vsearch_option = TRUE;
02999 
03000 #              else
03001 
03002                ntr_msg_queue(0, 744, Log_Warning, 0,
03003                              "vsearch", 'O', ARG_STR_ARG);
03004 
03005 #              endif
03006 
03007             }
03008             else {
03009                err = TRUE;
03010             }
03011 
03012             break;
03013 
03014 
03015          case 'z':
03016 
03017             if (! EQUAL_STRS(cp, "zeroinc")) {
03018                err = TRUE;
03019             }
03020             else {
03021 
03022 #              if defined(_ACCEPT_CMD_O_ZEROINC)
03023 
03024                opt_flags.zeroinc  = TRUE;
03025                set_zeroinc_option = TRUE;
03026 
03027 #              else
03028 
03029                ntr_msg_queue(0, 744, Log_Warning, 0,
03030                              "zeroinc", 'O', ARG_STR_ARG);
03031 
03032 #              endif
03033 
03034             }
03035 
03036             break;
03037 
03038 
03039          default:
03040             err = TRUE;
03041             break;
03042       }                            /* End -O argument switch.                 */
03043 
03044 
03045       /* Option has an invalid argument?                                      */
03046 
03047       if (err) {
03048 
03049          if (first && (argc == optind)) {
03050 
03051             /* We're seeing something similar to -O end.f        */
03052             /* This is the first time through the while loop     */
03053             /* and there is nothing on the commandline following */
03054             /* the -O and its argument.  We will assume this is  */
03055             /* a lone -O and that the argument is really the     */
03056             /* file to be compiled.  We could also be seeing     */
03057             /* -O vctor where the input is expected to be from   */
03058             /* stdin, but we'll go with the first choice because */
03059             /* it could be correct.  If we didn't we might be    */
03060             /* issuing an error for a valid commandline.         */
03061 
03062             ntr_msg_queue(0, 1221, Log_Warning, 0, (char *) NULL, 0, NO_ARG);
03063             --optind;
03064          }
03065          else {
03066             ntr_msg_queue(0, 78, Log_Error, 0, cp, 'O', ARG_STR_ARG);
03067          }
03068       }
03069 
03070       first     = FALSE;
03071    }                               /* End -O argument WHILE loop.             */
03072 
03073    TRACE (Func_Exit, "process_O_option", NULL);
03074 
03075    return;
03076 
03077 }  /* process_O_option */
03078 
03079 
03080 /******************************************************************************\
03081 |*                                                                            *|
03082 |* Description:                                                               *|
03083 |*      Validate_O_option is called to check the precedence of optimization   *|
03084 |*      options selected.                                                     *|
03085 |*                                                                            *|
03086 |* Input parameters:                                                          *|
03087 |*      NONE                                                                  *|
03088 |*                                                                            *|
03089 |* Output parameters:                                                         *|
03090 |*      NONE                                                                  *|
03091 |*                                                                            *|
03092 |* Returns:                                                                   *|
03093 |*      NOTHING                                                               *|
03094 |*                                                                            *|
03095 \******************************************************************************/
03096 
03097 static void validate_O_option (void)
03098 
03099 {
03100    char          msg_str[30];
03101    boolean       option_conflict        = FALSE;
03102    int           scalar;
03103    char         *str;
03104    int           task;
03105 
03106 #  if defined(_ACCEPT_VECTOR)
03107    int           vector;
03108 #  endif
03109 
03110 
03111    TRACE (Func_Entry, "validate_O_option", NULL);
03112 
03113    /* If a general optimization option (-O<number>) was specified, no         */
03114    /* specific option (such as -Otask1) can be specified, even if the specific*/
03115    /* option is one that would be implied by the general option.              */
03116 
03117    if (set_support_lvl_option) {
03118 
03119       if (set_scalar_option) {
03120          ntr_msg_queue(0, 1535, Log_Error, 0, 
03121                        scalar_lvl_str[opt_flags.scalar_lvl],
03122                        (long) opt_flags.support_lvl, ARG_STR_ARG);
03123          option_conflict = TRUE;
03124       }
03125 
03126       if (set_vector_option) {
03127          ntr_msg_queue(0, 1535, Log_Error, 0, 
03128                        vector_lvl_str[opt_flags.vector_lvl],
03129                        (long) opt_flags.support_lvl, ARG_STR_ARG);
03130          option_conflict = TRUE;
03131       }
03132 
03133       if (set_task_option) {
03134          ntr_msg_queue(0, 1535, Log_Error, 0, 
03135                        task_lvl_str[opt_flags.task_lvl],
03136                        (long) opt_flags.support_lvl, ARG_STR_ARG);
03137          option_conflict = TRUE;
03138       }
03139    }
03140 
03141    if (option_conflict) {
03142       goto EXIT;
03143    }
03144 
03145    /* Need to check for errors and possibly reset defaults.  An error is set  */
03146    /* if the user requests an invalid combination, but if a user requests a   */
03147    /* valid combination any options not set by the user are adjusted and a    */
03148    /* warning message is issued.  The scalar option is always allowed.  This  */
03149    /* code only needs to be executed if another option, task or vector is     */
03150    /* allowed.                                                                */
03151 
03152 # ifdef _ACCEPT_TASK
03153 
03154    if (set_taskinner_option  &&  opt_flags.taskinner) {
03155 
03156       if (set_task_option  ||  set_support_lvl_option) {
03157 
03158          if (opt_flags.task_lvl < Task_Lvl_2) {
03159             ntr_msg_queue(0, 1182, Log_Error, 0, (char *) NULL, 0, NO_ARG);
03160          }
03161       }
03162       else {
03163          ntr_msg_queue(0, 1182, Log_Error, 0, (char *) NULL, 0, NO_ARG);
03164       }
03165    }
03166 
03167 # endif
03168 
03169 
03170 #  if defined(_ACCEPT_TASK) && defined(_ACCEPT_VECTOR)
03171 
03172    if (! set_vector_option  &&  ! set_scalar_option  &&  ! set_task_option) {
03173       goto CONTINUE;   /* Nothing is set.  No checking needs to be done. */
03174    }
03175 
03176    if (set_vector_option && set_scalar_option && set_task_option) {
03177 
03178       if (opt_flags.scalar_lvl >= opt_flags.vector_lvl &&
03179           opt_flags.vector_lvl >= opt_flags.task_lvl) {
03180 
03181          /* okay - intentionally blank */
03182       }
03183       else if (opt_flags.task_lvl > Task_Lvl_1 &&
03184                opt_flags.task_lvl > opt_flags.vector_lvl) {
03185          msg_str[0] = NULL_CHAR;
03186          strcpy(msg_str, vector_lvl_str[opt_flags.vector_lvl]);
03187          strcpy(&msg_str[7], "\n");
03188          strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]);
03189          ntr_msg_queue(0, 99, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03190       }
03191       else if (opt_flags.scalar_lvl == Scalar_Lvl_2 &&
03192                opt_flags.vector_lvl == Vector_Lvl_3) {
03193 
03194          /* Okay - intentionally blank */
03195          /* Rule exception - scalar2, vector3  */
03196       }
03197       else if (opt_flags.scalar_lvl < opt_flags.vector_lvl) {
03198          msg_str[0] = NULL_CHAR;
03199          strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]);
03200          strcpy(&msg_str[7], "\n");
03201          strcpy(&msg_str[8], vector_lvl_str[opt_flags.vector_lvl]);
03202          ntr_msg_queue(0, 99, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03203       }
03204    }
03205    else if (set_vector_option  &&  set_scalar_option) {
03206 
03207       if (opt_flags.scalar_lvl == Scalar_Lvl_2  &&
03208           opt_flags.vector_lvl == Vector_Lvl_3) {
03209 
03210          /* Okay - intentionally blank */
03211          /* Rule exception - scalar2, vector3  */
03212          /* If vector3, task can be anything */
03213       }
03214       else if (opt_flags.scalar_lvl < opt_flags.vector_lvl) {
03215          msg_str[0] = NULL_CHAR;
03216          strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]);
03217          strcpy(&msg_str[7], "\n");
03218          strcpy(&msg_str[8], vector_lvl_str[opt_flags.vector_lvl]);
03219          ntr_msg_queue(0, 99, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03220       }
03221       else if (opt_flags.task_lvl > opt_flags.vector_lvl  &&
03222                opt_flags.task_lvl > Task_Lvl_1) {
03223          task = (opt_flags.vector_lvl == Vector_Lvl_0) ?
03224                  Task_Lvl_1 : opt_flags.vector_lvl;
03225 
03226          msg_str[0] = NULL_CHAR;
03227          strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]); 
03228          strcpy(&msg_str[7], "\n");
03229          strcpy(&msg_str[8], vector_lvl_str[opt_flags.vector_lvl]); 
03230          strcpy(&msg_str[15], "\n");
03231          strcpy(&msg_str[16], task_lvl_str[opt_flags.task_lvl]); 
03232          strcpy(&msg_str[21], "\n");
03233          strcpy(&msg_str[22], task_lvl_str[task]); 
03234 
03235          ntr_msg_queue(0, 1064, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03236          opt_flags.task_lvl = task;
03237       }
03238    }
03239    else if (set_scalar_option  &&  set_task_option) {
03240 
03241       if (opt_flags.task_lvl == Task_Lvl_3  &&
03242           opt_flags.scalar_lvl == Scalar_Lvl_2) {
03243 
03244          /* Rule exception - Scalar2, Task3 is okay. */
03245 
03246          if (opt_flags.vector_lvl != Vector_Lvl_3) {
03247             msg_str[0] = NULL_CHAR;
03248             strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]); 
03249             strcpy(&msg_str[7], "\n");
03250             strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]); 
03251             strcpy(&msg_str[13], "\n");
03252             strcpy(&msg_str[14], vector_lvl_str[opt_flags.vector_lvl]); 
03253             strcpy(&msg_str[21], "\n");
03254             strcpy(&msg_str[22], vector_lvl_str[Vector_Lvl_3]); 
03255 
03256             ntr_msg_queue(0, 1064, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03257             opt_flags.vector_lvl = Vector_Lvl_3;
03258          }
03259       }
03260       else if (opt_flags.task_lvl <= Task_Lvl_1) {
03261 
03262          /* Just check scalar and vector */
03263 
03264          if (opt_flags.vector_lvl > opt_flags.scalar_lvl) {
03265             vector = opt_flags.scalar_lvl;
03266             msg_str[0] = NULL_CHAR;
03267             strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]); 
03268             strcpy(&msg_str[7], "\n");
03269             strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]); 
03270             strcpy(&msg_str[13], "\n");
03271             strcpy(&msg_str[14], vector_lvl_str[opt_flags.vector_lvl]); 
03272             strcpy(&msg_str[21], "\n");
03273             strcpy(&msg_str[22], vector_lvl_str[vector]); 
03274 
03275             ntr_msg_queue(0, 1064, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03276             opt_flags.vector_lvl = vector;
03277          }
03278       }
03279       else if (opt_flags.task_lvl > opt_flags.scalar_lvl) {
03280          msg_str[0] = NULL_CHAR;
03281          strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]);
03282          strcpy(&msg_str[7], "\n");
03283          strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]);
03284          ntr_msg_queue(0, 99, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03285       }
03286       else if (opt_flags.task_lvl > opt_flags.vector_lvl) {
03287          vector = opt_flags.task_lvl;
03288          msg_str[0] = NULL_CHAR;
03289          strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]); 
03290          strcpy(&msg_str[7], "\n");
03291          strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]); 
03292          strcpy(&msg_str[13], "\n");
03293          strcpy(&msg_str[14], vector_lvl_str[opt_flags.vector_lvl]); 
03294          strcpy(&msg_str[21], "\n");
03295          strcpy(&msg_str[22], vector_lvl_str[vector]); 
03296          ntr_msg_queue(0, 1064, Log_Warning, 0, msg_str, 0, MULT_STR_ARG);
03297 
03298          opt_flags.vector_lvl = vector;
03299       }
03300    }
03301    else if (set_vector_option  &&  set_task_option) {
03302 
03303       if (opt_flags.task_lvl > Task_Lvl_1 &&
03304           opt_flags.task_lvl > opt_flags.vector_lvl) {
03305          msg_str[0] = NULL_CHAR;
03306          strcpy(msg_str, vector_lvl_str[opt_flags.vector_lvl]);
03307          strcpy(&msg_str[7], "\n");
03308          strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]);
03309          ntr_msg_queue(0, 99, Log_Error, 0, msg_str, 0, MULT_STR_ARG);
03310       }
03311       else if (opt_flags.vector_lvl > opt_flags.scalar_lvl) {
03312 
03313          if (opt_flags.scalar_lvl == Scalar_Lvl_2) {
03314 
03315             /* Rule exception - scalar2, vector3   If vector is         */
03316             /* Vector_Lvl_3 then task can be anything so this is legal. */
03317          }
03318          else {
03319             scalar = (opt_flags.vector_lvl == Vector_Lvl_3) ?
03320                      Scalar_Lvl_2 : opt_flags.vector_lvl;
03321             msg_str[0] = NULL_CHAR;
03322             strcpy(msg_str, vector_lvl_str[opt_flags.vector_lvl]); 
03323             strcpy(&msg_str[7], "\n");
03324             strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]); 
03325             strcpy(&msg_str[13], "\n");
03326             strcpy(&msg_str[14], scalar_lvl_str[opt_flags.scalar_lvl]); 
03327             strcpy(&msg_str[21], "\n");
03328             strcpy(&msg_str[22], scalar_lvl_str[scalar]); 
03329             ntr_msg_queue(0, 1064, Log_Warning, 0, msg_str, 0, MULT_STR_ARG);
03330 
03331             opt_flags.scalar_lvl = scalar;
03332          }
03333       }
03334    }
03335    else if (set_scalar_option) {
03336 
03337       if (opt_flags.vector_lvl > opt_flags.scalar_lvl) { 
03338          vector = opt_flags.scalar_lvl;
03339          msg_str[0] = NULL_CHAR;
03340          strcpy(msg_str, scalar_lvl_str[opt_flags.scalar_lvl]); 
03341          strcpy(&msg_str[7], "\n");
03342          strcpy(&msg_str[8], vector_lvl_str[opt_flags.vector_lvl]); 
03343          strcpy(&msg_str[15], "\n");
03344          strcpy(&msg_str[16], vector_lvl_str[vector]); 
03345 
03346          ntr_msg_queue(0, 1068, Log_Warning, 0, msg_str, 0, MULT_STR_ARG);
03347          opt_flags.vector_lvl = vector;
03348       }
03349 
03350       if (opt_flags.task_lvl > opt_flags.vector_lvl  && 
03351           opt_flags.task_lvl > Task_Lvl_1) {
03352          task = (opt_flags.vector_lvl == Vector_Lvl_0) ?
03353                  Task_Lvl_1 : opt_flags.vector_lvl;
03354          msg_str[0] = NULL_CHAR;
03355          strcpy(msg_str, vector_lvl_str[opt_flags.vector_lvl]); 
03356          strcpy(&msg_str[7], "\n");
03357          strcpy(&msg_str[8], task_lvl_str[opt_flags.task_lvl]); 
03358          strcpy(&msg_str[13], "\n");
03359          strcpy(&msg_str[14], task_lvl_str[task]); 
03360 
03361          ntr_msg_queue(0, 1068, Log_Warning, 0, msg_str, 0, MULT_STR_ARG);
03362          opt_flags.task_lvl = task;
03363       }
03364    }
03365    else if (set_vector_option) {
03366 
03367       if (opt_flags.vector_lvl > opt_flags.scalar_lvl  && 
03368           opt_flags.scalar_lvl != Scalar_Lvl_2) {
03369 
03370          /* Raise scalar lvl unless vector is level 3 */
03371 
03372          scalar = (opt_flags.vector_lvl == Vector_Lvl_3) ?
03373                    Scalar_Lvl_2 : opt_flags.