Commit Graph

6242 Commits

Author SHA1 Message Date
Jakub Jelinek c1a9c36961 gcc.c (process_command): Update copyright notice dates.
gcc/
	* gcc.c (process_command): Update copyright notice dates.
	* gcov-dump.c (print_version): Ditto.
	* gcov.c (print_version): Ditto.
	* gcov-tool.c (print_version): Ditto.
	* gengtype.c (create_file): Ditto.
	* doc/cpp.texi: Bump @copying's copyright year.
	* doc/cppinternals.texi: Ditto.
	* doc/gcc.texi: Ditto.
	* doc/gccint.texi: Ditto.
	* doc/gcov.texi: Ditto.
	* doc/install.texi: Ditto.
	* doc/invoke.texi: Ditto.
gcc/fortran/
	* gfortranspec.c (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.
gcc/ada/
	* gnat_ugn.texi: Bump @copying's copyright year.
	* gnat_rm.texi: Likewise.
gcc/go/
	* gccgo.texi: Bump @copyrights-go year.
libitm/
	* libitm.texi: Bump @copying's copyright year.
libgomp/
	* libgomp.texi: Bump @copying's copyright year.
libquadmath/
	* libquadmath.texi: Bump @copying's copyright year.

From-SVN: r243992
2017-01-01 12:31:28 +01:00
Pierre-Marie de Rodat bbe9a71dff decl.c (gnat_to_gnu_entity): When they are global...
* gcc-interface/decl.c (gnat_to_gnu_entity): When they are global,
	consider ___XR GNAT encodings variables for renamings as static so
	they have a location in the debug info.

From-SVN: r243341
2016-12-07 12:04:01 +00:00
Eric Botcazou f2e04c79ac decl.c (gnat_to_gnu_entity): Translate System.Address into ptr_type_node for every foreign convention.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Translate
	System.Address into ptr_type_node for every foreign convention.
	(gnat_to_gnu_subprog_type): Likewise for result and parameter types.
	(gnat_to_gnu_param): Do not do it here for GCC builtins.
	(intrin_return_compatible_p): Likewise.

From-SVN: r243340
2016-12-07 11:47:25 +00:00
Eric Botcazou 2c1f5c0a34 decl.c (gnat_to_gnu_entity): Also call finish_character_type on Character subtypes.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Subtype>:
	Also call finish_character_type on Character subtypes.
	* gcc-interface/utils.c (finish_character_type): Deal with subtypes.

From-SVN: r243336
2016-12-07 11:25:37 +00:00
Mikael Pettersson fb5e7daea5 re PR ada/48835 (porting GNAT to m68k-linux)
PR ada/48835
	* gcc-interface/Makefile.in: Add support for m68k-linux.
	* system-linux-m68k.ads: New file.

From-SVN: r243247
2016-12-05 11:27:55 +00:00
Eric Botcazou aad6838ec7 system-darwin-ppc.ads (Support_Atomic_Primitives): Set to True only if the word size is 64.
* system-darwin-ppc.ads (Support_Atomic_Primitives): Set to True only
	if the word size is 64.

From-SVN: r243243
2016-12-05 11:15:17 +00:00
Arnaud Charlet 60aa522875 [multiple changes]
2016-11-30  Gary Dismukes  <dismukes@adacore.com>

	* sem_prag.adb, sem_ch6.adb: Minor reformatting and typo fixes.
	* g-sechas.adb: Minor reformatting.
	* lib-xref.ads: minor grammar fix in comment.
	* lib-xref-spark_specific.adb
	(Is_SPARK_Reference): do not ignore references to concurrent
	objects.
	* sinfo.ads: Fix of unbalanced parens in comment

2016-11-30  Ed Schonberg  <schonberg@adacore.com>

	* lib-xref.adb (Get_Type_Reference): If the entity is a function
	returning a classwide type, the type reference is obtained right
	away and does not need further unwinding.

2016-11-30  Javier Miranda  <miranda@adacore.com>

	* sem_ch8.adb (Find_Renamed_Entity): For non-overloaded subprogram
	actuals of generic units check that the spec of the renaming
	and renamed entities match.

2016-11-30  Tristan Gingold  <gingold@adacore.com>

	* raise-gcc.c: For CERT runtimes: do not use gcc includes, simplify
	the handling.
	* sem_attr.adb (Analyze_Attribute): Check No_Dynamic_Priorities
	restriction for Priority Attribute.

From-SVN: r243022
2016-11-30 14:59:16 +01:00
Eric Botcazou 6724cebe76 re PR ada/78524 (failure of ACATS c41104a at -O0)
PR ada/78524
	* gcc-interface/utils.c (max_size) <tcc_reference>: Add missing
	conversion to original type in the PLACEHOLDER_EXPR case.

From-SVN: r242902
2016-11-27 22:04:13 +00:00
Eric Botcazou 18e5eb77b7 re PR ada/78531 (bootstrap broken with _FORTIFY_SOURCE enabled)
PR ada/78531
	* namet.h (Max_Line_Length): Define.
	(struct Bounded_String): Declare Chars with exact size.
	(namet__get_decoded_name_string): Delete.
	(Get_Decoded_Name_String): Likewise.
	(casing__set_all_upper_case): Likewise.

From-SVN: r242901
2016-11-27 20:23:31 +00:00
Uros Bizjak b2b0acbe2b Makefile.in ($(lang_checks_parallelized)): Fix detection of -j argument.
gcc/ChangeLog

	* Makefile.in ($(lang_checks_parallelized)): Fix detection
	of -j argument.

gcc/ada/ChangeLog

	* gcc-interface/Make-lang.in (check-acats): Fix detection
	of -j argument.

libstdc++-v3/ChangeLog

	* testsuite/Makefile.am
	(check-DEJAGNU $(check_DEJAGNU_normal_targets)): Fix detection
	of -j argument.
	* testsuite/Makefile.in: Regenereate.

From-SVN: r242705
2016-11-22 17:33:43 +01:00
Richard Sandiford 899ca90e6d Add SET_DECL_MODE
This may no longer be necessary with the current version
of the SVE patches, but it does at least make things consistent
with the TYPE_MODE/SET_TYPE_MODE split.

gcc/ada/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* gcc-interface/utils.c (create_label_decl): Use SET_DECL_MODE.

gcc/c/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* c-decl.c (merge_decls): Use SET_DECL_MODE.
	(make_label, finish_struct): Likewise.

gcc/cp/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* class.c (finish_struct_bits): Use SET_DECL_MODE.
	(build_base_field_1, layout_class_type, finish_struct_1): Likewise.
	* decl.c (make_label_decl): Likewise.
	* pt.c (tsubst_decl): Likewise.

gcc/fortran/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* trans-common.c (build_common_decl): Use SET_DECL_MODE.
	* trans-decl.c (gfc_build_label_decl): Likewise.
	* trans-types.c (gfc_get_array_descr_info): Likewise.

gcc/lto/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* lto.c (offload_handle_link_vars): Use SET_DECL_MODE.

gcc/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* tree.h (SET_DECL_MODE): New macro.
	* cfgexpand.c (avoid_deep_ter_for_debug): Use SET_DECL_MODE.
	(expand_gimple_basic_block): Likewise.
	* function.c (split_complex_args): Likeise.
	* ipa-prop.c (ipa_modify_call_arguments): Likewise.
	* omp-simd-clone.c (ipa_simd_modify_stmt_ops): Likewise.
	* stor-layout.c (layout_decl, relayout_decl): Likewise.
	(finish_bitfield_representative): Likewise.
	* tree.c (make_node_stat): Likewise.
	* tree-inline.c (remap_ssa_name): Likewise.
	(tree_function_versioning): Likewise.
	* tree-into-ssa.c (rewrite_debug_stmt_uses): Likewise.
	* tree-sra.c (sra_ipa_reset_debug_stmts): Likewise.
	* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
	* tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise.
	* tree-ssa.c (insert_debug_temp_for_var_def): Likewise.
	* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise.
	* varasm.c (make_debug_expr_from_rtl): Likewise.

libcc1/
2016-11-16  Richard Sandiford  <richard.sandiford@arm.com>
 	    Alan Hayward  <alan.hayward@arm.com>
 	    David Sherwood  <david.sherwood@arm.com>

	* plugin.cc (plugin_build_add_field): Use SET_DECL_MODE.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r242585
2016-11-18 10:03:12 +00:00
Eric Botcazou 725bbb80d6 Makefile.in: Replace s-interr-hwint.adb with s-interr-vxworks.adb throughout.
* gcc-interface/Makefile.in: Replace s-interr-hwint.adb with
	s-interr-vxworks.adb throughout.

From-SVN: r242382
2016-11-14 11:45:33 +00:00
Bob Duff 8d5a1b4f64 decl.c (gnat_to_gnu_entity): In assertion about known Esize...
* gcc-interface/decl.c (gnat_to_gnu_entity): In assertion about known
	Esize, protect with !is_type and change !Unknown_Esize to Known_Esize.

From-SVN: r242363
2016-11-13 18:38:02 +00:00
Eric Botcazou 476053121b decl.c (gnat_to_gnu_entity): Look at the underlying type for the signedness of the type.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
	Look at the underlying type for the signedness of the type.

From-SVN: r242361
2016-11-13 18:29:45 +00:00
Eric Botcazou c0c54de6a0 decl.c (annotate_value): Deal specially with negative constants.
* gcc-interface/decl.c (annotate_value) <INTEGER_CST>: Deal specially
	with negative constants.

From-SVN: r242360
2016-11-13 18:20:25 +00:00
Eric Botcazou 96826e28ef utils2.c (gnat_protect_expr): Also protect only the address if the expression is the component of a dereference.
* gcc-interface/utils2.c (gnat_protect_expr): Also protect only the
	address if the expression is the component of a dereference.
	Do not use a reference type for the final temporary reference.

From-SVN: r242358
2016-11-13 18:08:25 +00:00
Eric Botcazou 854c00dd69 Makefile.in (NO_OMIT_ADAFLAGS): Define.
* gcc-interface/Makefile.in (NO_OMIT_ADAFLAGS): Define.
	(a-except.o): Replace -fno-inline with NO_INLINE_ADAFLAGS.
	(s-memory.o): New rule.
	(tracebak.o): Replace -fno-omit-frame-pointer with NO_OMIT_ADAFLAGS.

From-SVN: r242357
2016-11-13 17:43:23 +00:00
Tamar Christina 061ee39672 Fix native windows build by adding signal.h back into the include list.
* gcc/ada/adaint.c: Added signal.h for Windows.

From-SVN: r241907
2016-11-07 14:14:13 +00:00
Eric Botcazou ea4249cb24 Minor tweaks
From-SVN: r241734
2016-11-01 09:36:04 +00:00
Jakub Jelinek 5cea3ad6b5 dwarf2out.h (struct dw_loc_descr_node): Adjust comment for frame_offset_rel bit.
* dwarf2out.h (struct dw_loc_descr_node): Adjust comment
	for frame_offset_rel bit.
	(struct array_descr_info): Add rank field.
	* dwarf2out.c (struct loc_descr_context): Add placeholder_arg
	and placeholder_seen fields.
	(resolve_args_picking_1): Handle also frame_offset_rel DW_OP_dup
	and DW_OP_over.  Optimize DW_OP_pick 0 into DW_OP_dup and
	DW_OP_pick 1 into DW_OP_over.
	(function_to_dwarf_procedure, type_byte_size, field_byte_offset,
	gen_variant_part): Clear placeholder_{arg,seen}.
	(loc_list_from_tree_1): Drop const from context argument.
	Handle integral PLACEHOLDER_EXPR if context->placeholder_arg.
	(loc_list_for_address_of_addr_expr_of_indirect_ref,
	loc_list_from_tree, loc_descriptor_from_tree): Drop const from
	context argument.
	(add_scalar_info): Drop const from context argument.  Handle
	context->placeholder_arg.
	(add_bound_info): Drop const from context argument.
	(gen_descr_array_type_die): Drop const from ctx variable.
	Initialize placeholder_arg and placeholder_seen.  Add DW_AT_rank
	attribute and use a single DW_TAG_generic_subrange instead of
	7 DW_TAG_subrange_type for assumed rank arrays.
fortran/
	* trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
	-gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
	expects.
ada/
	* gcc-interface/misc.c (gnat_get_array_descr_info): Clear rank
	field.

From-SVN: r241719
2016-10-31 20:35:47 +01:00
Rainer Orth 6a5792b660 Parallelize check-gnat
* gcc-interface/Make-lang.in (lang_checks_parallelized): New target.
	(check_gnat_parallelize): Likewise.

From-SVN: r241469
2016-10-24 11:18:21 +00:00
Nicolas Roche 2e20345f13 Makefile (x86-64/Linux): Restore missing pairs.
* gcc-interface/Makefile (x86-64/Linux): Restore missing pairs.
	(x86/Darwin): Likewise.

From-SVN: r241369
2016-10-20 11:06:21 +00:00
Eric Botcazou 1af000e003 system-linux-armel.ads: Rename into...
* system-linux-armel.ads: Rename into...
	* system-linux-arm.ads: ...this
	* gcc-interface/Makefile.in (ARM/Android): Adjust to above renaming.
	(ARM/Linux): Likewise.
	(Aarch64/Linux): Likewise.

From-SVN: r241328
2016-10-19 08:05:36 +00:00
Eric Botcazou c354ab1fb2 Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
* gcc-interface/Makefile.in (EXTRA_GNATRTL_NONTASKING_OBJS): Define.
	(EXTRA_GNATRTL_TASKING_OBJS): Likewise.
	(ARM/Android): Add atomic support.
	(SPARC/Solaris): Simplify.
	(x86/Solaris): Likewise.
	(x86/Linux): Likewise.
	(x86-64/kFreeBDS): Adjust and use system-freebsd-x86.ads
	(x86/FreeBSD): Add s-mudido-affinity.adb.
	(x86-64/FreeBSD): Likewise and use system-freebsd-x86.ads.
	(s390/Linux): Simplify.
	(PowerPC/AIX): Likewise.
	(Cygwin/Mingw): Likewise.
	(MIPSel/Linux): Likewise.
	(ARM/Linux): Add atomic support.
	(Aarch64/Linux): Use system-linux-armel.ads.
	(SPARC/Linux): Simplify.
	(IA-64/Linux): Minor tweak.
	(IA-64/HP-UX): Likewise.
	(Alpha/Linux): Likewise.
	(x86-64/Linux): Use system-linux-x86.ads.
	(x86/Darwin): Simplify.
	(PowerPC/Darwin): Likewise.
	(ARM/Darwin): Use system-darwin-arm.ads.
	(ADA_EXCLUDE_SRCS): Minor reformatting.
	* system-aix.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-aix64.ads: Delete.
	* system-darwin-arm.ads: New.
	* system-darwin-ppc.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-darwin-ppc64.ads: New.
	* system-darwin-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-darwin-x86_64.ads: Delete.
	* system-freebsd-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-freebsd-x86_64.ads: Delete.
	* system-linux-alpha.ads (Support_Atomic_Primitives): Set to True.
	* system-linux-armeb.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-linux-armel.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-linux-mips.ads: (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-mipsel.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-s390.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Stack_Check_Probes): Set to True.
	* system-linux-s390x.ads: Delete.
	* system-linux-sparc.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-sparcv9.ads: Delete.
	* system-linux-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-linux-x86_64.ads: Delete.
	* system-mingw-x86_64.ads: Delete.
	* system-mingw.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-solaris-sparc.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	(Support_Atomic_Primitives): Set to True.
	* system-solaris-sparcv9.ads: Delete.
	* system-solaris-x86.ads (Word_Size): Change to Standard'Word_Size.
	(Memory_Size): Change to 2 ** Word_Size.
	* system-solaris-x86_64.ads: Delete.

From-SVN: r241316
2016-10-18 20:29:53 +00:00
Eric Botcazou d47d384918 system-darwin-ppc64.ads (Support_64_Bit_Divides): Delete.
* system-darwin-ppc64.ads (Support_64_Bit_Divides): Delete.
	* system-linux-armeb.ads (Support_64_Bit_Divides): Likewise.
	* system-linux-mips.ads (Support_64_Bit_Divides): Likewise.
	* system-linux-mips64el.ads (Support_64_Bit_Divides): Likewise.
	* system-linux-mipsel.ads (Support_64_Bit_Divides): Likewise.
	* system-linux-sparcv9.ads (Support_64_Bit_Divides): Likewise.
	* system-rtems.ads (Support_64_Bit_Divides): Likewise.

From-SVN: r241230
2016-10-17 08:52:32 +00:00
Eric Botcazou 4c640e2606 re PR ada/37139 (DEP prevents using Ada tasking)
PR ada/37139
	PR ada/67205
	* common.opt (-ftrampolines): New option.
	* doc/invoke.texi (Code Gen Options): Document it.
	* doc/tm.texi.in (Trampolines): Add TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
	* doc/tm.texi: Regenerate.
	* builtins.def: Add init_descriptor and adjust_descriptor.
	* builtins.c (expand_builtin_init_trampoline): Do not issue a warning
	on platforms with descriptors.
	(expand_builtin_init_descriptor): New function.
	(expand_builtin_adjust_descriptor): Likewise.
	(expand_builtin) <BUILT_IN_INIT_DESCRIPTOR>: New case.
	<BUILT_IN_ADJUST_DESCRIPTOR>: Likewise.
	* calls.c (prepare_call_address): Remove SIBCALLP parameter and add
	FLAGS parameter.  Deal with indirect calls by descriptor and adjust.
	Set STATIC_CHAIN_REG_P on the static chain register, if any.
	(call_expr_flags): Set ECF_BY_DESCRIPTOR for calls by descriptor.
	(expand_call): Likewise.  Move around call to prepare_call_address
	and pass all flags to it.
	* cfgexpand.c (expand_call_stmt): Reinstate CALL_EXPR_BY_DESCRIPTOR.
	* gimple.h (enum gf_mask): New GF_CALL_BY_DESCRIPTOR value.
	(gimple_call_set_by_descriptor): New setter.
	(gimple_call_by_descriptor_p): New getter.
	* gimple.c (gimple_build_call_from_tree): SetCALL_EXPR_BY_DESCRIPTOR.
	(gimple_call_flags): Deal with GF_CALL_BY_DESCRIPTOR.
	* langhooks.h (struct lang_hooks): Add custom_function_descriptors.
	* langhooks-def.h (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS): Define.
	(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS.
	* rtl.h (STATIC_CHAIN_REG_P): New macro.
	* rtlanal.c (find_first_parameter_load): Skip static chain registers.
	* target.def (custom_function_descriptors): New POD hook.
	* tree.h (FUNC_ADDR_BY_DESCRIPTOR): New flag on ADDR_EXPR.
	(CALL_EXPR_BY_DESCRIPTOR): New flag on CALL_EXPR.
	* tree-core.h (ECF_BY_DESCRIPTOR): New mask.
	Document FUNC_ADDR_BY_DESCRIPTOR and CALL_EXPR_BY_DESCRIPTOR.
	* tree.c (make_node_stat) <tcc_declaration>: Use FUNCTION_ALIGNMENT.
	(build_common_builtin_nodes): Initialize init_descriptor and
	adjust_descriptor.
	* tree-nested.c: Include target.h.
	(struct nesting_info): Add 'any_descr_created' field.
	(get_descriptor_type): New function.
	(lookup_element_for_decl): New function extracted from...
	(create_field_for_decl): Likewise.
	(lookup_tramp_for_decl): ...here.  Adjust.
	(lookup_descr_for_decl): New function.
	(convert_tramp_reference_op): Deal with descriptors.
	(build_init_call_stmt): New function extracted from...
	(finalize_nesting_tree_1): ...here.  Adjust and deal withdescriptors.
	* defaults.h (FUNCTION_ALIGNMENT): Define.
	(TRAMPOLINE_ALIGNMENT): Set to above instead of FUNCTION_BOUNDARY.
	* config/i386/i386.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
	* config/ia64/ia64.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise.
	* config/rs6000/rs6000.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS):Likewise.
	* config/sparc/sparc.h (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Likewise.
ada/
	* gcc-interface/misc.c (LANG_HOOKS_CUSTOM_FUNCTION_DESCRIPTORS):Define.
	* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Access>: Deal with
	a zero TARGET_CUSTOM_FUNCTION_DESCRIPTORS specially for Code_Address.
	Otherwise, if TARGET_CUSTOM_FUNCTION_DESCRIPTORS is positive, set
	FUNC_ADDR_BY_DESCRIPTOR for 'Access/'Unrestricted_Access of nested
	subprograms if the type can use an internal representation.
	(call_to_gnu): Likewise, but set CALL_EXPR_BY_DESCRIPTOR on indirect
	calls if the type can use an internal representation.

From-SVN: r241222
2016-10-16 20:13:32 +00:00
Eric Botcazou 01c0b7cf89 system-aix.ads (Always_Compatible_Rep): Change to False.
* system-aix.ads (Always_Compatible_Rep): Change to False.
	* system-aix64.ads (Always_Compatible_Rep): Likewise.
	* system-hpux-ia64.ads (Always_Compatible_Rep): Likewise.
	* system-hpux.ads (Always_Compatible_Rep): Likewise.
	* system-linux-alpha.ads (Always_Compatible_Rep): Likewise.
	* system-linux-hppa.ads (Always_Compatible_Rep): Likewise.
	* system-linux-ia64.ads (Always_Compatible_Rep): Likewise.
	* system-linux-mips.ads (Always_Compatible_Rep): Likewise.
	* system-linux-mips64el.ads (Always_Compatible_Rep): Likewise.
	* system-linux-mipsel.ads (Always_Compatible_Rep): Likewise.
	* system-linux-s390.ads (Always_Compatible_Rep): Likewise.
	* system-linux-s390x.ads (Always_Compatible_Rep): Likewise.
	* system-linux-sh4.ads (Always_Compatible_Rep): Likewise.
	* system-linux-sparc.ads (Always_Compatible_Rep): Likewise.
	* system-linux-sparcv9.ads (Always_Compatible_Rep): Likewise.
	* system-rtems.ads (Always_Compatible_Rep): Likewise.

From-SVN: r241213
2016-10-16 13:59:07 +00:00
Eric Botcazou 14cf71a0df re PR ada/77968 (ICEs with -flto on gnat.dg)
PR ada/77968
	* gcc-interface/utils.c (create_var_decl): Do not clear TREE_READONLY
	in LTO mode for an external variable.
	(can_materialize_object_renaming_p): Move up.

From-SVN: r241154
2016-10-14 10:28:27 +00:00
Thomas Preud'homme 4d0cdd0ce6 Move MEMMODEL_* from coretypes.h to memmodel.h
2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition
    into ...
    * memmodel.h: This file.
    * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c,
      caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c,
      cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c,
      combine-stack-adj.c, common/config/aarch64/aarch64-common.c,
      common/config/arm/arm-common.c, common/config/bfin/bfin-common.c,
      common/config/c6x/c6x-common.c, common/config/i386/i386-common.c,
      common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c,
      compare-elim.c, config/aarch64/aarch64-builtins.c,
      config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c,
      config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c,
      config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c,
      config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c,
      config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c,
      config/darwin.c, config/epiphany/epiphany.c,
      config/epiphany/mode-switch-use.c,
      config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c,
      config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c,
      config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c,
      config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c,
      config/m68k/m68k.c, config/mcore/mcore.c,
      config/microblaze/microblaze.c, config/mmix/mmix.c,
      config/mn10300/mn10300.c, config/moxie/moxie.c,
      config/msp430/msp430.c, config/nds32/nds32-cost.c,
      config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
      config/nds32/nds32-memory-manipulation.c,
      config/nds32/nds32-predicates.c, config/nds32/nds32.c,
      config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c,
      config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c,
      config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c,
      config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc,
      config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c,
      config/stormy16/stormy16.c, config/tilegx/tilegx.c,
      config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c,
      config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c,
      coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c,
      df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c,
      dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c,
      expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c,
      ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c,
      ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c,
      ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c,
      loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c,
      lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c,
      lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c,
      lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c,
      postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c,
      recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c,
      reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c,
      rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c,
      sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c,
      stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c,
      targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c,
      tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c,
      tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c,
      tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c,
      var-tracking.c, varasm.c: Include memmodel.h.
    * genattrtab.c (write_header): Include memmodel.h in generated file.
    * genautomata.c (main): Likewise.
    * gengtype.c (open_base_files): Likewise.
    * genopinit.c (main): Likewise.
    * genconditions.c (write_header): Include memmodel.h earlier in
    generated file.
    * genemit.c (main): Likewise.
    * genoutput.c (output_prologue): Likewise.
    * genpeep.c (main): Likewise.
    * genpreds.c (write_insn_preds_c): Likewise.
    * genrecog.c (write_header): Likewise.
    * Makefile.in (PLUGIN_HEADERS): Include memmodel.h

    gcc/ada/
    * gcc-interface/utils2.c: Include memmodel.h.

    gcc/c-family/
    * c-cppbuiltin.c: Include memmodel.h.
    * c-opts.c: Likewise.
    * c-pragma.c: Likewise.
    * c-warn.c: Likewise.

    gcc/c/
    * c-typeck.c: Include memmodel.h.

    gcc/cp/
    * decl2.c: Include memmodel.h.
    * rtti.c: Likewise.

    gcc/fortran/
    * trans-intrinsic.c: Include memmodel.h.

    gcc/go/
    * go-backend.c: Include memmodel.h.

    libgcc/
    * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_*
    equivalent.
    * config/tilepro/atomic.c: Likewise and stop casting model to
    enum memmodel.

From-SVN: r241121
2016-10-13 14:17:52 +00:00
Arnaud Charlet ec2255295c [multiple changes]
2016-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Analyze_Expression_Function):
	Remove the aspects of the original expression function has been
	rewritten into a subprogram declaration or a body. Reinsert the
	aspects once they have been analyzed.

2016-10-13  Tristan Gingold  <gingold@adacore.com>

	* exp_ch9.adb (Expand_N_Asynchronous_Select): Return immediately
	on restricted profile.

2016-10-13  Javier Miranda  <miranda@adacore.com>

	* sem_prag.adb
	(Process_Compile_Time_Warning_Or_Error): Register the pragma
	for its validation after the backend has been called only if its
	expression has some occurrence of attributes 'size or 'alignment
	* table.ads (Release_Threshold): New formal.
	(Release): Adding documentation of its new functionality.
	* table.adb (Release): Extend its functionality with a
	Release_Threshold.
	* nlists.adb (Next_Node table): Set its Release_Threshold.
	* atree.adb (Orig_Nodes table): Set its Release_Threshold.
	* atree.ads (Nodes table): Set its Release_Threshold.
	(Flags table): Set its Release_Threshold.
	* alloc.ads (Nodes_Release_Threshold): New constant declaration.
	(Orig_Nodes_Release_Threshold): New constant declaration.
	* debug.adb (switch d.9): Left free.
	* gnat1drv.adb (Post_Compilation_Validation_Checks): Enable
	validation of pragmas Compile_Time_Error and Compile_Time_Warning.

From-SVN: r241117
2016-10-13 15:00:54 +02:00
Arnaud Charlet 8eb8461dc1 [multiple changes]
2016-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch6.adb (Create_Extra_Formals): Generate
	an Itype reference for the object extra formal in case the
	subprogram is called within the same or nested scope.

2016-10-13  Claire Dross  <dross@adacore.com>

	* sem_ch5.adb (Analyze_Iterator_Specification):
	Also create a renaming in GNATprove mode.

2016-10-13  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Fixed_Point_Type): in SPARK mode, the
	given bounds of the type must be strictly representable, and the
	range reduction by one delta ("shaving") allowed by the Ada RM,
	is not applicable in SPARK.

