This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[LTO][PATCH] Fix multiple global variable definitions.


Hi,

    This patch fixes a thinko in a previous patch for the same
problem.  I checked for multiple definitions of globals with
initializers only.  This patch moves the logic to places in the
streams to handle all VAR_DECLs so we will not miss any.

-Doug

2008-11-23  Doug Kwan  <dougkwan@google.com>

	* lto-function-out.c (output_var_int): Remove code to avoid
	multiple variable definitions in LTRANS files.
	(output_var_decl): Add code to avoid multiple variable definitions
	in LTRANS files.
	* lto-function-in.c (input_constructors_or_inits): Remove code to
	avoid multiple variable definitions in LTRANS files.
 	(input_var_decl): Add code to avoid multiple variable definitions
	in LTRANS files.

testsuite/ChangeLog.lto

	* g++.dg/lto/20081123_0.C: New.
	* g++.dg/lto/20081123_1.C: New.

Attachment: patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]