Commit Graph

133813 Commits

Author SHA1 Message Date
Jonathan Wakely
8d9076969b Add support for ref-qualified functions to std::mem_fn
PR libstdc++/57898
	* include/std/functional (_Mem_fn_traits_base): New class template.
	(_Mem_fn_traits): New class template with specializations for every
	combination of cv-qualified and ref-qualified member function.
	(_Mem_fn_base): New class template for all pointer to member function
	types and partial specialization for pointer to member object types.
	(_Mem_fn): Inherit from _Mem_fn_base.
	* testsuite/20_util/function_objects/mem_fn/refqual.cc: New.

From-SVN: r217024
2014-11-03 02:55:32 +00:00
GCC Administrator
2ba89c141d Daily bump.
From-SVN: r217023
2014-11-03 00:16:29 +00:00
Uros Bizjak
ff0562b799 gen-attrs-42.C: Add x86_64-*-* target.
* g++.dg/cpp0x/gen-attrs-42.C: Add x86_64-*-* target.
	* g++.dg/ext/attrib42.C: Ditto.
	* g++.dg/torture/pr51344.C: Ditto.
	* g++.dg/tree-ssa/pr29902.C: Ditto.
	* gcc.c-torture/execute/20010129-1.c: Ditto.
	* gcc.dg/combine_ashiftrt_2.c: Ditto.
	* gcc.dg/march-generic.c: Ditto.
	* gcc.dg/torture/pr17526.c: Ditto.
	* gcc.dg/union-4.c: Ditto.

From-SVN: r217020
2014-11-02 22:32:54 +01:00
Richard Sandiford
24dbe738d3 arc.c (write_ext_corereg_1): Delete.
gcc/
	* config/arc/arc.c (write_ext_corereg_1): Delete.
	(arc_write_ext_corereg): Use FOR_EACH_SUBRTX.

From-SVN: r217019
2014-11-02 20:00:25 +00:00
Richard Sandiford
36cc625486 arc.c (arc600_corereg_hazard_1): Delete.
gcc/
	* config/arc/arc.c (arc600_corereg_hazard_1): Delete.
	(arc600_corereg_hazard): Use FOR_EACH_SUBRTX.

From-SVN: r217018
2014-11-02 20:00:19 +00:00
Richard Sandiford
752ae22f50 arc.c (arc_rewrite_small_data_p): Constify argument.
gcc/
	* config/arc/arc.c (arc_rewrite_small_data_p): Constify argument.
	(small_data_pattern_1): Delete.
	(small_data_pattern): Use FOR_EACH_SUBRTX.

From-SVN: r217017
2014-11-02 20:00:12 +00:00
Richard Sandiford
6733978e46 arc.c: Include rtl-iter.h.
gcc/
	* config/arc/arc.c: Include rtl-iter.h.
	(arc_rewrite_small_data_1): Delete.
	(arc_rewrite_small_data): Use FOR_EACH_SUBRTX_PTR.