2016-10-13  Javier Miranda  <miranda@adacore.com>

	* debug.adb (switch d.9): Used to temporarily disable the support
	needed for this enhancement since it causes regressions with
	large sources.
	* gnat1drv.adb (Post_Compilation_Validation_Checks): Temporarily
	leave the validation of pragmas Compile_Time_Warning and
	Compile_Time_Error under control of -gnatd.9/

From-SVN: r241115
2016-10-13 14:58:24 +02:00
Ed Falis 870ce4d51b * i-vxinco.adb, i-vxinco.ads: New files.
From-SVN: r241114
2016-10-13 14:57:16 +02:00
Arnaud Charlet 5dc203d228 [multiple changes]
2016-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb (Entity_Needs_Body): A generic
	subprogram renaming needs a body if the renamed unit is declared
	outside the current compilation unit.

2016-10-13  Hristian Kirtchev  <kirtchev@adacore.com>

	* sinfo.ads, sem_ch12.adb, sem.adb, expander.adb, sem_res.ads,
	sem_ch4.adb, sem_ch8.adb, s-memory.adb: Minor reformatting.

2016-10-13  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb: Delete all temporary files when invoked as gnat
	list -V -P ...

2016-10-13  Ed Falis  <falis@adacore.com>

	* impunit.adb: add i-vxinco.ads.
	* s-interr-vxworks.adb: add hook for user interrupt connection routine.

