@@ -34,6 +34,7 @@ enum opt_levels
OPT_LEVELS_1_PLUS, /* -O1 and above, including -Os and -Og. */
OPT_LEVELS_1_PLUS_SPEED_ONLY, /* -O1 and above, but not -Os or -Og. */
OPT_LEVELS_1_PLUS_NOT_DEBUG, /* -O1 and above, but not -Og. */
+ OPT_LEVELS_1_DEBUG, /* -Og. */
OPT_LEVELS_2_PLUS, /* -O2 and above, including -Os. */
OPT_LEVELS_2_PLUS_SPEED_ONLY, /* -O2 and above, but not -Os or -Og. */
OPT_LEVELS_3_PLUS, /* -O3 and above. */
@@ -370,6 +370,10 @@ maybe_default_option (struct gcc_options *opts,
enabled = (level >= 1 && !debug);
break;
+ case OPT_LEVELS_1_DEBUG:
+ enabled = (level == 1 && debug);
+ break;
+
case OPT_LEVELS_2_PLUS:
enabled = (level >= 2);
break;
@@ -477,6 +481,8 @@ static const struct default_options default_options_table[] =
{ OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_fssa_phiopt, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_ftree_builtin_call_dce, NULL, 1 },
{ OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
+ { OPT_LEVELS_1_DEBUG, OPT_fdebug_nops, NULL, 1 },
+ { OPT_LEVELS_1_DEBUG, OPT_fkeep_vars_live, NULL, 1 },
/* -O2 optimizations. */
{ OPT_LEVELS_2_PLUS, OPT_finline_small_functions, NULL, 1 },
@@ -1,6 +1,6 @@
/* PR target/84614 */
/* { dg-do run { target int128 } } */
-/* { dg-options "-Og -fno-split-wide-types -fno-tree-coalesce-vars -g --param=max-combine-insns=3 -fcompare-debug" } */
+/* { dg-options "-Og -fno-split-wide-types -fno-tree-coalesce-vars -g --param=max-combine-insns=3 -fcompare-debug -fno-debug-nops" } */
unsigned __int128 a;