From-SVN: r217016
2014-11-02 20:00:05 +00:00
Uros Bizjak
100a518033 re PR target/24188 (WRITE(6,*) causes an ICE with -mcmodel=medium)
* c-c++-common/ubsan/float-cast-overflow-6.c: Add i?86-*-* target.
	* g++.dg/abi/no-weak1.C: Ditto.
	* g++.dg/opt/pr44919.C: Ditto.
	* g++.dg/opt/pr46640.C: Ditto.
	* g++.dg/opt/pr46649.C: Ditto.
	* g++.dg/opt/pr47036.C: Ditto.
	* g++.dg/opt/pr48273.C: Ditto.
	* g++.dg/opt/pr48302.C: Ditto.
	* g++.dg/opt/pr45788.C: Ditto.
	* g++.dg/opt/pr57662.C: Ditto.
	* gcc.dg/20031102-1.c: Ditto.
	* gcc.dg/builtin-bswap-7.c: Ditto.
	* gcc.dg/builtin-bswap-7a.c: Ditto.
	* gcc.dg/builtin-bswap-9.c: Ditto.
	* gcc.dg/combine_ashiftrt_1.c: Ditto.
	* gcc.dg/guality/bswaptest.c: Ditto.
	* gcc.dg/guality/clztest.c: Ditto.
	* gcc.dg/guality/ctztest.c: Ditto.
	* gcc.dg/guality/pr45003-1.c: Ditto.
	* gcc.dg/guality/pr45003-2.c: Ditto.
	* gcc.dg/guality/pr45003-3.c: Ditto.
	* gcc.dg/guality/pr58791-4.c: Ditto.
	* gcc.dg/guality/rotatetest.c:Ditto.
	* gcc.dg/ifcvt-fabs-1.c: Ditto.
	* gcc.dg/ira-loop-pressure.c: Ditto.
	* gcc.dg/ira-shrinkwrap-prep-1.c: Ditto.
	* gcc.dg/ira-shrinkwrap-prep-2.c: Ditto.
	* gcc.dg/lto/pr47259_0.c: Ditto.
	* gcc.dg/memcpy-5.c: Ditto.
	* gcc.dg/pr10474.c: Ditto.
	* gcc.dg/pr37438.c: Ditto.
	* gcc.dg/pr39453.c: Ditto.
	* gcc.dg/pr40501.c: Ditto.
	* gcc.dg/pr42245-2.c: Ditto.
	* gcc.dg/pr42245.c: Ditto.
	* gcc.dg/pr42246.c: Ditto.
	* gcc.dg/pr42249.c: Ditto.
	* gcc.dg/pr42388.c: Ditto.
	* gcc.dg/pr42389.c: Ditto.
	* gcc.dg/pr45352-1.c: Ditto.
	* gcc.dg/pr45352-2.c: Ditto.
	* gcc.dg/pr45352-3.c: Ditto.
	* gcc.dg/pr45352.c: Ditto.
	* gcc.dg/pr45472.c: Ditto.
	* gcc.dg/pr45652.c: Ditto.
	* gcc.dg/pr46212.c: Ditto.
	* gcc.dg/pr46521.c: Ditto.
	* gcc.dg/pr46522.c: Ditto.
	* gcc.dg/pr46875.c: Ditto.
	* gcc.dg/pr48374.c: Ditto.
	* gcc.dg/pr50251.c: Ditto.
	* gcc.dg/pr54472.c: Ditto.
	* gcc.dg/pr55702.c: Ditto.
	* gcc.dg/pr56990.c: Ditto.
	* gcc.dg/pr57104.c: Ditto.
	* gcc.dg/pr57662.c: Ditto.
	* gcc.dg/pr60866.c: Ditto.
	* gcc.dg/shrink-wrap-loop.c: Ditto.
	* gcc.dg/tm/memopt-15.c: Ditto.
	* gcc.dg/torture/pr52720.c: Ditto.
	* gcc.dg/torture/pr56778.c: Ditto.
	* gcc.dg/tree-prof/pr45354.c: Ditto.
	* gcc.dg/tree-prof/pr50907.c: Ditto.
	* gcc.dg/tree-ssa/loop-16.c: Ditto.
	* gcc.dg/tree-ssa/loop-18.c: Ditto.
	* gcc.dg/tree-ssa/pr44423.c: Ditto.
	* gcc.dg/misc-tests/godump-1.c: Ditto.
	* gfortran.dg/PR24188.f: Ditto.
	* gfortran.dg/errnocheck_1.f90: Ditto.
	* gfortran.dg/g77/20010216-1.f: Ditto.
	* gfortran.dg/pr42246-2.f: Ditto.
	* gfortran.dg/pr42294.f: Ditto.
	* gfortran.dg/pr44691.f: Ditto.
	* gfortran.dg/vect/pr45714-a.f: Ditto.
	* gcc.c-torture/execute/ieee/ieee.exp: Ditto.
	* gcc.misc-tests/linkage.exp: Ditto.
	* lib/target-supports.exp: Reformat x86 tagets.
	(check_effective_target_whole_vector_shift): Add i?86-*-* target.

From-SVN: r217015
2014-11-02 20:27:06 +01:00
Michael Collison
9b227e35bd [ARM] Fix CLZ_DEFINED_VALUE_AT_ZERO for vector modes
2014-11-02  Michael Collison  <michael.collison@linaro.org>

	* config/arm/arm.h (CLZ_DEFINED_VALUE_AT_ZERO) : Update
	to support vector modes.
	(CTZ_DEFINED_VALUE_AT_ZERO): Ditto.

From-SVN: r217014
2014-11-02 19:00:59 +01:00
Paolo Carlini
e82d71d91e re PR c++/57694 ([c++11] constexpr constructor does not work with const address of own member)
2014-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57694
	* g++.dg/cpp0x/constexpr-ctor15.C: New.

From-SVN: r217013
2014-11-02 09:31:12 +00:00
Edward Smith-Rowland
26f0e1d68a feat-cxx11.C: Commentary and rearrangement of tests.
testsuite/

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

	* g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
	* g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
	Commentary and rearrangement of tests.
	* g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
	Commentary and rearrangement of tests.
	* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
	* g++.dg/cpp1y/feat-cxx98.C: Commentary.

c-family/

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

	* c-cppbuiltin.c: Define __cpp_aggregate_nsdmi.