From-SVN: r241112
2016-10-13 14:54:42 +02:00
Ed Falis 6c25a67618 s-interr-hwint.adb, [...]: Rename s-interr-hwint.adb to s-interr-vxworks.adb.
2016-10-13  Ed Falis  <falis@adacore.com>

	* s-interr-hwint.adb, s-interr-vxworks.adb: Rename s-interr-hwint.adb
	to s-interr-vxworks.adb.

From-SVN: r241110
2016-10-13 14:38:21 +02:00
Gary Dismukes c9d2e84b72 exp_ch7.adb, [...]: Minor typo fixes and reformatting.
2016-10-13  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch7.adb, einfo.ads, sem_prag.adb, sem_prag.ads, sem.ads,
	sem_attr.adb, sem_case.adb, sem_ch13.ads: Minor typo fixes and
	reformatting.

From-SVN: r241109
2016-10-13 14:24:21 +02:00
Javier Miranda a946a5c38d sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New overloaded subprogram that factorizes code executed as part of the regular...
2016-10-13  Javier Miranda  <miranda@adacore.com>

	* sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New
	overloaded subprogram that factorizes code executed as part
	of the regular processing of these pragmas and as part of its
	validation after invoking the backend.
	* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): New
	subprogram.
	(Process_Compile_Time_Warning_Or_Error): If the
	condition is known at compile time then invoke the new overloaded
	subprogram; otherwise register the pragma in a table to validate
	it after invoking the backend.
	* sem.ads, sem.adb (Unlock): New subprogram.
	* sem_attr.adb (Analyze_Attribute [Size]): If we are processing
	pragmas Compile_Time_Warning and Compile_Time_Errors after the
	backend has been called then evaluate this attribute if 'Size
	is known at compile time.
	* gnat1drv.adb (Post_Compilation_Validation_Checks): Validate
	compile time warnings and errors.
	* sem_ch13.ads, sem_ch13.adb (Validate_Compile_Time_Warning_Error):
	New subprogram.
	(Validate_Compile_Time_Warning_Errors): New subprogram.

