Commit Graph

177167 Commits

Author SHA1 Message Date
Eric Botcazou 30c6e576a3 [Ada] Get rid of more references to Universal_Integer in expanded code
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* libgnat/s-atopar.adb (Atomic_Fetch_And_Add): Make use of an
	equivalent static expression.
	(Atomic_Fetch_And_Subtract): Likewise.
	(Is_Lock_Free): Likewise.
	* libgnat/s-atopex.adb (Atomic_Exchange): Likewise.
	(Atomic_Compare_And_Exchange): Likewise.
	(Is_Lock_Free): Likewise.
2020-06-03 06:01:43 -04:00
Vadim Godunko f38efc1361 [Ada] Fix typos
2020-06-03  Vadim Godunko  <godunko@adacore.com>

gcc/ada/

	* libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
	libgnat/s-parame__hpux.ads: Fix typos.
2020-06-03 06:01:43 -04:00
Eric Botcazou e4542648e1 [Ada] Avoid creating temporaries in Universal_Integer, continued
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_util.adb (Remove_Side_Effects): For a type conversion, do
	not remove the side effects of the expression only if it is of
	universal integer type.
2020-06-03 06:01:42 -04:00
Arnaud Charlet a10340812c [Ada] Update headers
2020-06-03  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/s-aotase.ads, libgnat/s-atoope.ads,
	libgnat/s-atopar.ads, libgnat/s-atopex.ads: Update header.
2020-06-03 06:01:41 -04:00
Eric Botcazou b5b032ec6e [Ada] Small improvement to Expand_N_Unchecked_Type_Conversion
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_ch4.adb (Expand_N_Unchecked_Type_Conversion): Also fold the
	conversion for literals of enumeration types.
2020-06-03 06:01:40 -04:00
Yannick Moy 93b3110d75 [Ada] Improve handling of SPARK_Mode in generic instances
2020-06-03  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* rtsfind.adb (Load_RTU): Correctly set/reset global variable to
	ignore SPARK_Mode in instances around loading.
	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Accept Off
	without prior On.
	* sem_ch7.adb (Analyze_Package_Body_Helper): Likewise.
	* sem_prag.adb (Analyze_Pragma): Always take into account
	SPARK_Mode Off.
2020-06-03 06:01:39 -04:00
Arnaud Charlet e60b6e2374 [Ada] Initial infrastructure for adding a tree checker
2020-06-03  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* frontend.adb (Frontend): Call (dummy for now) tree checker.
	* debug.adb: Reserve -gnatd_V for the tree checker.
	* vast.ads, vast.adb: New files.
	* gcc-interface/Make-lang.in: Add vast.o.
2020-06-03 06:01:39 -04:00
Justin Squirek da566eeb31 [Ada] Incorrect accessibility checking on aliased formals
2020-06-03  Justin Squirek  <squirek@adacore.com>

gcc/ada/

	* libgnat/a-cborse.adb, libgnat/a-cihase.adb,
	libgnat/a-ciorse.adb, libgnat/a-coorse.adb: Modified to use
	'Unrestricted_Access in certain cases where static accessibility
	errors were triggered.
	* exp_ch6.adb (Expand_Simple_Return_Statement): Add generation
	of dynamic accessibility checks as determined by
	Is_Special_Aliased_Formal_Access.
	* sem_attr.adb (Resolve_Attribute): Add call to
	Is_Special_Aliased_Formal_Access to avoid performing static
	checks where dynamic ones are required.
	* sem_ch6.adb (Check_Return_Obj_Accessibility): Handle renamed
	objects within component associations requiring special
	accessibility checks.
	* sem_util.adb, sem_util.ads (Is_Special_Aliased_Formal_Access):
	Created to detect the special case where an aliased formal is
	being compared against the level of an anonymous access return
	object.
	(Object_Access_Level): Remove incorrect condition leading to
	overly permissive accessibility levels being returned on
	explicitly aliased parameters.