From-SVN: r217012
2014-11-02 02:51:41 +00:00
GCC Administrator
38083ac28f Daily bump.
From-SVN: r217010
2014-11-02 00:16:26 +00:00
Andrew MacLeod
b0710fe1b1 2014-11-01 Andrew MacLeod <amacleod@redhat,com>
* optabs.h: Flatten insn-codes.h to source files.  Move some prototypes
	and structs to genopinit.c.  Adjust protyoptypes to match optabs.c.
	* genopinit.c (main): Emit prototypes and structs into insn-opinit.h.
	* optabs.c: (gen_move_insn): Move to expr.c.
	* expr.h: Move protypes and enums to optabs.h.
	* expr.c: (gen_move_insn): Relocate from optabs.c.
	* genemit.c (main): Include insn-codes.h.
	* gengtype.c (open_base_files): Include insn-codes.h.
	* asan.c: Include insn-codes.h.
	* bb-reorder.c: Ditto.
	* builtins.c: Ditto.
	* calls.c: Ditto.
	* cfgexpand.c: Ditto.
	* cilk-common.c: Ditto.
	* combine.c: Ditto.
	* dojump.c: Ditto.
	* dse.c: Ditto.
	* except.c: Ditto.
	* explow.c: Ditto.
	* expmed.c: Ditto.
	* function.c: Ditto.
	* ifcvt.c: Ditto.
	* internal-fn.c: Ditto.
	* loop-unroll.c: Ditto.
	* lra.c: Ditto.
	* modulo-sched.c: Ditto.
	* omp-low.c: Ditto.
	* postreload.c: Ditto.
	* ree.c: Ditto.
	* reload.c: Ditto.
	* reload1.c: Ditto.
	* shrink-wrap.c: Ditto.
	* simplify-rtx.c: Ditto.
	* stmt.c: Ditto.
	* target-globals.c: Ditto.
	* targhooks.c: Ditto.
	* toplev.c: Ditto.
	* tree-if-conv.c: Ditto.
	* tree-ssa-forwprop.c: Ditto.
	* tree-ssa-loop-prefetch.c: Ditto.
	* tree-ssa-math-opts.c: Ditto.
	* tree-ssa-phiopt.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* tree-switch-conversion.c: Ditto.
	* tree-vect-data-refs.c: Ditto.
	* tree-vect-generic.c: Ditto.
	* tree-vect-loop.c: Ditto.
	* tree-vect-patterns.c: Ditto.
	* tree-vect-slp.c: Ditto.
	* tree-vect-stmts.c: Ditto.
	* tree-vrp.c: Ditto.
	* value-prof.c: Ditto.
	* config/aarch64/aarch64-builtins.c: Ditto.
	* config/alpha/alpha.c: Ditto.
	* config/arm/arm.c: Ditto.
	* config/cris/cris.c: Ditto.
	* config/epiphany/epiphany.c: Ditto.
	* config/frv/frv.c: Ditto.
	* config/h8300/h8300.c: Ditto.
	* config/ia64/ia64.c: Ditto.
	* config/iq2000/iq2000.c: Ditto.
	* config/m32c/m32c.c: Ditto.
	* config/mep/mep.c: Ditto.
	* config/microblaze/microblaze.c: Ditto.
	* config/mips/mips.c: Ditto.
	* config/mn10300/mn10300.c: Ditto.
	* config/moxie/moxie.c: Ditto.
	* config/msp430/msp430.c: Ditto.
	* config/nios2/nios2.c: Ditto.
	* config/pa/pa.c: Ditto.
	* config/rl78/rl78.c: Ditto.
	* config/rs6000/rs6000.c: Ditto.
	* config/rx/rx.c: Ditto.
	* config/s390/s390.c: Ditto.
	* config/sh/sh.c: Ditto.
	* config/sh/sh_treg_combine.cc: Ditto.
	* config/spu/spu.c: Ditto.
	* config/stormy16/stormy16.c: Ditto.
	* config/tilegx/mul-tables.c: Ditto.
	* config/tilegx/tilegx.c: Ditto.
	* config/tilepro/mul-tables.c: Ditto.
	* config/tilepro/tilepro.c: Ditto.
	* config/vax/vax.c: Ditto.

From-SVN: r217005
2014-11-01 13:34:15 +00:00
James Greenhalgh
a5474c4cb0 [Patch 7/7] Remove *_BY_PIECES_P
gcc/

	* doc/tm.texi.in (MOVE_BY_PIECES_P): Remove.
	(CLEAR_BY_PIECES_P): Likewise.
	(SET_BY_PIECES_P): Likewise.
	(STORE_BY_PIECES_P): Likewise.
	* doc/tm.texi: Regenerate.
	* system.h: Poison MOVE_BY_PIECES_P, CLEAR_BY_PIECES_P,
	SET_BY_PIECES_P, STORE_BY_PIECES_P.
	* expr.c (MOVE_BY_PIECES_P): Remove.
	(CLEAR_BY_PIECES_P): Likewise.
	(SET_BY_PIECES_P): Likewise.
	(STORE_BY_PIECES_P): Likewise.
	(can_move_by_pieces): Rewrite in terms of
	targetm.use_by_pieces_infrastructure_p.
	(emit_block_move_hints): Likewise.
	(can_store_by_pieces): Likewise.
	(store_by_pieces): Likewise.
	(clear_storage_hints): Likewise.
	(emit_push_insn): Likewise.
	(expand_constructor): Likewise.

From-SVN: r217004
2014-11-01 10:38:42 +00:00
James Greenhalgh
d3006da6f1 [Patch 6/7 AArch64] Deprecate *_BY_PIECES_P, move to hookized version
gcc/

	* config/aarch64/aarch64.c
	(aarch64_use_by_pieces_infrastructre_p): New.
	(TARGET_USE_BY_PIECES_INFRASTRUCTURE): Likewise.
	* config/aarch64/aarch64.h (STORE_BY_PIECES_P): Delete.

From-SVN: r217003
2014-11-01 10:15:51 +00:00
James Greenhalgh
a10ce56103 [Patch 5/7 mips] Deprecate *_BY_PIECES_P, move to hookized version
gcc/

	* config/mips/mips.h (MOVE_BY_PIECES_P): Remove.
	(STORE_BY_PIECES_P): Likewise.
	* config/mips/mips.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
	(mips_move_by_pieces_p): Rename to...
	(mips_use_by_pieces_infrastructure_p): ...this, use new hook
	parameters, use the default hook implementation as a
	fall-back.

From-SVN: r217002
2014-11-01 10:14:08 +00:00
James Greenhalgh
ae59bd31fe [Patch 4/7 sh] Deprecate *_BY_PIECES_P, move to hookized version
gcc/

	* config/sh/sh.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
	(sh_use_by_pieces_infrastructure_p): Likewise.
	* config/sh/sh.h (MOVE_BY_PIECES_P): Remove.
	(STORE_BY_PIECES_P): Likewise.
	(SET_BY_PIECES_P): Likewise.

From-SVN: r217001
2014-11-01 10:12:24 +00:00
James Greenhalgh
ad23f5d411 [Patch 3/7 arc] Deprecate *_BY_PIECES_P, move to hookized version
gcc/

	* config/arc/arc.c (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): New.
	(arc_use_by_pieces_infrastructure_p): Likewise.
	* confir/arc/arc.h (MOVE_BY_PIECES_P): Delete.
	(CAN_MOVE_BY_PIECES): Likewise.

From-SVN: r216999
2014-11-01 08:44:39 +00:00
James Greenhalgh
b5e3200c52 [Patch 2/7 s390] Deprecate *_BY_PIECES_P, move to hookized version
gcc/

	* config/s390/s390.c (s390_use_by_pieces_infrastructure_p): New.
	(TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Likewise.
	* config/s390/s390.h (MOVE_BY_PIECES_P): Remove.
	(CLEAR_BY_PIECES): Likewise.
	(SET_BY_PIECES): Likewise.
	(STORE_BY_PIECES): Likewise.

From-SVN: r216998
2014-11-01 08:38:36 +00:00
James Greenhalgh
7cbed00872 [Patch 1/7] Hookize *_BY_PIECES_P
gcc/

	* target.def (use_by_pieces_infrastructure_p): New.
	* doc/tm.texi.in (MOVE_BY_PIECES_P): Describe that this macro
	is deprecated.
	(STORE_BY_PIECES_P): Likewise.
	(CLEAR_BY_PIECES_P): Likewise.
	(SET_BY_PIECES_P): Likewise.
	(TARGET_MOVE_BY_PIECES_PROFITABLE_P): Add hook.
	* doc/tm.texi: Regenerate.
	* expr.c (MOVE_BY_PIECES_P): Rewrite in terms of
	TARGET_USE_BY_PIECES_INFRASTRUCTURE_P.
	(STORE_BY_PIECES_P): Likewise.
	(CLEAR_BY_PIECES_P): Likewise.
	(SET_BY_PIECES_P): Likewise.
	(STORE_MAX_PIECES): Move to...
	* defaults.h (STORE_MAX_PIECES): ...here.
	* targhooks.c (get_move_ratio): New.
	(default_use_by_pieces_infrastructure_p): Likewise.
	* targhooks.h (default_use_by_pieces_infrastructure_p): New.
	* target.h (by_pieces_operation): New.

From-SVN: r216996
2014-11-01 08:13:09 +00:00
GCC Administrator
240decf782 Daily bump.
From-SVN: r216994
2014-11-01 00:16:18 +00:00
Uros Bizjak
4988bf65e5 re PR target/63702 (i386.c:36276: possible missing break ?)
PR target/63702
	* config/i386/i386.c (ix86_expand_args_builtin): Remove extra
	assignment to 'nargs' variable.

From-SVN: r216991
2014-10-31 22:56:05 +01:00
Uros Bizjak
8e454d55b9 re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin)
PR target/63620
	* config/i386/i386-protos.h (ix86_use_pseudo_pic_reg): Declare.
	* config/i386/i386.c (ix86_use_pseudo_pic_reg): Export.
	* config/i386/i386.md (*pushtf): Allow only CONST_DOUBLEs that won't
	be reloaded through memory.
	(*pushxf): Ditto.
	(*pushdf): Ditto.

From-SVN: r216990
2014-10-31 22:52:22 +01:00
Jonathan Wakely
ccd615e3fd Make std::vector<bool> meet C++11 allocator requirements.
* include/bits/stl_bvector.h (_Bvector_base): Use allocator_traits.
	(_Bvector_base::_Bvector_impl): Use allocator's pointer type.
	(_Bvector_base::_M_end_addr()): Convert to raw pointer.
	(vector<bool>): Use allocator_traits and _M_end_addr. Add allocator
	extended constructors.
	* include/bits/vector.tcc (vector<bool>): Use allocator_traits and
	_M_end_addr.
	* testsuite/23_containers/vector/bool/allocator/copy.cc: New.
	* testsuite/23_containers/vector/bool/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/bool/allocator/noexcept.cc: New.
	* testsuite/23_containers/vector/bool/allocator/copy_assign.cc: New.
	* testsuite/23_containers/vector/bool/allocator/move.cc: New.
	* testsuite/23_containers/vector/bool/allocator/swap.cc: New.
	* testsuite/23_containers/vector/bool/allocator/ext_ptr.cc: New.
	* testsuite/23_containers/vector/bool/allocator/move_assign.cc: New.

From-SVN: r216988
2014-10-31 20:49:40 +00:00
Uros Bizjak
9ccb17b4c4 re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin)
PR target/63620
	* config/i386/i386.md (*pushtf): Allow only CONST_DOUBLES that won't
	be reloaded through memory.
	(*pushxf): Ditto.
	(*pushdf): Ditto.

From-SVN: r216987
2014-10-31 20:47:36 +01:00
Jakub Jelinek
73c49bf53a re PR rtl-optimization/63659 (wrong code at -O2 and -O3 on x86_64-linux-gnu)
PR rtl-optimization/63659
	* ree.c (update_reg_equal_equiv_notes): New function.
	(combine_set_extension, transform_ifelse): Use it.

	* gcc.c-torture/execute/pr63659.c: New test.