From-SVN: r241107
2016-10-13 14:12:18 +02:00
Arnaud Charlet c877ae8dc8 [multiple changes]
2016-10-13  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt to
	optional refinement for abstract states with only partial refinement
	visible.

2016-10-13  Justin Squirek  <squirek@adacore.com>

	* sem_ch13.adb: Minor correction in comment in
	Analyze_Aspect_Specifications
	* sem_prag.adb: Minor reformatting.

2016-10-13  Thomas Quinot  <quinot@adacore.com>

	* s-stratt-xdr.adb: Disable compiler unit warnings.

2016-10-13  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Visible_Component): In an instance body, check
	whether the component may be hidden in a selected component by
	a homonym that is a primitive operation of the type of the prefix.

From-SVN: r241106
2016-10-13 14:10:46 +02:00
Jakub Jelinek 1202f33e5e re PR target/77957 (Undefined .LCTOC0 with -fstack-protector-strong -mminimal-toc -O0 on ppc64)
PR target/77957
	* hooks.h (hook_tree_void_null): Declare.
	* hooks.c (hook_tree_void_null): New function.
	* langhooks.c (lhd_return_null_tree_v): Remove.
	* langhooks-def.h (lhd_return_null_tree_v): Remove.
	* cfgexpand.c (stack_protect_prologue): If guard_decl is NULL,
	set y to const0_rtx.
	* function.c (stack_protect_epilogue): Likewise.
	* config/tilepro/tilepro.c (TARGET_STACK_PROTECT_GUARD): Redefine
	if TARGET_THREAD_SSP_OFFSET is defined.
	* config/s390/s390.c (TARGET_STACK_PROTECT_GUARD): Likewise.
	* config/sparc/sparc.c (TARGET_STACK_PROTECT_GUARD): Likewise.
	* config/tilegx/tilegx.c (TARGET_STACK_PROTECT_GUARD): Likewise.
	* config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Likewise.
	* config/i386/i386.c (TARGET_STACK_PROTECT_GUARD): Likewise.
	(ix86_stack_protect_guard): New function.
