From 3d1b7f135d4507cc748a09256d1e8c37e9222d80 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Fri, 24 Sep 2010 14:06:35 +0000 Subject: [PATCH] re PR bootstrap/45751 (Bootstrap failure: at stage 1 xgcc segfault) PR bootstrap/45751 * gcc/config/darwin-driver.c (darwin_default_min_version): Adjust size passed to memcpy in two places. Co-Authored-By: Dominique d'Humieres From-SVN: r164592 --- gcc/ChangeLog | 7 +++++++ gcc/config/darwin-driver.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d8c5125c17c..7f024889c46 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-09-24 Iain Sandoe + Dominique Dhumieres + + PR bootstrap/45751 + * gcc/config/darwin-driver.c (darwin_default_min_version): + Adjust size passed to memcpy in two places. + 2010-09-24 Richard Guenther * c-decl.c (pop_scope): Always set file-scope DECL_CONTEXT. diff --git a/gcc/config/darwin-driver.c b/gcc/config/darwin-driver.c index 099226c25d3..1123aa37c43 100644 --- a/gcc/config/darwin-driver.c +++ b/gcc/config/darwin-driver.c @@ -76,7 +76,7 @@ darwin_default_min_version (unsigned int *decoded_options_count, generate_option (OPT_mmacosx_version_min_, macosx_deployment_target, 1, CL_DRIVER, &(*decoded_options)[1]); memcpy (*decoded_options + 2, argv + 1, - (argc - 1) * sizeof (struct cl_decoded_option *)); + (argc - 1) * sizeof (struct cl_decoded_option)); return; } } @@ -128,7 +128,7 @@ darwin_default_min_version (unsigned int *decoded_options_count, generate_option (OPT_mmacosx_version_min_, new_flag, 1, CL_DRIVER, &(*decoded_options)[1]); memcpy (*decoded_options + 2, argv + 1, - (argc - 1) * sizeof (struct cl_decoded_option *)); + (argc - 1) * sizeof (struct cl_decoded_option)); return; parse_failed: