The following disables bit-CCP (which can cause quite some iteration with loops) at -Og.
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2014-07-15 Richard Biener <rguent...@suse.de> * opts.c (default_options_table): Disable bit-ccp at -Og. Index: gcc/opts.c =================================================================== --- gcc/opts.c (revision 212548) +++ gcc/opts.c (working copy) @@ -440,7 +440,7 @@ static const struct default_options defa { OPT_LEVELS_1_PLUS, OPT_fshrink_wrap, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fsplit_wide_types, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_ccp, NULL, 1 }, - { OPT_LEVELS_1_PLUS, OPT_ftree_bit_ccp, NULL, 1 }, + { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_ftree_bit_ccp, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_dce, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_dominator_opts, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_ftree_dse, NULL, 1 },