c/
	* c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
	instead of lhd_return_null_tree_v.
ada/
	* gcc-interface/misc.c (LANG_HOOKS_GETDECLS): Use hook_tree_void_null
	instead of lhd_return_null_tree_v.

From-SVN: r241087
2016-10-13 10:29:03 +02:00
Arnaud Charlet 05f1a54316 [multiple changes]
2016-10-12  Yannick Moy  <moy@adacore.com>

	* einfo.adb, einfo.ads (Partial_Refinement_Constituents): Take
	into account constituents that are themselves abstract states
	with full or partial refinement visible.
	* sem_prag.adb (Find_Encapsulating_State): Move function
	to library-level, to share between subprograms.
	(Analyze_Refined_Global_In_Decl_Part): Use
	Find_Encapsulating_State to get relevant encapsulating state.

2016-10-12  Arnaud Charlet  <charlet@adacore.com>

	* gnat1drv.adb: Fix minor typo.

From-SVN: r241052
2016-10-12 16:37:35 +02:00
Yannick Moy a25f5b28d7 sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt checking for optional refinement of abstract state with partial visible...
2016-10-12  Yannick Moy  <moy@adacore.com>

	* sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt checking
	for optional refinement of abstract state with partial
	visible refinement.
	(Analyze_Refined_Global_In_Decl_Part): Adapt checking for optional
	refinement of abstract state with partial visible refinement. Implement
	new rules in SPARK RM 7.2.4 related to optional refinement.
	Also fix the missing detection of missing items.