2020-06-03 06:01:38 -04:00
Eric Botcazou 79e267f9fb [Ada] Improve 'Val implementation for some enumeration types
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* einfo.ads (Enum_Pos_To_Rep): Adjust description.
	* exp_attr.adb (Expand_N_Attribute_Reference) <Pred>:
	Reimplement in the case of an enumeration type with non-standard
	but contiguous representation.
	<Succ>: Likewise.
	<Val>: Likewise.
	* exp_ch3.adb (Expand_Freeze_Enumeration_Type): Count the
	literals in the first loop.  If the representation is
	contiguous, just build the index type of the array type and set
	Enum_Pos_To_Rep to it.
2020-06-03 06:01:37 -04:00
Gary Dismukes 0751169926 [Ada] Unnesting problems with expansion of Loop_Entry attribute
2020-06-03  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

	* exp_attr.adb (Expand_Loop_Entry_Attribute): Revise loop that
	resets the scopes of entities associated with Loop_Id to the
	scope of the new function, so the resetting is not restricted to
	itypes, but excludes loop parameters and the function entity
	itself. However, this fix is believed to be incomplete and a ???
	comment is added to indicate that.
2020-06-03 06:01:36 -04:00
Bob Duff 0000998e65 [Ada] Minor change to comment in System.Regexp spec
2020-06-03  Bob Duff  <duff@adacore.com>

gcc/ada/

	* libgnat/s-regexp.ads: Fix comment
2020-06-03 06:01:35 -04:00
Eric Botcazou 10e168cdbe [Ada] Get rid of more references to Universal_Integer in expanded code
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_attr.adb (Expand_N_Attribute_Reference) <Enum_Rep>:
	In the case of an enumeration type, do an intermediate
	conversion to a small integer type.  Remove useless stuff.
	<Finalization_Size>: Do not hardcode Universal_Integer and
	fix a type mismatch in the assignment to the variable.
	<Max_Size_In_Storage_Elements>: Likewise.
	<From_Any>: Do not redefine the Ptyp local variable.
	<To_Any>: Likewise.
	<TypeCode>: Likewise.
	<Pos>: Small tweaks.
	<Val>: For an enumeration type with standard representation,
	apply the range check to the expression of a convertion to
	Universal_Integer, if any.  For an integer type, expand to
	a mere conversion.
2020-06-03 06:01:34 -04:00
Eric Botcazou eebcb56180 [Ada] More efficient System.Random_Numbers.Random_Discrete for 32-bit types
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* libgnat/s-rannum.adb (Random_Discrete): In the 32-bit case,
	use the same linear implementation as in the 64-bit case when
	the type has a contiguous representation.
2020-06-03 06:01:34 -04:00
Gary Dismukes 8f8fc3840e [Ada] Debug info not available on subp having a class-wide precondition
2020-06-03  Gary Dismukes  <dismukes@adacore.com>

gcc/ada/

	* sem_util.adb (Build_Class_Wide_Clone_Decl): Call
	Set_Debug_Info_Needed to set the Needs_Debug_Info flag on
	Clone_Id if the flag is set on Spec_Id.
2020-06-03 06:01:33 -04:00
Yannick Moy 9ff488f029 [Ada] Fix missing overflow checks in analysis of predefined unit
2020-06-03  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* inline.adb (Expand_Inlined_Call): Do not suppress checks on
	inlined code in GNATprove mode.
2020-06-03 06:01:32 -04:00
Eric Botcazou 3c5fb4f495 [Ada] Fix typo in comment
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* einfo.ads (Has_Contiguous_Rep): Fix typo in comment.
2020-06-03 06:01:31 -04:00
Piotr Trojanek 99859ea756 [Ada] Iterate with procedural versions of Next_... routines where possible
2020-06-03  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* checks.adb, einfo.adb, exp_aggr.adb, exp_ch4.adb, exp_ch6.adb,
	exp_unst.adb, exp_util.adb, freeze.adb, inline.adb, repinfo.adb,
	sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch13.adb,
	sem_ch3.adb, sem_ch4.adb, sem_ch8.adb, sem_elab.adb,
	sem_eval.adb, sem_prag.adb, sem_res.adb, sem_smem.adb,
	sem_util.adb, treepr.adb: Replace uses of Next_ functions with
	corresponding procedures.
2020-06-03 06:01:30 -04:00
Eric Botcazou fe2684adda [Ada] Get rid of more references to Universal_Integer in expanded code
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_attr.adb (Attribute_Valid): Use Standard_Long_Long_Integer
	in lieu of Universal_Integer as large integer type.
	* exp_ch3.adb (Expand_Freeze_Enumeration_Type): Likewise.
2020-06-03 06:01:28 -04:00
Arnaud Charlet c35b8eed79 [Ada] Add Address_Int declaration in s-auxdec.ads
2020-06-03  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/s-auxdec.ads (Address_Int): New.
2020-06-03 06:01:27 -04:00
Arnaud Charlet ba2034610f [Ada] Remove ASIS tree generation
2020-06-03  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* aspects.adb, aspects.ads, atree.adb, atree.ads, elists.adb,
	elists.ads, fname.adb, fname.ads, gnat1drv.adb, lib.adb,
	lib.ads, namet.adb, namet.ads, nlists.adb, nlists.ads, opt.adb,
	opt.ads, osint-c.adb, osint-c.ads, repinfo.adb, repinfo.ads,
	sem_aux.adb, sem_aux.ads, sinput.adb, sinput.ads, stand.ads,
	stringt.adb, stringt.ads, switch-c.adb, table.adb, table.ads,
	uintp.adb, uintp.ads, urealp.adb, urealp.ads (Tree_Read,
	Tree_Write): Remove generation of ASIS trees.
	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Remove -gnatt and -gnatct documentation.
	* gnat_ugn.texi: Regenerate.
	* tree_in.ads, tree_in.adb, tree_io.ads, tree_io.adb,
	tree_gen.ads, tree_gen.adb, stand.adb: Remove.
	* gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Remove
	references to tree_gen.o tree_in.o tree_io.o.
2020-06-03 06:01:26 -04:00
Eric Botcazou bad8184e3e [Ada] Put a couple of options in alphabetical order
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* opt.ads (Disable_FE_Inline): Move around.
	(Disable_FE_Inline_Always): Likewise.
2020-06-03 06:01:25 -04:00
Eric Botcazou cf9e38295f [Ada] Avoid creating temporaries in Universal_Integer for range checks
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* checks.adb (Is_Single_Attribute_Reference): New predicate.
	(Generate_Range_Check): Do not force the evaluation if the
	node is a single attribute reference.
	* exp_util.adb (Side_Effect_Free_Attribute): New predicate.
	(Side_Effect_Free) <N_Attribute_Reference>: Call it.
	(Remove_Side_Effects): Remove the side effects of the prefix
	for an attribute reference whose prefix is not a name.
2020-06-03 06:01:24 -04:00
Arnaud Charlet 5cea137308 [Ada] Remove -gnatt switch processing
2020-06-03  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* switch-c.adb (Scan_Front_End_Switches): Remove processing of
	-gnatt.
	* usage.adb (Usage): Remove mention of -gnatt.
2020-06-03 06:01:23 -04:00
Eric Botcazou 6f4ad963f8 [Ada] Minor tweaks in commentary
2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* sinfo.ads: Minor tweaks in commentary.
2020-06-03 06:01:22 -04:00
Martin Liska eb3480fc0f
gcov: Fix build on AIX
We must guard used atomic builtins with GCOV_SUPPORTS_ATOMIC.
The patch is tested on AIX and I'm going to push it.

libgcc/ChangeLog:

	PR gcov-profile/95480
	* libgcov-profiler.c (GCOV_SUPPORTS_ATOMIC): Move to...
	* libgcov.h (GCOV_SUPPORTS_ATOMIC): ...here.
	(gcov_counter_add): Use GCOV_SUPPORTS_ATOMIC guard.
	(gcov_counter_set_if_null): Likewise.
