summaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-22 13:19:06 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-22 13:19:06 +0000
commitaee081df0f4394566a5d68879502634d6900e311 (patch)
tree1edd1d72e20a2228a6757315146395eae0926b90 /gcc/opts.c
parent5f468e52abd922b178b97070738ae8e9185bd3d9 (diff)
downloadgcc-aee081df0f4394566a5d68879502634d6900e311.tar.gz
2008-07-22 Basile Starynkevitch <basile@starynkevitch.net>
MERGED WITH TRUNK rev138050 * gcc/compiler-probe.c: more C++ friendly. * gcc/passes.c: merged with trunk. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@138056 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 7e8e96c4dad..0533c9fa5da 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -849,15 +849,28 @@ decode_options (unsigned int argc, const char **argv)
}
}
- if (!optimize)
+
+ if (!flag_unit_at_a_time)
{
- flag_merge_constants = 0;
+ flag_section_anchors = 0;
+ flag_toplevel_reorder = 0;
+ flag_unit_at_a_time = 1;
+ }
+ if (!flag_toplevel_reorder)
+ {
+ if (flag_section_anchors == 1)
+ error ("Section anchors must be disabled when toplevel reorder is disabled.");
+ flag_section_anchors = 0;
}
- if (!no_unit_at_a_time_default)
+ if (!optimize)
{
- flag_unit_at_a_time = 1;
- if (!optimize)
+ flag_merge_constants = 0;
+
+ /* We disable toplevel reordering at -O0 to disable transformations that
+ might be surprising to end users and to get -fno-toplevel-reorder
+ tested, but we keep section anchors. */
+ if (flag_toplevel_reorder == 2)
flag_toplevel_reorder = 0;
}