From-SVN: r241050
2016-10-12 16:25:05 +02:00
Arnaud Charlet 5b42c03538 [multiple changes]
2016-10-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb Add new usage for Elist29 and Node35.
	(Anonymous_Designated_Type): New routine.
	(Anonymous_Master): Removed.
	(Anonymous_Masters): New routine.
	(Set_Anonymous_Designated_Type): New routine.
	(Set_Anonymous_Master): Removed.
	(Set_Anonymous_Masters): New routine.
	(Write_Field29_Name): Add output for Anonymous_Masters.
	(Write_Field35_Name): Remove the output for Anonymous_Master. Add
	output for Anonymous_Designated_Type.
	* einfo.ads Remove attribute Anonymous_Master along with
	usage in entities. Add attributes Anonymous_Designated_Type
	and Anonymous_Masters along with usage in entities.
	(Anonymous_Designated_Type): New routine along with pragma Inline.
	(Anonymous_Master): Removed along with pragma Inline.
	(Anonymous_Masters): New routine along with pragma Inline.
	(Set_Anonymous_Designated_Type): New routine along with pragma Inline.
	(Set_Anonymous_Master): Removed along with pragma Inline.
	(Set_Anonymous_Masters): New routine along with pragma Inline.
	* exp_ch7.adb (Build_Anonymous_Master): Reuse an anonymous master
	defined in the same unit if it services the same designated
	type, otherwise create a new one.
	(Create_Anonymous_Master): Reimplemented.
	(Current_Anonymous_Master): New routine.
	(In_Subtree): Removed.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Analyze_Pragma, case Dynamic_Predicate):
	Check properly whether there is an explicit assertion policy
	for predicate checking, even in the presence of a general Ignore
	assertion policy.

