OSDN Git Service

* common.opt (flag_stack_check): New Variable entry.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Dec 2010 13:58:52 +0000 (13:58 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Dec 2010 13:58:52 +0000 (13:58 +0000)
(fcompare-debug-second): Use Var.
* flags.h (flag_compare_debug, flag_stack_check): Remove.
* opts.c (flag_compare_debug): Remove.
(common_handle_option): Don't handle OPT_fcompare_debug_second.
Set opts->x_flag_stack_check for OPT_fstack_check_.
* toplev.c (flag_stack_check): Remove.

ada:
* gcc-interface/misc.c (flag_compare_debug, flag_stack_check):
Undefine as macros then define as variables.
(gnat_post_options): Set variables from global_options.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167331 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c
gcc/common.opt
gcc/flags.h
gcc/opts.c
gcc/toplev.c

index 00e29e2..8d8c120 100644 (file)
@@ -1,5 +1,15 @@
 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
 
 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
 
+       * common.opt (flag_stack_check): New Variable entry.
+       (fcompare-debug-second): Use Var.
+       * flags.h (flag_compare_debug, flag_stack_check): Remove.
+       * opts.c (flag_compare_debug): Remove.
+       (common_handle_option): Don't handle OPT_fcompare_debug_second.
+       Set opts->x_flag_stack_check for OPT_fstack_check_.
+       * toplev.c (flag_stack_check): Remove.
+
+2010-12-01  Joseph Myers  <joseph@codesourcery.com>
+
        * common.opt (main_input_filename, main_input_basename,
        main_input_baselength): New Variable entries.  From toplev.c.
        * final.c (output_quoted_string): Move from toplev.c.
        * common.opt (main_input_filename, main_input_basename,
        main_input_baselength): New Variable entries.  From toplev.c.
        * final.c (output_quoted_string): Move from toplev.c.
index 03f2d68..c747696 100644 (file)
@@ -1,3 +1,9 @@
+2010-12-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * gcc-interface/misc.c (flag_compare_debug, flag_stack_check):
+       Undefine as macros then define as variables.
+       (gnat_post_options): Set variables from global_options.
+
 2010-11-27  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR ada/46574
 2010-11-27  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR ada/46574
index ed66f8b..360ebab 100644 (file)
@@ -221,8 +221,12 @@ gnat_init_options (unsigned int decoded_options_count,
    of the global_options structure.  */
 #undef optimize
 #undef optimize_size
    of the global_options structure.  */
 #undef optimize
 #undef optimize_size
+#undef flag_compare_debug
+#undef flag_stack_check
 int optimize;
 int optimize_size;
 int optimize;
 int optimize_size;
+int flag_compare_debug;
+enum stack_check_type flag_stack_check = NO_STACK_CHECK;
 
 /* Post-switch processing.  */
 
 
 /* Post-switch processing.  */
 
@@ -252,6 +256,8 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
 
   optimize = global_options.x_optimize;
   optimize_size = global_options.x_optimize_size;
 
   optimize = global_options.x_optimize;
   optimize_size = global_options.x_optimize_size;
+  flag_compare_debug = global_options.x_flag_compare_debug;
+  flag_stack_check = global_options.x_flag_stack_check;
 
   return false;
 }
 
   return false;
 }
index dd672a0..c21c676 100644 (file)
@@ -129,6 +129,10 @@ unsigned int initial_max_fld_align = TARGET_DEFAULT_PACK_STRUCT
 Variable
 enum vect_verbosity_levels user_vect_verbosity_level = MAX_VERBOSITY_LEVEL
 
 Variable
 enum vect_verbosity_levels user_vect_verbosity_level = MAX_VERBOSITY_LEVEL
 
+; Type of stack check.
+Variable
+enum stack_check_type flag_stack_check = NO_STACK_CHECK
+
 ; -dA causes debug commentary information to be produced in
 ; the generated assembly code (to make it more readable).  This option
 ; is generally only of use to those who actually need to read the
 ; -dA causes debug commentary information to be produced in
 ; the generated assembly code (to make it more readable).  This option
 ; is generally only of use to those who actually need to read the
@@ -831,7 +835,7 @@ Common Driver JoinedOrMissing RejectNegative Var(flag_compare_debug_opt)
 -fcompare-debug[=<opts>]       Compile with and without e.g. -gtoggle, and compare the final-insns dump
 
 fcompare-debug-second
 -fcompare-debug[=<opts>]       Compile with and without e.g. -gtoggle, and compare the final-insns dump
 
 fcompare-debug-second
-Common Driver RejectNegative
+Common Driver RejectNegative Var(flag_compare_debug)
 Run only the second compilation of -fcompare-debug
 
 fconserve-stack
 Run only the second compilation of -fcompare-debug
 
 fconserve-stack
