libcpp:

2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* include/cpplib.h (cpp_callbacks): Add has_attribute.
	* internal.h (lexer_state): Add in__has_attribute__.
	* directives.c (lex_macro_node): Prevent use of __has_attribute__
	as a macro.
	* expr.c (parse_has_attribute): New function; (eval_token): Look for
	__has_attribute__ and route to parse_has_attribute.
	* identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__.
	* pch.c (cpp_read_state): Initialize n__has_attribute__.
	* traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close;
	(_cpp_scan_out_logical_line): Attend to __has_attribute__.


gcc/c-family:

2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
	(__cpp_rtti, __cpp_exceptions): New macros for C++98;
	(__cpp_range_based_for, __cpp_initializer_lists,
	__cpp_delegating_constructors, __cpp_nsdmi,
	__cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
	for C++11; (__cpp_attribute_deprecated): Remove in favor of
	__has_cpp_attribute.
	* c-lex.c (cb_has_attribute): New callback CPP function;
	(init_c_lex): Set has_attribute callback.


gcc/testsuite:

2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* g++.dg/cpp1y/feat-cxx11.C: Test new feature macros for C++98
	and C++11; Test existence of __has_cpp_attribute;  Test C++11
	attributes.
	* g++.dg/cpp1y/feat-cxx11-neg.C: Ditto.
	* g++.dg/cpp1y/feat-cxx14.C: Ditto and test for C++14 attributes.
	* g++.dg/cpp1y/feat-cxx98.C: Test new feature macros for C++98.
	* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
	* g++.dg/cpp1y/feat-neg.C: Test that __cpp_rtti, _cpp_exceptions
	will be undefined for -fno-rtti -fno-exceptions.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217292 138bc75d-0d04-0410-961f-82ee72b054a4
Add a target hook for assembling undeclared decls.

	* target.def (assemble_undefined_decl): New hooks.
	* hooks.c (hook_void_FILEptr_constcharptr_const_tree): New function.
	* hooks.h (hook_void_FILEptr_constcharptr_const_tree): Declare.
	* doc/tm.texi.in (TARGET_ASM_ASSEMBLE_UNDEFINED_DECL): Add.
	* doc/tm.texi: Regenerate.
	* output.h (assemble_undefined_decl): Declare.
	(get_fnname_from_decl): Declare.
	* varasm.c (assemble_undefined_decl): New function.
	(get_fnname_from_decl): New function.
	* final.c (rest_of_handle_final): Use it.
	* varpool.c (varpool_output_variables): Call assemble_undefined_decl
	for nodes without a definition.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217293 138bc75d-0d04-0410-961f-82ee72b054a4
Make thread_prologue_and_epilogue_insns callable from backends.

	* function.c (thread_prologue_and_epilogue_insns): No longer static.
	* function.h (thread_prologue_and_epilogue_insns): Declare.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217294 138bc75d-0d04-0410-961f-82ee72b054a4
Add the nvptx port.

	* configure.ac: Handle nvptx-*-*.
	* configure: Regenerate.

	gcc/
	* config/nvptx/nvptx.c: New file.
	* config/nvptx/nvptx.h: New file.
	* config/nvptx/nvptx-protos.h: New file.
	* config/nvptx/nvptx.md: New file.
	* config/nvptx/t-nvptx: New file.
	* config/nvptx/nvptx.opt: New file.
	* common/config/nvptx/nvptx-common.c: New file.
	* config.gcc: Handle nvptx-*-*.

	libgcc/
	* config.host: Handle nvptx-*-*.
	* shared-object.mk (as-flags-$o): Define.
	($(base)$(objext), $(base)_s$(objext)): Use it instead of
	-xassembler-with-cpp.
	* static-object.mk: Identical changes.
	* config/nvptx/t-nvptx: New file.
	* config/nvptx/crt0.s: New file.
	* config/nvptx/free.asm: New file.
	* config/nvptx/malloc.asm: New file.
	* config/nvptx/realloc.c: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217295 138bc75d-0d04-0410-961f-82ee72b054a4
Testsuite alloca fixes for ptx.

	* lib/target-supports.exp (check_effective_target_alloca): New function.
	* gcc.c-torture/execute/20010209-1.c: Require alloca.
	* gcc.c-torture/execute/20020314-1.c: Likewise.
	* gcc.c-torture/execute/20020412-1.c: Likewise.
	* gcc.c-torture/execute/20021113-1.c: Likewise.
	* gcc.c-torture/execute/20040223-1.c: Likewise.
	* gcc.c-torture/execute/20040308-1.c: Likewise.
	* gcc.c-torture/execute/20040811-1.c: Likewise.
	* gcc.c-torture/execute/20070824-1.c: Likewise.
	* gcc.c-torture/execute/20070919-1.c: Likewise.
	* gcc.c-torture/execute/built-in-setjmp.c: Likewise.
	* gcc.c-torture/execute/pr22061-1.c: Likewise.
	* gcc.c-torture/execute/pr22061-4.c: Likewise.
	* gcc.c-torture/execute/pr43220.c: Likewise.
	* gcc.c-torture/execute/vla-dealloc-1.c: Likewise.
	* gcc.dg/torture/stackalign/alloca-1.c: Likewise.
	* gcc.dg/torture/stackalign/vararg-1.c: Likewise.
	* gcc.dg/torture/stackalign/vararg-2.c: Likewise.
	* gcc.c-torture/compile/20000923-1.c: Likewise.
	* gcc.c-torture/compile/20030224-1.c: Likewise.
	* gcc.c-torture/compile/20071108-1.c: Likewise.
	* gcc.c-torture/compile/20071117-1.c: Likewise.
	* gcc.c-torture/compile/900313-1.c: Likewise.
	* gcc.c-torture/compile/pr17397.c: Likewise.
	* gcc.c-torture/compile/pr35006.c: Likewise.
	* gcc.c-torture/compile/pr42956.c: Likewise.
	* gcc.c-torture/compile/pr51354.c: Likewise.
	* gcc.c-torture/compile/pr55851.c: Likewise.
	* gcc.c-torture/compile/vla-const-1.c: Likewise.
	* gcc.c-torture/compile/vla-const-2.c: Likewise.
	* gcc.c-torture/compile/pr31507-1.c: Likewise.
	* gcc.c-torture/compile/pr52714.c: Likewise.
	* gcc.dg/20001012-2.c: Likewise.
	* gcc.dg/auto-type-1.c: Likewise.
	* gcc.dg/builtin-object-size-1.c: Likewise.
	* gcc.dg/builtin-object-size-2.c: Likewise.
	* gcc.dg/builtin-object-size-3.c: Likewise.
	* gcc.dg/builtin-object-size-4.c: Likewise.
	* gcc.dg/packed-vla.c: Likewise.
	* gcc.c-torture/compile/parms.c: Likewise.
	* gcc.c-torture/execute/920721-2.c: Skip -O0 unless alloca is available.
	* gcc.c-torture/execute/920929-1.c: Likewise.
	* gcc.c-torture/execute/921017-1.c: Likewise.
	* gcc.c-torture/execute/941202-1.c: Likewise.
	* gcc.c-torture/execute/align-nest.c: Likewise.
	* gcc.c-torture/execute/alloca-1.c: Likewise.
	* gcc.c-torture/execute/pr36321.c: Likewise.
	* gcc.c-torture/compile/20001221-1.c: Likewise.
	* gcc.c-torture/compile/20020807-1.c: Likewise.
	* gcc.c-torture/compile/20050801-2.c: Likewise.
	* gcc.c-torture/compile/920428-4.c: Likewise.
	* gcc.c-torture/compile/debugvlafunction-1.c.c: Likewise.
	* gcc.c-torture/compile/pr41469.c: Likewise.
	* gcc.dg/torture/pr48953.c: Likewise.
	* gcc.dg/torture/pr8081.c: Likewise.
	* gcc.dg/torture/stackalign/inline-1.c: Skip if nvptx-*-*.
	* gcc.dg/torture/stackalign/inline-2.c: Likewise.
	* gcc.dg/torture/stackalign/nested-1.c: Likewise.
	* gcc.dg/torture/stackalign/nested-2.c: Likewise.
	* gcc.dg/torture/stackalign/nested-3.c: Likewise.
	* gcc.dg/torture/stackalign/nested-4.c: Likewise.
	* gcc.dg/torture/stackalign/nested-1.c: Likewise.
	* gcc.dg/torture/stackalign/global-1.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-1.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-2.c: Likewise.
	* gcc.dg/torture/stackalign/pr16660-3.c: Likewise.
	* gcc.dg/torture/stackalign/ret-struct-1.c: Likewise.
	* gcc.dg/torture/stackalign/struct-1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217296 138bc75d-0d04-0410-961f-82ee72b054a4
Testsuite untyped assembly fixes for ptx.

	* lib/target-supports.exp
	(check_effective_target_untyped_assembly): New function.
	* gcc.c-torture/compile/20091215-1.c: Require untyped_assembly.
	* gcc.c-torture/compile/920917-1.c: Likewise.
	* gcc.c-torture/compile/930120-1.c: Likewise.
	* gcc.c-torture/compile/930411-1.c: Likewise.
	* gcc.c-torture/compile/930529-1.c: Likewise.
	* gcc.c-torture/compile/930623-1.c: Likewise.
	* gcc.c-torture/compile/950329-1.c: Likewise.
	* gcc.c-torture/compile/calls.c: Likewise.
	* gcc.c-torture/compile/pr37258.c: Likewise.
	* gcc.c-torture/compile/pr37327.c: Likewise.
	* gcc.c-torture/compile/pr38360.c: Likewise.
	* gcc.c-torture/compile/pr43635.c: Likewise.
	* gcc.c-torture/compile/pr47428.c: Likewise.
	* gcc.c-torture/compile/pr47967.c: Likewise.
	* gcc.c-torture/compile/pr49145.c: Likewise.
	* gcc.c-torture/compile/pr51694.c: Likewise.
	* gcc.c-torture/compile/pr53411.c: Likewise.
	* gcc.c-torture/execute/20001101.c: Likewise.
	* gcc.c-torture/execute/20051012-1.c: Likewise.
	* gcc.c-torture/execute/920501-1.c: Likewise.
	* gcc.c-torture/execute/921202-1.c: Likewise.
	* gcc.c-torture/execute/921208-2.c: Likewise.
	* gcc.c-torture/execute/call-trap-1.c: Likewise.
	* gcc.c-torture/compile/20010525-1.c: Likewise.
	* gcc.c-torture/compile/20021015-2.c: Likewise.
	* gcc.c-torture/compile/20031023-1.c: Likewise.
	* gcc.c-torture/compile/20031023-2.c: Likewise.
	* gcc.c-torture/compile/pr49206.c: Likewise.
	* gcc.c-torture/execute/pr47237.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-1.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-2.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-3.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-apply-4.c: Likewise.
	* gcc.dg/torture/stackalign/builtin-return-1.c: Likewise.
	* gcc.dg/builtin-apply1.c: Likewise.
	* gcc.dg/builtin-apply2.c: Likewise.
	* gcc.dg/builtin-apply3.c: Likewise.
	* gcc.dg/builtin-apply4.c: Likewise.
	* gcc.dg/pr38338.c: Likewise.
	* gcc.dg/torture/pr41993.c: Likewise.
	* gcc.c-torture/compile/386.c: Likewise.
	* gcc.c-torture/compile/cmpsi386.c: Likewise.
	* gcc.c-torture/compile/consec.c: Likewise.
	* gcc.c-torture/compile/ex.c: Likewise.
	* gcc.c-torture/compile/pass.c: Likewise.
	* gcc.c-torture/compile/scal.c: Likewise.
	* gcc.c-torture/compile/uuarg.c: Likewise.
	* gcc.c-torture/compile/conv_tst.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217297 138bc75d-0d04-0410-961f-82ee72b054a4
XFAILs and such for ptx.

	* lib/target-supports.exp (check_effective_target_trampolines,
	check_profiling_available, check_effective_target_lto,
	check_effective_target_vect_natural): False for nvptx-*-*.
	* gcc.c-torture/compile/limits-fndefn.c: Skip for nvptx-*-*.
	* gcc.c-torture/compile/pr34334.c: Likewise.
	* gcc.c-torture/compile/pr37056.c: Likewise.
	* gcc.c-torture/compile/pr39423-1.c: Likewise.
	* gcc.c-torture/compile/pr46534.c: Likewise.
	* gcc.c-torture/compile/pr49049.c: Likewise.
	* gcc.c-torture/compile/pr59417.c: Likewise.
	* gcc.c-torture/compile/20080721-1.c: Likewise.
	* gcc.c-torture/compile/920501-4.c: Likewise.
	* gcc.c-torture/compile/921011-1.c: Likewise.
	* gcc.dg/20040813-1.c: Likewise.
	* gcc.dg/pr28755.c: Likewise.
	* gcc.dg/pr44194-1.c: Likewise.
	* gcc.c-torture/compile/pr42717.c: Xfail for nvptx-*-*.
	* gcc.c-torture/compile/pr61684.c: Likewise.
	* gcc.c-torture/compile/pr20601-1.c: Likewise.
	* gcc.c-torture/compile/pr59221.c: Likewise.
	* gcc.c-torture/compile/20060208-1.c: Likewise.
	* gcc.c-torture/execute/pr52129.c: Likewise.
	* gcc.c-torture/execute/20020310-1.c: Likewise.
	* gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for nvptx.
	* gcc.c-torture/execute20020312-2.c: Add case for for nvptx.
	* gcc.c-torture/compile/pr60655-1.c: Don't add -fdata-sections
	for nvptx-*-*.
	* gcc.dg/pr36400.c: Xfail scan-assembler test on nvptx-*-*.
	* gcc.dg/const-elim-2.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217298 138bc75d-0d04-0410-961f-82ee72b054a4
ptx testsuite fixes for issues like indirect jumps and jump labels.

	* lib/target-supports.exp (check_effective_target_indirect_jumps):
	New function.
	(check_effective_target_nonlocal_goto): New function.
	(check_effective_target_label_values): New function.
	* gcc.c-torture/execute/20071220-2.c: Require label_values.
	* gcc.c-torture/compile/labels-2.c: Likewise.
	* gcc.c-torture/compile/20000518-1.c: Likewise.
	* gcc.c-torture/compile/20021108-1.c: Likewise.
	* gcc.c-torture/compile/981006-1.c: Likewise.
	* gcc.c-torture/execute/20040302-1.c: Likewise.
	* gcc.dg/torture/pr33848.c: Likewise.

	* gcc.c-torture/compile/pr46107.c: Require indirect jumps and
	label values.
	* gcc.c-torture/compile/pr32919.c: Likewise.
	* gcc.c-torture/compile/pr17913.c: Likewise.
	* gcc.c-torture/compile/pr51495.c: Likewise.
	* gcc.c-torture/compile/pr25224.c: Likewise.
	* gcc.c-torture/compile/labels-3.c: Likewise.
	* gcc.c-torture/compile/pr27863.c: Likewise.
	* gcc.c-torture/compile/20050510-1.c: Likewise.
	* gcc.c-torture/compile/pr28489.c: Likewise.
	* gcc.c-torture/compile/pr29128.c: Likewise.
	* gcc.c-torture/compile/pr21356: Likewise.
	* gcc.c-torture/execute/20071210-1.c: Likewise.
	* gcc.c-torture/execute/200701220-1.c: Likewise.
	* gcc.c-torture/execute/pr51447.c: Likewise.
	* gcc.c-torture/execute/comp-goto-1.c: Likewise.
	* gcc.c-torture/execute/comp-goto-2.c: Likewise.
	* gcc.dg/20021029-1.c: Likewise.
	* gcc.dg/pr43379.c: Likewise.
	* gcc.dg/pr45259.c: Likewise.
	* gcc.dg/torture/pr53695.c: Likewise.
	* gcc.dg/torture/pr57584.c: Likewise.

	* gcc.c-torture/execute/980526-1.c: Skip if -O0 and neither label_values
	or indirect_jumps are available.
	* gcc.c-torture/compile/920415-1.c: Likewise.  Remove NO_LABEL_VALUES
	test.
	* gcc.c-torture/compile/920428-3.c: Likewise.
	* gcc.c-torture/compile/950613-1.c: Likewise.

	* gcc.c-torture/compile/pr30984.c: Require indirect jumps.
	* gcc.c-torture/compile/991213-3.c: Likewise.
	* gcc.c-torture/compile/920825-1.c: Likewise.
	* gcc.c-torture/compile/20011029-1.c: Likewise.
	* gcc.c-torture/compile/complex-6.c: Likewise.
	* gcc.c-torture/compile/pr27127.c: Likewise.
	* gcc.c-torture/compile/pr58164.c: Likewise.
	* gcc.c-torture/compile/20041214-1.c: Likewise.
	* gcc.c-torture/execute/built-in-setjmp.c: Likewise.
	* gcc.c-torture/execute/pr56982.c: Likewise.
	* gcc.c-torture/execute/pr60003.c: Likewise.
	* gcc.c-torture/execute/pr26983.c: Likewise.
	* gcc.dg/pr57287-2.c: Likewise.
	* gcc.dg/pr59920-1.c: Likewise.
	* gcc.dg/pr59920-2.c: Likewise.
	* gcc.dg/pr59920-3.c: Likewise.
	* gcc.dg/setjmp-3.c: Likewise.
	* gcc.dg/setjmp-4.c: Likewise.
	* gcc.dg/setjmp-5.c: Likewise.
	* gcc.dg/torture/pr48542.c: Likewise.
	* gcc.dg/torture/pr57147-2.c: Likewise.
	* gcc.dg/torture/pr59993.c: Likewise.

	* gcc.dg/torture/stackalign/non-local-goto-1.c: Require nonlocal_goto.
	* gcc.dg/torture/stackalign/non-local-goto-2.c: Likewise.
	* gcc.dg/torture/stackalign/non-local-goto-3.c: Likewise.
	* gcc.dg/torture/stackalign/non-local-goto-4.c: Likewise.
	* gcc.dg/torture/stackalign/non-local-goto-5.c: Likewise.
	* gcc.dg/torture/stackalign/setjmp-1.c: Likewise.
	* gcc.dg/torture/stackalign/setjmp-3.c: Likewise.
	* gcc.dg/torture/stackalign/setjmp-4.c: Likewise.
	* gcc.dg/non-local-goto-1.c: Likewise.
	* gcc.dg/non-local-goto-2.c: Likewise.
	* gcc.dg/pr49994-1.c: Likewise.
	* gcc.dg/torture/pr57036-2.c: Likewise.

	* gcc.c-torture/compile/20040614-1.c: Require label_values.  Remove
	NO_LABEL_VALUES test.
	* gcc.c-torture/compile/920831-1.c: Likewise.
	* gcc.c-torture/compile/920502-1.c: Likewise.
	* gcc.c-torture/compile/920501-7.c: Likewise.
	* gcc.dg/pr52139.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217299 138bc75d-0d04-0410-961f-82ee72b054a4
Random testsuite tweaks for ptx.

	* gcc.c-torture/compile/920625-2.c: Add return type to
	freeReturnStruct.
	* gcc.c-torture/execute/20091229-1.c: Declare main properly.
	* gcc.c-torture/execute/pr61375.c: Likewise.
	* gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t.
	* gcc.dg/pr30904.c: Remove extern from declaration of t.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217300 138bc75d-0d04-0410-961f-82ee72b054a4
ptx testsuite fix for return addresses.

	* lib/target-supports.exp (check_effective_target_return_address):
	New function.
	* gcc.c-torture/execute/20010122-1.c: Require return_address.
	* gcc.c-torture/execute/20030323-1.c: Likewise.
	* gcc.c-torture/execute/20030811-1.c: Likewise.
	* gcc.c-torture/execute/eeprof-1.c: Likewise.
	* gcc.c-torture/execute/frame-address.c: Likewise.
	* gcc.c-torture/execute/pr17377.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217301 138bc75d-0d04-0410-961f-82ee72b054a4
2014-11-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    * expmed.c (expand_shift_1): Expand 8 bit rotate of 16 bit value to
    bswaphi if available.

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