2016-10-12  Steve Baird  <baird@adacore.com>

	* sem.adb (Walk_Library_Items): Cope with ignored ghost units.

From-SVN: r241049
2016-10-12 15:59:48 +02:00
Arnaud Charlet d89ce4324c [multiple changes]
2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* lib-writ.adb (Write_ALI): Removal of unused file entries from
	dependency list must be performed before the list is sorted,
	so that the dependency number of other files is properly set-up
	for use in tools that relate entity information to the unit in
	which they are declared.

2016-10-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_aggr.adb (Initialize_Ctrl_Array_Component):
	Create a copy of the initialization expression to avoid sharing
	it between multiple components.

2016-10-12  Yannick Moy  <moy@adacore.com>

	* einfo.adb, einfo.ads (Has_Partial_Visible_Refinement): New flag
	in abtract states.
	(Has_Non_Null_Visible_Refinement): Return true for patial refinement.
	(Partial_Refinement_Constituents): New function returns the full or
	partial refinement constituents depending on scope.
	* sem_ch3.adb (Analyze_Declarations): Remove partial visible
	refinements when exiting the scope of a package spec or body
	and those partial refinements are not in scope afterwards.
	* sem_ch7.adb, sem_ch7.ads (Install_Partial_Declarations): Mark
	abstract states of parent units with partial refinement so that
	it is visible.
	* sem_prag.adb (Analyze_Part_Of_In_Decl_Part): Mark enclosing
	abstract state if any as having partial refinement in that scope.
	(Analyze_Refined_Global_In_Decl_Part): Check constituent usage
	based on full or partial refinement depending on scope.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_N_Type_Conversion): If the target type
	has an invariant aspect, insert invariant call at the proper
	place in the code rather than rewriting the expression as an
	expression with actions, to prevent spurious semantic errors on
	the rewritten conversion when it is the object in a renaming.

From-SVN: r241048
2016-10-12 15:53:46 +02:00
Hristian Kirtchev f31dcd99ac exp_ch5.adb, [...]: Minor reformatting.
2016-10-12  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch5.adb, sem_ch3.adb, exp_ch9.adb, a-tags.adb, sem_prag.adb,
	sem_ch12.adb, xref_lib.adb, a-strunb-shared.adb, rtsfind.adb,
	freeze.adb, sem_attr.adb, sem_case.adb, exp_ch4.adb, ghost.adb,
	exp_ch6.adb, sem_ch4.adb, restrict.adb, s-os_lib.adb: Minor
	reformatting.

From-SVN: r241041
2016-10-12 14:59:57 +02:00
Arnaud Charlet 0026dd0a63 [multiple changes]
2016-10-12  Justin Squirek  <squirek@adacore.com>

	* sem_ch10.adb (Remove_Limited_With_Clause): Add a check to
	detect accidental visibility.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_Allocator): If the expression is a qualified
	expression, add a predicate check after the constraint check.
	* sem_res.adb (Resolve_Qualified_Expression): If context is an
	allocator, do not apply predicate check, as it will be done when
	allocator is expanded.

From-SVN: r241040
2016-10-12 14:57:23 +02:00
Arnaud Charlet 84a62ce88b [multiple changes]
2016-10-12  Bob Duff  <duff@adacore.com>

	* xref_lib.adb: Use renamings-of-slices to ensure
	that all references to Tables are properly bounds checked (when
	checks are turned on).
	* g-dyntab.ads, g-dyntab.adb: Default-initialize the array
	components, so we don't get uninitialized pointers in case
	of Tables containing access types.  Misc cleanup of the code
	and comments.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Attribute, case 'Type_Key): Implement
	functionality of attribute, to provide a reasonably unique key
	for a given type and detect any changes in the semantics of the
	type or any of its subcomponents from version to version.

2016-10-12  Bob Duff  <duff@adacore.com>

	* sem_case.adb (Check_Choice_Set): Separate
	checking for duplicates out into a separate pass from checking
	full coverage, because the check for duplicates does not depend
	on predicates. Therefore, we shouldn't do it separately for the
	predicate vs. no-predicate case; we should share code. The code
	for the predicate case was wrong.

