diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/darwin-driver.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5c455f..919ceaf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-06-19 Iain Sandoe <iain@sandoe.co.uk> + + * config/darwin-driver.c (darwin_driver_init): Fix off-by-one errors + in computing the number of options to be moved. + 2019-06-19 Maya Rashish <coypu@sdf.org> * config/arm/netbsd-elf.h (SYSARCH_ARM_SYNC_ICACHE): New definition. diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 01238e2..3d85f29c 100644 --- a/gcc/config/darwin-driver.c +++ b/gcc/config/darwin-driver.c @@ -261,7 +261,7 @@ darwin_driver_init (unsigned int *decoded_options_count, if (*decoded_options_count > i) { memmove (*decoded_options + i, *decoded_options + i + 1, - ((*decoded_options_count - i) + ((*decoded_options_count - i - 1) * sizeof (struct cl_decoded_option))); } --i; @@ -307,7 +307,7 @@ darwin_driver_init (unsigned int *decoded_options_count, if (*decoded_options_count > i) { memmove (*decoded_options + i, *decoded_options + i + 1, - ((*decoded_options_count - i) + ((*decoded_options_count - i - 1) * sizeof (struct cl_decoded_option))); } --i; |