This is the mail archive of the gcc-cvs@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]

r184290 - in /branches/pph/gcc: cp/ChangeLog.pp...


Author: crowl
Date: Wed Feb 15 22:51:28 2012
New Revision: 184290

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184290
Log:
This patch merges inline functions where a plain declaration is
read from a pph file after an earlier pph file provides the full
definition.

Making this merge happen required refactoring the several pph
routines.  Ideally, we should have merge versions of the common tree
streamer.  However, we live saving and restoring so as minimize
disruption in the branch.

We add four new tests, x3funcinl12.cc, x3funcinl13.cc, x4funcinl21.cc,
and x4funcinl31.cc to capture the various orders of processing.  The
x3 tests were working.  The x4 tests are now fixed.

Tested on x64.


Index: gcc/testsuite/ChangeLog.pph

2012-02-15   Lawrence Crowl  <crowl@google.com>

	* lib/dg-pph.exp: Clarify kind of test in log file.
	* g++.dg/pph/x0funcinl1.h: New.
	* g++.dg/pph/x0funcinl2.h: New.
	* g++.dg/pph/x0funcinl3.h: New.
	* g++.dg/pph/x3funcinl12.cc: New.
	* g++.dg/pph/x3funcinl13.cc: New.
	* g++.dg/pph/x4funcinl21.cc: New.
	* g++.dg/pph/x4funcinl31.cc: New.

Index: gcc/cp/ChangeLog.pph

2012-02-15   Lawrence Crowl  <crowl@google.com>

	* pph-in.c (pph_in_merge_ld_base): Merge odr_used.
	(pph_in_lang_indep_tree_body): New, replacing idiom.
	(pph_in_merge_lang_indep_tree_body): Decl merge corresponding to above.
	(pph_reset_external): New, from refactoring.
        (pph_in_tcc_declaration_tail): Moved into pph_in_tcc_declaration.
	(pph_in_tcc_declaration): As above.  Factor out pph_reset_external.
	(pph_in_nonnull_tree): New.
	(pph_in_merge_tcc_declaration): Do serious decl merging.
	(pph_in_identifier_bindings): Factor out pph_in_lang_indep_tree_body.
	(pph_in_merge_tree_body): Factor out pph_in_lang_indep_tree_body.
	Move pph_in_lang_indep_tree_body and TREE_CHAIN save/restore into
	pph_in_merge_tcc_declaration.  Do some spacing corrections.



Added:
    branches/pph/gcc/testsuite/g++.dg/pph/x0funcinl1.h
    branches/pph/gcc/testsuite/g++.dg/pph/x0funcinl2.h
    branches/pph/gcc/testsuite/g++.dg/pph/x0funcinl3.h
    branches/pph/gcc/testsuite/g++.dg/pph/x3funcinl12.cc
    branches/pph/gcc/testsuite/g++.dg/pph/x3funcinl13.cc
    branches/pph/gcc/testsuite/g++.dg/pph/x4funcinl21.cc
    branches/pph/gcc/testsuite/g++.dg/pph/x4funcinl31.cc
Modified:
    branches/pph/gcc/cp/ChangeLog.pph
    branches/pph/gcc/cp/pph-in.c
    branches/pph/gcc/testsuite/ChangeLog.pph
    branches/pph/gcc/testsuite/lib/dg-pph.exp


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