diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-19 17:56:01 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-19 17:56:01 +0000 |
commit | c451bee6e149aafa1872d90dcc719f50d73c6cfb (patch) | |
tree | 296149cfc20b545876f5462a5da72b630a3c511b | |
parent | 010799ab1f745b1e863d0b0d7457eec5d5b2512e (diff) | |
download | gcc-c451bee6e149aafa1872d90dcc719f50d73c6cfb.tar.gz |
* config/i386/i386.c (ix86_function_specific_save): Test that
fields match values, rather than testing the values are in a
certain range.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148721 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4e7816bb45..695547c4618 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-06-19 Ian Lance Taylor <iant@google.com> + + * config/i386/i386.c (ix86_function_specific_save): Test that + fields match values, rather than testing the values are in a + certain range. + 2009-06-19 Richard Guenther <rguenther@suse.de> * tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 61774cc0fdf..06ae734af30 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3424,12 +3424,6 @@ override_options (bool main_args_p) static void ix86_function_specific_save (struct cl_target_option *ptr) { - gcc_assert (IN_RANGE (ix86_arch, 0, 255)); - gcc_assert (IN_RANGE (ix86_schedule, 0, 255)); - gcc_assert (IN_RANGE (ix86_tune, 0, 255)); - gcc_assert (IN_RANGE (ix86_fpmath, 0, 255)); - gcc_assert (IN_RANGE (ix86_branch_cost, 0, 255)); - ptr->arch = ix86_arch; ptr->schedule = ix86_schedule; ptr->tune = ix86_tune; @@ -3439,6 +3433,14 @@ ix86_function_specific_save (struct cl_target_option *ptr) ptr->arch_specified = ix86_arch_specified; ptr->ix86_isa_flags_explicit = ix86_isa_flags_explicit; ptr->target_flags_explicit = target_flags_explicit; + + /* The fields are char but the variables are not; make sure the + values fit in the fields. */ + gcc_assert (ptr->arch == ix86_arch); + gcc_assert (ptr->schedule == ix86_schedule); + gcc_assert (ptr->tune == ix86_tune); + gcc_assert (ptr->fpmath == ix86_fpmath); + gcc_assert (ptr->branch_cost == ix86_branch_cost); } /* Restore the current options */ |