From-SVN: r216985
2014-10-31 20:42:39 +01:00
Jeff Law
62871ba282 contrib.texi: Add contribution notes for Balaji Iyer (Cilk+) and Jonny Grant (collect2).
* doc/contrib.texi: Add contribution notes for Balaji Iyer (Cilk+)
        and Jonny Grant (collect2).

From-SVN: r216984
2014-10-31 13:34:18 -06:00
Richard Biener
625a9766c9 builtins.c (fold_builtin_atomic_always_lock_free): Use CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where approprate.
2014-10-31  Richard Biener  <rguenther@suse.de>

	* builtins.c (fold_builtin_atomic_always_lock_free): Use
	CONVERT_EXPR_P, CONVERT_EXPR_CODE_P and CASE_CONVERT where
	approprate.
	(fold_builtin_expect): Likewise.
	(integer_valued_real_p): Likewise.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* ipa-inline-analysis.c (eliminated_by_inlining_prob): Likewise.
	(find_foldable_builtin_expect): Likewise.
	* trans-mem.c (thread_private_new_memory): Likewise.
	* tree-affine.c (aff_combination_expand): Likewise.
	* tree-data-ref.c (initialize_matrix_A): Likewise.
	* tree-inline.c (copy_bb): Likewise.
	* tree-pretty-print.c (dump_function_name): Likewise.
	(print_call_name): Likewise.
	* tree-ssa-forwprop.c (constant_pointer_difference): Likewise.
	* tree-ssa-math-opts.c (find_bswap_or_nop_1): Likewise.
	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
	* tree-vect-patterns.c (vect_handle_widen_op_by_const): Likewise.
	(vect_recog_widen_mult_pattern): Likewise.
	(vect_operation_fits_smaller_type): Likewise.
	* tree-vrp.c (find_assert_locations_1): Likewise.
	* tree-ssa-dom.c (initialize_hash_element): Canonicalize
	converts to NOP_EXPR.