2020-06-03 08:12:50 +02:00
GCC Administrator a9312a7926 Daily bump. 2020-06-03 00:16:34 +00:00
David Malcolm 44564c4c81 jit: fix __builtin_unreachable [PR 95426]
PR jit/95426 reports a crash deep inside "expand" when using
__builtin_unreachable via gcc_jit_context_get_builtin_function,
due to BLOCK_FOR_INSN being erroneously used on a barrier within
rtl_verify_bb_pointers.

The root cause turns out to be that I didn't implement
LANG_HOOKS_COMMON_ATTRIBUTE_TABLE and LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
for the jit "frontend".  When building a decl for the builtin, the
libgccjit frontend generates a chain of attributes names, but when
this is passed to decl_attributes and the attributes are looked up by
namespace and name within lookup_scoped_attribute_spec, attributes_table
is empty.  Hence no attributes were being associated with the fndecl,
and so ECF_NORETURN was not set on the gimple_call (along with various
other flags missing on the decl, etc), and so the call is treated as
not terminating its BB, and so the CFG rapidly diverges from the
equivalent created by the C frontend.

This patch fixes things by implementing these langhooks, copying the
minimal attribute-handling code from LTO.  I stepped through the
creation of the fndecl and verified that with this fix it has the same
attributes as the equivalent created by the C frontend.

