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 <dominiq@lps.ens.fr>

From-SVN: r164592
This commit is contained in:
Iain Sandoe 2010-09-24 14:06:35 +00:00
parent 116f30c3fe
commit 3d1b7f135d
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2010-09-24 Iain Sandoe <iains@gcc.gnu.org>
Dominique Dhumieres <dominiq@lps.ens.fr>
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 <rguenther@suse.de>
* c-decl.c (pop_scope): Always set file-scope DECL_CONTEXT.

View File

@ -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: