Fix pr61848, linux kernel miscompile

This patch cures the linux kernel boot failure when compiled using
trunk gcc.

At its heart, the problem is caused by merge_decls merging from the
old decl to the new decl, then copying back to the old decl and
discarding the new.  When Jan moved some fields to the symtab,
"copying back to the old decl" was lost for those fields.  Really,
it would be best if merge_decls was rewritten to merge everything to
the kept decl, but here I'm just doing that for fields accessed via
decl_with_vis.symtab_node.

2014-10-17  Alan Modra  <amodra@gmail.com>

gcc/c/
	PR middle-end/61848
	* c-decl.c (merge_decls): Don't merge section name or tls model
	to newdecl symtab node, instead merge to olddecl.  Override
	existing olddecl section name.  Set tls_model for all thread-local
	vars, not just OMP thread-private ones.  Remove incorrect comment.
gcc/cp/
	PR middle-end/61848
	* decl.c (merge_decls): Don't merge section name, comdat group or
	tls model to newdecl symtab node, instead merge to olddecl.
	Override existing olddecl section name.  Set tls_model for all
	thread-local vars, not just OMP thread-private ones.  Remove
	incorrect comment.

2014-10-17  Markus Trippelsdorf  <markus@trippelsdorf.de>

	PR middle-end/61848
	* g++.dg/torture/pr61848.C: New testcase.
	* gcc.c-torture/compile/pr61848.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216361 138bc75d-0d04-0410-961f-82ee72b054a4
	* config/i386/cpuid.h (__cpuid): Remove definitions that handle %ebx
	register in a special way.
	(__cpuid_count): Ditto.
	* config/i386/driver-i386.h: Protect with
	"#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__))".
	(host_detect_local_cpu): Mention that GCC with non-fixed %ebx
	is required to compile the function.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216362 138bc75d-0d04-0410-961f-82ee72b054a4
	* Add missing ChangeLog entry.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216363 138bc75d-0d04-0410-961f-82ee72b054a4