gcc/jit/ChangeLog:
	PR jit/95426
	* dummy-frontend.c: Include "options.h", "stringpool.h", and
	"attribs.h".
	(ATTR_EXCL): New, copied from lto/lto-lang.c.
	(attr_noreturn_exclusions): Likewise.
	(attr_returns_twice_exclusions): Likewise.
	(attr_const_pure_exclusions): Likewise.
	(jit_attribute_table): Likewise, copied from lto_attribute_table.
	(jit_format_attribute_table): Likewise, copied from
	lto_format_attribute_table.
	(handle_noreturn_attribute): New, copied from lto/lto-lang.c.
	(handle_leaf_attribute): Likewise.
	(handle_const_attribute): Likewise.
	(handle_malloc_attribute): Likewise.
	(handle_pure_attribute): Likewise.
	(handle_novops_attribute): Likewise.
	(get_nonnull_operand): Likewise.
	(handle_nonnull_attribute): Likewise.
	(handle_nothrow_attribute): Likewise.
	(handle_sentinel_attribute): Likewise.
	(handle_type_generic_attribute): Likewise.
	(handle_transaction_pure_attribute): Likewise.
	(handle_returns_twice_attribute): Likewise.
	(handle_patchable_function_entry_attribute): Likewise.
	(ignore_attribute): Likewise.
	(handle_format_attribute): Likewise.
	(handle_format_arg_attribute): Likewise.
	(handle_fnspec_attribute): Likewise.
	(LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define.
	(LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Define.

gcc/testsuite/ChangeLog:
	PR jit/95426
	* jit.dg/all-non-failing-tests.h: Add note about...
	* jit.dg/test-builtin-unreachable.c: New test.
2020-06-02 18:24:47 -04:00
Jason Merrill 4b68cb38dd c++: *this capture in const member fn [PR95193].
Here, the capture proxy for *this is const, but its DECL_VALUE_EXPR is not.
Don't ICE on this; it's a reasonable difference, since in C++ an rvalue of
scalar type does not have cv-qualifiers.

gcc/cp/ChangeLog:

	PR c++/95193
	* pt.c (tsubst_decl): Relax assert.

gcc/testsuite/ChangeLog:

	PR c++/95193
	* g++.dg/cpp1z/lambda-this7.C: New test.
2020-06-02 15:00:00 -04:00
Jim Wilson 4013baf99c RISC-V: Make __divdi3 handle div by zero same as hardware.
The ISA manual specifies that divide by zero always returns -1 as the result.
We were failing to do that when the dividend was negative.

Original patch from Virginie Moser.

	libgcc/
	* config/riscv/div.S (__divdi3): For negative arguments, change bgez
	to bgtz.
2020-06-02 11:44:44 -07:00
Alexandre Oliva 578c013aa6 [Ada] remove last traces of -auxbase
Remove occurrences of auxbase that remained in comments.


for  gcc/ada/ChangeLog

	* lib.ads (Compilation_Switches): Remove -auxbase from
	comments.
	* switch.ads (Is_Internal_GCC_Switch): Likewise.
2020-06-02 15:36:49 -03:00
Iain Sandoe 324276ff9b coroutines: Wrap co_await in a target expr where needed [PR95050]
Since the co_await expression is mostly opaque to the existing
machinery, we were hiding the details of the await_resume return
value.  If that needs to be wrapped in a target expression, then
emulate this with the whole co_await.  Similarly, if the await
expression we build in response to co_await p.yield_value (e)
is wrapped in a target expression, then we need to transfer that
wrapper to the resultant CO_YIELD_EXPR (which is, itself, just
a proxy for the underlying co_await).

gcc/cp/ChangeLog:

	PR c++/95050
	* coroutines.cc (build_co_await): Wrap the co_await expression
	in a TARGET_EXPR, where needed.
	(finish_co_yield_expr): Likewise.

gcc/testsuite/ChangeLog:

	PR c++/95050
	* g++.dg/coroutines/pr95050.C: New test.
2020-06-02 19:10:28 +01:00
Alexandre Oliva ce95db102a spell ldscript correctly in outputs.exp et al
In my recent changes to outputs.exp and gcc-defs.exp, I misreferenced
dejagnu board property ldscript, singular, as ldscripts, plural.

This probably didn't have much impact on gcc-defs.exp: the code there
would just prefix with -Wl, any options that amounted to file names,
and linker scripts probably wouldn't be named without a -T or even an
-Wl,-T, prefix.

The visible effects were in outputs.exp, that also intended to add the
ldscript, if present, to the set of options to be passed to the
compiler driver for linking.  Using the wrong option name, that
wouldn't work.


for  gcc/testsuite/ChangeLog

	* gcc.misc-tests/outputs.exp: Spell ldscript correctly.
	* lib/gcc-defs.exp (gcc_adjust_linker_flags): Likewise.
2020-06-02 14:33:38 -03:00
Fei Yang b2672dd630 aarch64: Fix an ICE in aarch64_short_vector_p [PR95459]
In aarch64_short_vector_p, we are simply checking whether a type (and a mode)
is a 64/128-bit short vector or not.  This should not be affected by the value
of TARGET_SVE.  Simply leave later code to report an error if SVE is disabled.

2020-06-02  Felix Yang  <felix.yang@huawei.com>

gcc/
	PR target/95459
	* config/aarch64/aarch64.c (aarch64_short_vector_p):
	Leave later code to report an error if SVE is disabled.

gcc/testsuite/
	PR target/95459
	* gcc.target/aarch64/mgeneral-regs_6.c: New test.
2020-06-02 18:17:34 +01:00
Jonathan Wakely eca833b812 libstdc++: Make debug containers prefer copy ctor to base ctor (PR 90102)
When given a type which can convert to any container-like type, the
C(const C&) copy constructor and C(const C::_Base&) converting
constructor are ambiguous. This change replaces the converting
constructor's parameter with a reference_wrapper-like type so that
calling that constructor requires an additional user-defined conversion.
This gives it a lower rank than the copy constructor, avoiding the
ambiguity.

While testing this change I discovered that __gnu_debug::forward_list
doesn't have a convering constructor from the std::forward_list base, so
this adds it.

We should probably consider whether the converting constructors should
be 'explicit' but I'm not changing that now.

libstdc++-v3/ChangeLog:

	PR libstdc++/90102
	* include/debug/deque (deque(const _Base&)): Replace parameter
	with a struct that wraps a const _Base&.
	* include/debug/forward_list (forward_list(_Base_ref)): New
	constructor.
	* include/debug/list (list(const _Base&)): Replace parameter
	with a struct that wraps a const _Base&.
	* include/debug/map.h (map(const _Base&)): Likewise.
	* include/debug/multimap.h (multimap(const _Base&)): Likewise.
	* include/debug/multiset.h (multiset(const _Base&)): Likewise.
	* include/debug/set.h (set(const _Base&)): Likewise.
	* include/debug/unordered_map (unordered_map(const _Base&))
	(unordered_multimap(const _Base&)): Likewise.
	* include/debug/unordered_set (unordered_set(const _Base&))
	(unordered_multiset(const _Base&)): Likewise.
	* testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
	Adjust dg-error line number.
	* include/debug/vector (vector(const _Base&)): Likewise.
	* testsuite/23_containers/deque/debug/90102.cc: New test.
	* testsuite/23_containers/forward_list/debug/90102.cc: New test.
	* testsuite/23_containers/list/debug/90102.cc: New test.
	* testsuite/23_containers/map/debug/90102.cc: New test.
	* testsuite/23_containers/multimap/debug/90102.cc: New test.
	* testsuite/23_containers/multiset/debug/90102.cc: New test.
	* testsuite/23_containers/set/debug/90102.cc: New test.
	* testsuite/23_containers/unordered_map/debug/90102.cc: New test.
	* testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
	* testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
	* testsuite/23_containers/unordered_set/debug/90102.cc: New test.
	* testsuite/23_containers/vector/debug/90102.cc: New test.
2020-06-02 18:13:33 +01:00
Kyrylo Tkachov 95827968e5 aarch64: Add initial support for -mcpu=zeus
This patch adds support for the Arm Zeus CPU.
Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/

2020-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/aarch64/aarch64-cores.def (zeus): Define.
	* config/aarch64/aarch64-tune.md: Regenerate.
	* doc/invoke.texi (AArch64 Options): Document zeus -mcpu option.
2020-06-02 17:42:48 +01:00
Aaron Sawdey 85bce484d3 Correctly identify stfs if prefixed
Because reg_to_non_prefixed() only looks at the register being used, it
doesn't get the right answer for stfs, which leads to us not seeing
that it has a PCREL symbol ref.  This patch works around this by
introducing a helper function that inspects the insn to see if it is in
fact a stfs. Then if we use NON_PREFIXED_DEFAULT, address_to_insn_form()
can see that it has the PCREL symbol ref.

gcc/ChangeLog:

	PR target/95347
	* config/rs6000/rs6000.c (prefixed_store_p): Add special case
	for stfs.
	(is_stfs_insn): New helper function.
2020-06-02 11:27:46 -05:00
Jan Hubicka 34e5efa10a Simplify streaming of tree references
* lto-streamer-in.c (stream_read_tree_ref): Simplify streaming of
	references.
	* lto-streamer-out.c (stream_write_tree_ref): Likewise.
2020-06-02 17:39:58 +02:00
Andrew Stubbs d3b6767dce amdgcn: Remove -mlocal-symbol-id option
This patch removes the obsolete -mlocal-symbol-id option.  This was used to
control mangling of local symbol names in order to work around a ROCm runtime
bug, but that has not been needed in some time, and the mangling was removed
already.

gcc/ChangeLog:

	* config/gcn/gcn-hsa.h (CC1_SPEC): Delete.
	* config/gcn/gcn.opt (-mlocal-symbol-id): Delete.
	* config/gcn/mkoffload.c (main): Don't use -mlocal-symbol-id.

gcc/testsuite/ChangeLog:

	* gcc.dg/intermod-1.c: Don't use -mlocal-symbol-id.
2020-06-02 15:35:56 +01:00
Martin Liska 4b6dcfd542
gcc-changelog: support patterns
contrib/ChangeLog:

	* gcc-changelog/git_commit.py: Support foo/bar/*: patterns in
	wildcard_prefixes locations.
	* gcc-changelog/test_email.py: Test it.
	* gcc-changelog/test_patches.txt: Add 3 new patches.
2020-06-02 16:05:38 +02:00
Martin Liska a04b7410d3
libgcov: replace malloc and calloc.
The calloc was in the original tested version of the patch
and I made accidental last minute change.

Installed to master as obvious.

libgcc/ChangeLog:

	* libgcov.h (gcov_topn_add_value): Use xcalloc instead
	of xmalloc.
2020-06-02 13:57:31 +02:00
Eric Botcazou 0bd4508f86 Fix bits/bytes confusion in latest change to expand_unop
gcc/ChangeLog:
	PR middle-end/95395
	* optabs.c (expand_unop): Fix bits/bytes confusion in latest change.

	* tree-pretty-print.c (dump_generic_node) <ARRAY_TYPE>: Print quals.
2020-06-02 13:16:59 +02:00
Iain Buclaw 5fe28857fe contrib: Add gdc.test to list of ignored prefixes
The files in this subdirectory are part of the D2 test suite maintained
in the upstream DMD code repository.

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (ignored_prefixes): Add
	gcc/testsuite/gdc.test/.
2020-06-02 12:56:46 +02:00
Iain Buclaw 7edc15f292 d: Set up input_location before lowering Dsymbol AST
Like a similarly named function in the visitor class for statements,
this ensures that the current input_location is set to the correct
source file location of the decl.

It is likely that there are a number of cases where declarations have
ended up with no location without this.

gcc/d/ChangeLog:

	* decl.cc (DeclVisitor::build_dsymbol): New function.
	(DeclVisitor::visit (TupleDeclaration *)): Use build_dsymbol to
	traverse AST instead of accept.
	(DeclVisitor::visit (AttribDeclaration *)): Likewise.
	(DeclVisitor::visit (Nspace *)): Likewise.
	(DeclVisitor::visit (TemplateDeclaration *)): Likewise.
	(DeclVisitor::visit (TemplateInstance *)): Likewise.
	(DeclVisitor::visit (TemplateMixin *)): Likewise.
	(DeclVisitor::visit (StructDeclaration *)): Likewise.
	(DeclVisitor::visit (ClassDeclaration *)): Likewise.
	(DeclVisitor::visit (InterfaceDeclaration *)): Likewise.
	(DeclVisitor::visit (VarDeclaration *)): Likewise.
	(build_decl_tree): Likewise.
2020-06-02 12:53:52 +02:00
Jonathan Wakely 54a0eb7fa5 gcc-changelog: Update test to match new error text
contrib/ChangeLog:

	* gcc-changelog/test_email.py (TestGccChangelog.test_long_lines):
	Update expected error message.
2020-06-02 11:43:09 +01:00
Stefan Schulze Frielinghaus 87cb9423ad S/390: Emit vector alignment hints for z13
2020-06-02  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>

gcc/ChangeLog:

	* config/s390/s390.c (print_operand): Emit vector alignment
	hints for z13.

gcc/testsuite/ChangeLog:

	* gcc.target/s390/vector/align-1.c: Change target architecture
	to z13.
	* gcc.target/s390/vector/align-2.c: Change target architecture
	to z13.
2020-06-02 12:36:11 +02:00
Jonathan Wakely 6fb93242cb gcc-changelog: Improve error text for overlong ChangeLog lines
This error is wrong, the line is what exceeds LINE_LIMIT characters, the
limit doesn't exceed itself.

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
	grammar.
2020-06-02 11:18:21 +01:00
Jonathan Wakely 9127b52398 contrib: Make prepare-commit-msg hook safe for older branches
If a user installs this script as .git/hooks/prepare-commit-msg and then
works on an old branch which doesn't have the mklog.py script, trying to
commit will fail with an error like:

environment: /.../gcc/contrib/mklog.py: No such file or directory

This makes it exit cleanly so it's possible to commit.

contrib/ChangeLog:

	* prepare-commit-msg: Do nothing if the mklog.py script isn't
	present.
2020-06-02 11:18:21 +01:00
Martin Liska 871e5ada6d
Make TOPN counter dynamically allocated.
gcc/ChangeLog:

	* coverage.c (get_coverage_counts): Skip sanity check for TOP N counters
	as they have variable number of counters.
	* gcov-dump.c (main): Add new option -r.
	(print_usage): Likewise.
	(tag_counters): All new raw format.
	* gcov-io.h (struct gcov_kvp): New.
	(GCOV_TOPN_VALUES): Remove.
	(GCOV_TOPN_VALUES_COUNTERS): Likewise.
	(GCOV_TOPN_MEM_COUNTERS): New.
	(GCOV_TOPN_DISK_COUNTERS): Likewise.
	(GCOV_TOPN_MAXIMUM_TRACKED_VALUES): Likewise.
	* ipa-profile.c (ipa_profile_generate_summary): Use
	GCOV_TOPN_MAXIMUM_TRACKED_VALUES.
	(ipa_profile_write_edge_summary): Likewise.
	(ipa_profile_read_edge_summary): Likewise.
	(ipa_profile): Remove usage of GCOV_TOPN_VALUES.
	* profile.c (sort_hist_values): Sort variable number
	of counters.
	(compute_value_histograms): Special case for TOP N counters
	that have dynamic number of key-value pairs.
	* value-prof.c (dump_histogram_value): Dump variable number
	of key-value pairs.
	(stream_in_histogram_value): Stream in variable number
	of key-value pairs for TOP N counter.
	(get_nth_most_common_value): Deal with variable number
	of key-value pairs.
	(dump_ic_profile): Use GCOV_TOPN_MAXIMUM_TRACKED_VALUES
	for loop iteration.
	(gimple_find_values_to_profile): Set GCOV_TOPN_MEM_COUNTERS
	to n_counters.
	* doc/gcov-dump.texi: Document new -r option.

libgcc/ChangeLog:

	* libgcov-driver.c (prune_topn_counter): Remove.
	(prune_counters): Likewise.
	(merge_one_data): Special case TOP N counters
	as they have variable length.
	(write_top_counters): New.
	(write_one_data): Special case TOP N.
	(dump_one_gcov): Do not prune TOP N counters.
	* libgcov-merge.c (merge_topn_values_set): Remove.
	(__gcov_merge_topn): Use gcov_topn_add_value.
	* libgcov-profiler.c (__gcov_topn_values_profiler_body):
	Likewise here.
	* libgcov.h (gcov_counter_add): New.
	(gcov_counter_set_if_null): Likewise.
	(gcov_topn_add_value): New.
2020-06-02 12:11:02 +02:00
Jakub Jelinek 23438370f7 openmp: Fix up build if HAVE_SYNC_BUILTINS is not defined.
2020-06-02  Jakub Jelinek  <jakub@redhat.com>

	* allocator.c (omp_free): Fix up build if HAVE_SYNC_BUILTINS is not
	defined.
2020-06-02 11:56:59 +02:00
Arnaud Charlet 65f1ca2e3d [Ada] Remove ASIS_Mode
2020-06-02  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* atree.ads, checks.adb, contracts.adb, debug.adb, einfo.ads,
	exp_ch3.adb, exp_util.adb, expander.ads, expander.adb,
	frontend.adb, gnat1drv.adb, itypes.adb, lib.ads, namet.ads,
	opt.adb, opt.ads, par-prag.adb, repinfo.ads, sem_aggr.adb,
	sem_aux.ads, sem_case.ads, sem_ch10.adb, sem_ch12.adb,
	sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb,
	sem_dim.adb, sem_elab.adb, sem_prag.adb, sem_prag.ads,
	sem_res.adb, sem_type.adb, sem_util.adb, sinfo.ads, stand.ads,
	tree_io.ads: Remove references to ASIS_Mode.
2020-06-02 04:58:29 -04:00