From-SVN: r241039
2016-10-12 14:55:47 +02:00
Arnaud Charlet fc3a3580da [multiple changes]
2016-10-12  Jerome Lambourg  <lambourg@adacore.com>

	* init.c: Make sure to call finit on x86_64-vx7 to reinitialize
	the FPU unit.

2016-10-12  Arnaud Charlet  <charlet@adacore.com>

	* lib-load.adb (Load_Unit): Generate an error message even when
	Error_Node is null.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* lib-writ.adb (Write_ALI): Disable optimization related to transitive
	limited_with clauses for now.

2016-10-12  Javier Miranda  <miranda@adacore.com>

	* sem_attr.adb (Analyze_Attribute_Old_Result): Generating C
	code handle 'old located in inlined _postconditions procedures.
	(Analyze_Attribute [Attribute_Result]): Handle 'result when
	rewriting the attribute as a reference to the formal parameter
	_Result of inlined _postconditions procedures.

2016-10-12  Tristan Gingold  <gingold@adacore.com>

	* s-rident.ads (Profile_Info): Remove
	Max_Protected_Entries restriction from GNAT_Extended_Ravenscar
	* sem_ch9.adb (Analyze_Protected_Type_Declaration):
	Not a controlled type on restricted runtimes.

2016-10-12  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch3.adb (Derive_Subprogram): Add test
	for Is_Controlled of Parent_Type when determining whether an
	inherited subprogram with one of the special names Initialize,
	Adjust, or Finalize should be derived with its normal name even
	when inherited as a private operation (which would normally
	result in the inherited operation having a special "hidden" name).

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Resolve_Call): If a function call returns a
	limited view of a type replace it with the non-limited view,
	which must be available when compiling call.  This was already
	done elsewhere for non-overloaded calls, but needs to be done
	after resolution if function name is overloaded.

2016-10-12  Javier Miranda  <miranda@adacore.com>

	* a-tags.adb (IW_Membership [private]): new overloaded
	subprogram that factorizes the code needed to check if a
	given type implements an interface type.
	(IW_Membership
	[public]): invoke the new internal IW_Membership function.
	(Is_Descendant_At_Same_Level): Fix this routine to implement RM
	3.9 (12.3/3)

From-SVN: r241036
2016-10-12 14:33:50 +02:00
Arnaud Charlet 7504523eca [multiple changes]
2016-10-12  Tristan Gingold  <gingold@adacore.com>

	* exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support
	for a secondary procedure in case of missing Ada.Calendar.Delays
	* rtsfind.ads (RTU_Id): Add System_Relative_Delays.
	(RE_Id): Add RO_RD_Delay_For.
	* rtsfind.adb (Output_Entity_Name): Handle correctly units RO_XX.
	* s-rident.ads: Remove No_Relative_Delays
	restriction for GNAT_Extended_Ravenscar.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_elab.adb (Within_Initial_Condition):  When deternining
	the context of the expression, use the original node if it is
	a pragma, because Check pragmas are rewritten as conditionals
	when assertions are not enabled.

2016-10-12  Bob Duff  <duff@adacore.com>

	* spitbol_table.ads, spitbol_table.adb (Adjust, Finalize): Add
	"overriding".

2016-10-12  Bob Duff  <duff@adacore.com>

	* a-strunb-shared.ads, a-strunb-shared.adb (Finalize):
	Make sure Finalize is idempotent.
	(Unreference): Check for
	Empty_Shared_String, in case the reference count of the empty
	string wraps around.
	Also add "not null" in various places that can't be null.

2016-10-12  Jerome Lambourg  <lambourg@adacore.com>

	* init.c: Fix sigtramp with the x86_64-vx7-vxsim target on
	Windows host.

2016-10-12  Vadim Godunko  <godunko@adacore.com>

	* s-os_lib.ads (Is_Owner_Readable_File): Renamed from
	Is_Readable_File.
	(Is_Owner_Writable_File): Renamed from Is_Writable_File.
	(Is_Readable_File): Renames Is_Read_Accessible_File.
	(Is_Writable_File): Renames Is_Write_Accessible_File.

From-SVN: r241035
2016-10-12 14:27:25 +02:00
Ed Schonberg 5b4c102959 sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal formal entity without a parent only if...
2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Check_Formal_Package_Instance): Skip an internal
	formal entity without a parent only if the corresponding actual
	entity has a different kind.
	* exp_ch9.adb (Build_Class_Wide_Master): If the master is
	declared locally, insert the renaming declaration after the
	master declaration, to prevent access before elaboration in gigi.

From-SVN: r241029
2016-10-12 12:40:37 +02:00
Ed Schonberg 05662a060a contracts.adb (Analyze_Contracts): For a type declaration, analyze an iterable aspect when present.
2016-10-12  Ed Schonberg  <schonberg@adacore.com>                    

	* contracts.adb (Analyze_Contracts): For a type declaration, analyze
	an iterable aspect when present.

From-SVN: r241028
2016-10-12 12:38:17 +02:00
Arnaud Charlet 393525afc3 [multiple changes]
2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Check_Formal_Package_Instance): Handle properly
	an instance of a formal package with defaults, when defaulted
	parameters include tagged private types and array types.

2016-10-12  Tristan Gingold  <gingold@adacore.com>

	* restrict.ads, restrict.adb (Restricted_Profile): Adjust
	comment, use Restricted_Tasking to compare restrictions.
	* s-rident.ads (Profile_Name): Add Restricted_Tasking and
	reorder literals.
	(Profile_Info): Set restrictions for Restricted_Tasking.

2016-10-12  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Analyze_Full_Type_Declaration): Set Ghost status
	of type before elaborating inherited operations, so that the
	Ghost status is set properly for them.
	* ghost.adb (Check_Ghost_Overriding): A ghost subprogram can
	override an abstract subprogram coming from an interface
	operation.

From-SVN: r241026
2016-10-12 12:33:08 +02:00