Fix cppspec.c lang_specific_driver bug (PR 48677)

Submitted by Joseph S. Myers on May 16, 2011, 6:35 p.m.

Details

Message ID Pine.LNX.4.64.1105161834490.30957@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph S. Myers May 16, 2011, 6:35 p.m.
PR 48677 pointed out a mistake in my conversion of
lang_specific_driver to use decoded options.  This is fixed by this
patch.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.  Applied
to mainline.  Will also apply to 4.6 branch to fix the regression
there subject to 4.6 branch testing passing.

2011-05-16  Joseph Myers  <joseph@codesourcery.com>

	PR preprocessor/48677
	* cppspec.c (lang_specific_driver): Set new_decoded_options[0]
	from decoded_options[0], not from itself.

Patch hide | download patch | download mbox

Index: gcc/cppspec.c
===================================================================
--- gcc/cppspec.c	(revision 173728)
+++ gcc/cppspec.c	(working copy)
@@ -1,5 +1,5 @@ 
 /* Specific flags and argument handling of the C preprocessor.
-   Copyright (C) 1999, 2007, 2010 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2007, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -158,7 +158,7 @@  lang_specific_driver (struct cl_decoded_
 
   new_decoded_options = XNEWVEC (struct cl_decoded_option, new_argc);
 
-  new_decoded_options[0] = new_decoded_options[0];
+  new_decoded_options[0] = decoded_options[0];
   j = 1;
 
   if (need_E)