aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 01297b0..a6a7c33 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -641,6 +641,21 @@ decode_options (unsigned int argc, const char **argv)
flag_reorder_blocks_and_partition = 0;
flag_reorder_blocks = 1;
}
+
+ /* The optimization to partition hot and cold basic blocks into
+ separate sections of the .o and executable files does not currently
+ work correctly with DWARF debugging turned on. Until this is fixed
+ we will disable the optimization when DWARF debugging is set. */
+
+ if (flag_reorder_blocks_and_partition
+ && (write_symbols == DWARF_DEBUG
+ || write_symbols == DWARF2_DEBUG))
+ {
+ warning
+ ("-freorder-blocks-and-partition does not work with -g (currently)");
+ flag_reorder_blocks_and_partition = 0;
+ flag_reorder_blocks = 1;
+ }
}
/* Handle target- and language-independent options. Return zero to