index a3e277c..4104955 100644 (file)
@@ -34,11 +34,6 @@ extern const char *const debug_type_names[];
 extern void strip_off_ending (char *, int);
 extern int base_of_path (const char *path, const char **base_out);
 
 extern void strip_off_ending (char *, int);
 extern int base_of_path (const char *path, const char **base_out);
 
-/* Run the second compilation of -fcompare-debug.  Not defined using
-   Var in common.opt because this is used in Ada code and so must be
-   an actual variable not a macro.  */
-extern int flag_compare_debug;
-
 /* True if this is the LTO front end (lto1).  This is used to disable
    gimple generation and lowering passes that are normally run on the
    output of a front end.  These passes must be bypassed for lto since
 /* True if this is the LTO front end (lto1).  This is used to disable
    gimple generation and lowering passes that are normally run on the
    output of a front end.  These passes must be bypassed for lto since
@@ -120,8 +115,6 @@ extern struct target_flag_state *this_target_flag_state;
 /* Nonzero if we dump in VCG format, not plain text.  */
 extern int dump_for_graph;
 
 /* Nonzero if we dump in VCG format, not plain text.  */
 extern int dump_for_graph;
 
-extern enum stack_check_type flag_stack_check;
-
 /* Returns TRUE if generated code should match ABI version N or
    greater is in use.  */
 
 /* Returns TRUE if generated code should match ABI version N or
    greater is in use.  */
 
index 8174d15..281aab6 100644 (file)
@@ -35,11 +35,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "insn-attr.h"         /* For INSN_SCHEDULING and DELAY_SLOTS.  */
 #include "target.h"
 
 #include "insn-attr.h"         /* For INSN_SCHEDULING and DELAY_SLOTS.  */
 #include "target.h"
 
-/* Run the second compilation of -fcompare-debug.  Not defined using
-   Var in common.opt because this is used in Ada code and so must be
-   an actual variable not a macro.  */
-int flag_compare_debug;
-
 /* Parse the -femit-struct-debug-detailed option value
    and set the flag variables. */
 
 /* Parse the -femit-struct-debug-detailed option value
    and set the flag variables. */
 
@@ -1447,10 +1442,6 @@ common_handle_option (struct gcc_options *opts,
       /* Deferred.  */
       break;
 
       /* Deferred.  */
       break;
 
-    case OPT_fcompare_debug_second:
-      flag_compare_debug = value;
-      break;
-
     case OPT_fdbg_cnt_:
     case OPT_fdbg_cnt_list:
       /* Deferred.  */
     case OPT_fdbg_cnt_:
     case OPT_fdbg_cnt_list:
       /* Deferred.  */
@@ -1602,15 +1593,15 @@ common_handle_option (struct gcc_options *opts,
 
     case OPT_fstack_check_:
       if (!strcmp (arg, "no"))
 
     case OPT_fstack_check_:
       if (!strcmp (arg, "no"))
-       flag_stack_check = NO_STACK_CHECK;
+       opts->x_flag_stack_check = NO_STACK_CHECK;
       else if (!strcmp (arg, "generic"))
        /* This is the old stack checking method.  */
       else if (!strcmp (arg, "generic"))
        /* This is the old stack checking method.  */
-       flag_stack_check = STACK_CHECK_BUILTIN
+       opts->x_flag_stack_check = STACK_CHECK_BUILTIN
                           ? FULL_BUILTIN_STACK_CHECK
                           : GENERIC_STACK_CHECK;
       else if (!strcmp (arg, "specific"))
        /* This is the new stack checking method.  */
                           ? FULL_BUILTIN_STACK_CHECK
                           : GENERIC_STACK_CHECK;
       else if (!strcmp (arg, "specific"))
        /* This is the new stack checking method.  */
-       flag_stack_check = STACK_CHECK_BUILTIN
+       opts->x_flag_stack_check = STACK_CHECK_BUILTIN
                           ? FULL_BUILTIN_STACK_CHECK
                           : STACK_CHECK_STATIC_BUILTIN
                             ? STATIC_BUILTIN_STACK_CHECK
                           ? FULL_BUILTIN_STACK_CHECK
                           : STACK_CHECK_STATIC_BUILTIN
                             ? STATIC_BUILTIN_STACK_CHECK
index 2cef957..78985cb 100644 (file)
@@ -170,9 +170,6 @@ int flag_permissive = 0;
    the support provided depends on the backend.  */
 rtx stack_limit_rtx;
 
    the support provided depends on the backend.  */
 rtx stack_limit_rtx;
 
-/* Type of stack check.  */
-enum stack_check_type flag_stack_check = NO_STACK_CHECK;
-
 /* True if the user has tagged the function with the 'section'
    attribute.  */
 
 /* True if the user has tagged the function with the 'section'
    attribute.  */