aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
-rw-r--r--gcc/ada/gcc-interface/misc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c
index 1819977..a991fba 100644
--- a/gcc/ada/gcc-interface/misc.c
+++ b/gcc/ada/gcc-interface/misc.c
@@ -303,6 +303,13 @@ gnat_init_options (unsigned int decoded_options_count,
flag_zero_initialized_in_bss = 0;
}
+/* Ada code requires variables for these settings rather than elements
+ of the global_options structure. */
+#undef optimize
+#undef optimize_size
+int optimize;
+int optimize_size;
+
/* Post-switch processing. */
static bool
@@ -334,6 +341,9 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
if (write_symbols == DWARF2_DEBUG)
use_gnu_debug_info_extensions = gnat_dwarf_extensions > 0;
+ optimize = global_options.x_optimize;
+ optimize_size = global_options.x_optimize_size;
+
return false;
}