From-SVN: r216982
2014-10-31 16:26:43 +00:00
Arnaud Charlet
c5cec2fe71 2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
* aspects.adb Add an entry for aspect Ghost in table
	Canonical_Aspect.
	* aspects.ads Add an entry for aspect Ghost in tables
	Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
	Implementation_Defined_Aspect.
	* einfo.adb: Flags 277 and 278 are now in use.
	(Is_Checked_Ghost_Entity): New routine.
	(Is_Ghost_Entity): Removed.
	(Is_Ghost_Subprogram): Removed.
	(Is_Ignored_Ghost_Entity): New routine.
	(Set_Is_Checked_Ghost_Entity): New routine.
	(Set_Is_Ignored_Ghost_Entity): New routine.
	(Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
	Is_Ignored_Ghost_Entity.
	* einfo.ads: Add new flags Is_Checked_Ghost_Entity
	and Is_Ignored_Ghost_Entity along with usage in nodes.
	(Is_Checked_Ghost_Entity): New routine and pragma Inline.
	(Is_Ghost_Entity): Removed along with synthesized flag
	description and usage in nodes.
	(Is_Ghost_Subprogram): Removed along with synthesized flag description
	and usage in nodes.
	(Is_Ignored_Ghost_Entity): New routine and pragma Inline.
	(Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
	(Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
	* freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
	volatile.
	* par-prag.adb Pragma Ghost does not need special handling by
	the parser.
	* repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
	* sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
	* sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
	the type as Ghost when its enclosing context is Ghost.
	(Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
	its enclosing context is Ghost.
	(Analyze_Number_Declaration): Mark the number as Ghost when its
	enclosing context is Ghost.
	(Analyze_Object_Declaration): Mark the object as Ghost when its
	enclosing context is Ghost. Verify the Ghost policy between
	initial declaration and completion of a deferred constant.
	(Analyze_Object_Contract): A Ghost variable cannot be effectively
	volatile, imported or exported.
	(Build_Derived_Record_Type): Mark a type extension as Ghost when it
	implements a Ghost interface.
	(Build_Record_Type): Inherit volatility and "ghostness" from
	the parent type.
	(Check_Completion): A Ghost entity declared
	in a non-Ghost package does not require completion in a body.
	(Implements_Ghost_Interface): New routine.
	(Process_Full_View): Inherit "ghostness" from the partial view. Verify
	the Ghost policy between the partial and full views. Verify the
	completion of a Ghost type extension.
	* sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
	* sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
	* sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
	the subprogram as Ghost when its enclosing context is Ghost.
	(Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
	when its enclosing context is Ghost. Verify the Ghost policy
	between the spec and body.
	(Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
	enclosing context is Ghost. Verify the Ghost policy between the spec
	and body.
	(Check_Conformance): A Ghost subprogram profile and a non-Ghost
	subprogram profile are not subtype conformant.
	(Convention_Of): Removed.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
	"ghostness" from the spec. Verify the Ghost policy between
	the spec and body.
	(Analyze_Private_Type_Declaration): Mark the type as Ghost when its
	enclosing context is Ghost.
	(Requires_Completion_In_Body): New routine.
	(Unit_Requires_Body): Use Requires_Completion_In_Body.
	(Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
	comment on usage and all uses of P in the body. Use
	Requires_Completion_In_Body.
	* sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
	to Pack_Id, update comment on usage and all uses of P in the body.
	* sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
	from the renamed excention.
	(Analyze_Generic_Renaming): Inherit the "ghostness" from the
	renamed generic subprogram.
	(Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
	object.
	(Analyze_Package_Renaming): Inherit the "ghostness" from the
	renamed package.
	(Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
	renamed subprogram.
	* sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
	as Ghost when its enclosing context is Ghost.
	* sem_ch12.adb (Analyze_Generic_Package_Declaration,
	Analyze_Generic_Subprogram_Declaration): Mark an exception as
	Ghost when its enclosing context is Ghost.
	(Preanalyze_Actuals): Remove obsolete check.
	* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
	for aspect Ghost.
	(Check_Aspect_At_Freeze_Point): Aspects
	Depends and Global do no need special checking at freeze point.
	(Insert_After_SPARK_Mode): Update comment on usage.
	* sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
	* sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
	(Analyze_Abstract_State): Update the grammar of the pragma. Add
	formal parameter Pack_Id along with comment on usage. Mark an
	abstract state as Ghost when its enclosing context is Ghost. Add
	processing for option Ghost.
	(Analyze_Constituent): Verify
	that a Ghost abstract state is refined by Ghost constituents.
	(Analyze_Pragma): "Ghost" is now a valid policy. Add checks
	related to the use and placement of Check_Policy Ghost. Add
	processing for pragma Ghost.
	(Check_Ghost_Constituent): New routine.
	(Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
	(Process_Convention): Remove obsolete check.
	(Set_Convention_From_Pragma): Remove the processing for convention
	Ghost.
	* sem_res.adb (Check_Ghost_Context): New routine.
	(Resolve_Call): Verify that a reference to a Ghost entity appears in a
	suitable context. Verify the Ghost polity between point of declaration
	and point of use.
	(Resolve_Entity_Name): Verify that a reference to
	a Ghost entity appears in a suitable context. Verify the Ghost
	polity between point of declaration and point of use.
	* sem_util.adb (Check_Ghost_Completion): New routine.
	(Check_Ghost_Derivation): New routine.
	(Incomplete_Or_Partial_View): New routine.
	(Incomplete_Or_Private_View): Removed.
	(Is_Ghost_Entity): New routine.
	(Is_Ghost_Statement_Or_Pragma): New routine.
	(Is_Subject_To_Ghost): New routine.
	(Policy_In_Effect): New routine.
	(Set_Is_Ghost_Entity): New routine.
	(Within_Ghost_Scope): New routine.
	* sem_util.ads (Check_Ghost_Completion): New routine.
	(Check_Ghost_Derivation): New routine.
	(Incomplete_Or_Partial_View): New routine.
	(Incomplete_Or_Private_View): Removed.
	(Is_Ghost_Entity): New routine.
	(Is_Ghost_Statement_Or_Pragma): New routine.
	(Is_Subject_To_Ghost): New routine.
	(Policy_In_Effect): New routine.
	(Set_Is_Ghost_Entity): New routine.
	(Within_Ghost_Scope): New routine.
	* snames.adb-tmpl (Get_Convention_Id): Remove the entry for
	convention Ghost.
	(Get_Convention_Name): Remove the entry for convention Ghost.
	* snames.ads-tmpl Remove the convention id for Ghost. Add a
	pragma id for Ghost.

2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>

	* gnat_ugn.texi: Add description of --RTS option for ASIS tools.

From-SVN: r216981
2014-10-31 15:49:31 +01:00
Olivier Hainque
51a054353d Makefile.in (arm-vxworks): Update target pairs.
2014-10-31  Olivier Hainque  <hainque@adacore.com> 
                                                   
	* gcc-interface/Makefile.in (arm-vxworks): Update target pairs.

From-SVN: r216980
2014-10-31 15:33:16 +01:00
Arnaud Charlet
4528392f3b [multiple changes]
2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
	* prj-proc.adb (Recursive_Process): Call Display_Name_Of to
	get the project Display_Name.
	* prj-tree.adb (Display_Name_Of): New function
	(Set_Display_Name_Of): New procedure.
	(Create_Project): Call Set_Display_Name_Of.
	* prj-tree.ads (Display_Name_Of): New function.
	(Set_Display_Name_Of): New procedure.
	(Project_Node_Record): New component Display_Name.
	(Project_Name_And_Node): Remove component Display_Name.
	* prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
	Config_File_Path as the Config_File_Name, not just its simple
	name.

2014-10-31  Thomas Quinot  <quinot@adacore.com>

	* get_scos.adb: Minor reformatting.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
	capture declaration for cursor to prevent spurious errors when
	several formal iterators that use the same cursoe name appear
	in the same context.

From-SVN: r216978
2014-10-31 15:28:08 +01:00
Richard Biener
32dfd2e033 genmatch.c (expr::gen_transform): Use NOP_EXPRs instead of CONVERT_EXPRs in generated code.
2014-10-31  Richard Biener  <rguenther@suse.de>

	* genmatch.c (expr::gen_transform): Use NOP_EXPRs instead of
	CONVERT_EXPRs in generated code.
	(dt_simplify::gen): Likewise.

From-SVN: r216977
2014-10-31 13:43:53 +00:00
Evgeny Stupachenko
9a2db19920 re PR target/63534 (Bootstrap failure on x86_64/i686-linux)
gcc/

	PR target/63534
	* config/i386/i386.c (ix86_init_pic_reg): Emit SET_GOT to
	REAL_PIC_OFFSET_TABLE_REGNUM for mcount profiling.
	(ix86_save_reg): Save REAL_PIC_OFFSET_TABLE_REGNUM when profiling
	using mcount in 32bit PIC mode.
	(ix86_elim_entry_set_got): New.
	(ix86_expand_prologue): For the mcount profiling emit new SET_GOT
	in PROLOGUE, delete initial if possible.

gcc/testsuite/

	PR target/63534
	* gcc.target/i386/mcount_pic.c: New.

From-SVN: r216975
2014-10-31 13:30:06 +00:00
Evgeny Stupachenko
bae83890e2 * gcc.target/i386/pr23098.c: Remove xfail.
From-SVN: r216974
2014-10-31 13:23:46 +00:00
Eric Botcazou
5970b0793c ipa-inline.c (want_inline_small_function_p): Fix typo and formatting.
* ipa-inline.c (want_inline_small_function_p): Fix typo and formatting.
	(want_inline_function_to_all_callers_p): Fix formatting and simplify.

From-SVN: r216973
2014-10-31 12:32:05 +00:00
Eric Botcazou
3012e0ab0b * gnat.dg/opt42.ad[sb]: New test.
From-SVN: r216972
2014-10-31 12:18:30 +00:00
Thomas Preud'homme
c6e3a93120 re PR tree-optimization/63259 (Detecting byteswap sequence)
2014-10-31  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    PR tree-optimization/63259
    * tree-ssa-math-opts.c (bswap_replace): Replace expression by a
    rotation left if it is a 16 bit byte swap.
    (pass_optimize_bswap::execute): Also consider bswap in LROTATE_EXPR
    and RROTATE_EXPR statements if it is a byte rotation.

    gcc/testsuite/
    PR tree-optimization/63259
    * optimize-bswapsi-1.c (swap32_f): New bswap pass test.
    * optimize-bswaphi-1.c: Drop useless SIType definition and fix typo in
    following comment.

From-SVN: r216971
2014-10-31 11:55:07 +00:00
Vincent Celier
aed24d9d74 prj-proc.adb (Recursive_Process): Make sure that the project display name is never No_Name.
2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-proc.adb (Recursive_Process): Make sure that the project
	display name is never No_Name.

From-SVN: r216970
2014-10-31 12:47:11 +01:00
Arnaud Charlet
715e529d70 [multiple changes]
2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Access_Attribute): Do not emit error
	message if reference does not come from source, as in the case
	for the controlling argument of a dispatching call. Error is
	diagnosed when call is resolved.
	* sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
	reference in error message.
	* sem_res.adb (Check_Prefixed_Call): ditto.

2014-10-31  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
	suppress checks when pragma Restrictions (No_Exception) is used in
	CodePeer or GNATprove mode.

2014-10-31  Yannick Moy  <moy@adacore.com>

	* gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
	checks as not suppressed in GNATprove mode.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_elab.adb (Check_Elab_Call): Nothing to check if call is
	being pre-analyzed.
	* sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
	view are those of the base, use rep_item chain of partial view,
	which may include aspects.
	* sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
	of base type, to handle properly declared subtypes.

From-SVN: r216969
2014-10-31 12:43:09 +01:00
Arnaud Charlet
88305f176d [multiple changes]
2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
	is a default storage pool, add a corresponding aspect to the
	generic unit, to be used at the point of instantiation.
	(Analyze_Package_Instantiation): If generic unit has aspect
	specifications, propagate them to instance. If instance has a
	Default_Storage_Pool aspect, make sure that it overrides the
	one that may be inherited from the generic.

2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: Minor removal of attributes of package Linker
	that have never been used and never been documented.
	* projects.texi: Add documentation for attribute Runtime.
	* prj-nmsc.adb (Check_Configuration): Do not report a warning
	for unknown compilers when the project is externally built.

From-SVN: r216968
2014-10-31 12:39:37 +01:00
Arnaud Charlet
4a68b7c4d5 [multiple changes]
2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>

	* prj-conf.adb (Do_Autoconf): Refactor the code so that empty
	Normalized_Pathname doesn't inhibit the custom Selected_Target
	value.
	* prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
	Automatically_Generated is correctly set after the first call
	to Process_Project_And_Apply_Config and not modified after the
	second call, if any.

2014-10-31  Yannick Moy  <moy@adacore.com>

	* Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
	files.
	* a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
	vectors, suitable for use in client SPARK code, also more
	efficient than the standard vectors.
	* a-coboho.adb, a-coboho.ads New unit for bounded holders, that
	are used to define formal indefinite vectors in terms of formal
	definite ones.
	* a-cofove.adb, a-cofove.ads: Simplification of the API of formal
	definite vectors, similar to the API of the new indefinite ones. A
	new formal parameter of the generic unit called Bounded allows
	to define growable vectors that use dynamic allocation.

From-SVN: r216967
2014-10-31 12:37:44 +01:00
Arnaud Charlet
527f5eb67a [multiple changes]
2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Look_For_Project_Paths): New procedure
	(Parse_Project_And_Apply_Config): Initially, parse the project
	files ignoring missing withs. If there are missing withs, extend
	the project path with directories rooted at the compiler roots,
	including directories rooted at the runtime roots, if there are
	non default runtimes, in the PATH orser.
	* prj-env.adb (Initialize_Default_Project_Path): Do not add
	any directory from the prefix if the target is "-".
	* prj-part.adb (Parse): Initialize the tables, as Parse may be
	call several times by gprbuild.
	* prj.adb (Update_Ignore_Missing_With): New procedure.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_aux.adb (First_Stored_Discriminant,
	Has_Completely_Hidden_Discriminant): When scanning the list of
	discriminants to locate possibly hidden (inherited) discriminants,
	ignore itypes that may appear in the entity list, when an access
	discriminants is constrained by an access attribute reference.

2014-10-31  Javier Miranda  <miranda@adacore.com>

	* freeze.adb (Freeze_Record_Type): Add missing
	check to verify that all the primitives of an interface type
	are abstract or null procedures.

2014-10-31  Vincent Celier  <celier@adacore.com>

	* s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
	redirects standard output and standard error to two different files.

2014-10-31  Bob Duff  <duff@adacore.com>

	* makeutl.ads: Minor comment fix.

2014-10-31  Arnaud Charlet  <charlet@adacore.com>

	* system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
	Memory_Size): Use Standard'Word_Size so that the value can be changed
	via a target configuration file.

From-SVN: r216965
2014-10-31 12:22:19 +01:00
Jakub Jelinek
14258928a3 Makefile.def (libcc1): Remove bootstrap=true;.
* Makefile.def (libcc1): Remove bootstrap=true;.
	* Makefile.in: Regenerated.

From-SVN: r216964
2014-10-31 12:19:13 +01:00
Arnaud Charlet
62a64085ba [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch4.adb: Minor tweak.

2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
	back-end inlining.
	(Must_Inline_Subp): Delete.
	* sem_util.ads, sem_util.adb (Must_Inline): Likewise.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Entity): A default_pool does not apply to
	internal access types generated for 'access references.
	* sem_prag (Analyze_Pragma, case Default_Pool): If the name is
	not null it must designate a variable.

2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb: Minor reformatting.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Build_Derived_Private_Type): If the derived
	type has access discriminants, create itype references for their
	anonymous types, so that they are elaborated before the generated
	bodies for the primitive operations of the type.

2014-10-31  Tristan Gingold  <gingold@adacore.com>

	* prj-conf.adb (Locate_Runtime): Remove procedure.

From-SVN: r216963
2014-10-31 12:18:47 +01:00
Jakub Jelinek
c288810f69 re PR sanitizer/63697 (-fsanitize=undefined doesn't detect some subtraction overflows)
PR sanitizer/63697
	* tree-vrp.c (simplify_internal_call_using_ranges): For subcode ==
	MINUS_EXPR, check overflow on vr0.min - vr1.max and vr0.max - vr1.min
	instead of vr0.min - vr1.min and vr0.max - vr1.max.

	* c-c++-common/ubsan/overflow-sub-3.c: New test.

From-SVN: r216962
2014-10-31 12:18:13 +01:00
Arnaud Charlet
6fd52b7893 [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Has_Excluded_Declaration): With back-end inlining,
	only return true for nested packages.
	(Cannot_Inline): Issue errors/warnings whatever the optimization level
	for back-end inlining and remove assertion.

2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>

	* table.adb (Tree_Read, Tree_Write): Use parentheses to specify
	the desired order of '*' and '/' operations to avoid overflow.

2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_ch6.adb (Do_Inline): Remove unreachable code.
	(Do_Inline_Always): Likewise.

2014-10-31  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
	when library has no Ada interfaces and Library_Standalone is
	declared.

From-SVN: r216961
2014-10-31 12:15:51 +01:00
Arnaud Charlet
d99565f84f [multiple changes]
2014-10-31  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
	on address clauses in CodePeer mode.

2014-10-31  Javier Miranda  <miranda@adacore.com>

	* inline.adb (Expand_Inlined_Call): Do not skip
	inlining of calls to subprogram renamings.

2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_res.adb (Resolve_Entity_Name): Account for
	the case where the immediate parent of a reference to an entity
	is a parameter association.

From-SVN: r216960
2014-10-31 12:12:14 +01:00
Arnaud Charlet
2ef051289c [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Check_And_Split_Unconstrained_Function): Do not
	test for the presence of nested subprograms.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
	* sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
	Default_Storage_Pool.

From-SVN: r216959
2014-10-31 12:09:39 +01:00
Arnaud Charlet
88f7d2d148 [multiple changes]
2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* sem_ch6.adb: Remove obsolete comment.

2014-10-31  Olivier Hainque  <hainque@adacore.com>

	* g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
	of 4si, as pixels are short.

2014-10-31  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_Call): Do not reject a call to a protected
	operation in the spec of a protected type, when the call appears
	in a pre/postcondition for another protected operation.

2014-10-31  Tristan Gingold  <gingold@adacore.com>

	* prj-conf.adb: Locate_Runtime: Always search the runtime in
	project path.

2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>

	* inline.adb (Check_Package_Body_For_Inlining): Adjust previous
	change to use correct idiom for back-end inlining.

From-SVN: r216958
2014-10-31 12:07:40 +01:00
Jan-Benedict Glaw
1335a8caf7 configure.ac: Update comment.
2014-10-31  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

./	* configure.ac: Update comment.
	* configure: Regenerate.

./contrib	* config-list.mk: Don't build Go for certain targets.

From-SVN: r216957
2014-10-31 11:03:57 +00:00