Commit Graph

177167 Commits

Author SHA1 Message Date
Max Filippov 1ca05dead0 MAINTAINERS: Add myself as xtensa port maintainer
2020-06-06  Max Filippov  <jcmvbkbc@gmail.com>

	* MAINTAINERS: Add myself as xtensa port maintainer.
2020-06-06 01:26:56 -07:00
Alexandre Oliva 2e6a6644db [PR95456] avoid memcpy (_, NULL, 0) in gcc.c
Some newly-added code in gcc.c might call memcpy with a NULL source
pointer and zero-length inputs.  Avoid such calls by rearranging the
code a little.


for  gcc/ChangeLog

	PR driver/95456
	* gcc.c (do_spec_1): Don't call memcpy (_, NULL, 0).
2020-06-05 22:31:19 -03:00
GCC Administrator 1a59f3db4a Daily bump. 2020-06-06 00:16:29 +00:00
Iain Buclaw 5bc13e5217 d: Merge upstream dmd 740f3d1ea.
Backports the conversion of the parameter fields debugids and versionids
to Identifiers.  The idea is that Identifiers should be used instead of
C strings where ever possible.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 740f3d1ea.
	* d-lang.cc (d_handle_option): Use new fields to save debug and
	version levels passed over command-line.
	(d_post_options): Add them to front-end here.
2020-06-05 23:14:21 +02:00
Martin Sebor 3a73a6adb6 Temporarily remove an unintentionally commited test.
gcc/testsuite/ChangeLog:
	* g++.dg/warn/Wnonnull5.C: Temporarily remove.
2020-06-05 15:02:09 -06:00
Marek Polacek cecc73af49 c++: Make braced-init-list as template arg work with aggr init [PR95369]
Barry pointed out to me that our braced-init-list as a template-argument
extension doesn't work as expected when we aggregate-initialize.  Since
aggregate list-initialization is a user-defined conversion sequence, we
allow it as part of a converted constant expression.

Co-authored-by: Jason Merrill <jason@redhat.com>

gcc/cp/ChangeLog:

	PR c++/95369
	* call.c (build_converted_constant_expr_internal): Allow
	list-initialization.

gcc/testsuite/ChangeLog:

	PR c++/95369
	* g++.dg/cpp2a/nontype-class38.C: New test.
2020-06-05 15:51:08 -04:00
Harald Anlauf bcd96c9cce PR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols
The testcases for PR95090 and PR95106 trigger buffer overflows with long
symbols that were found with an instrumented compiler.  Enlarge the
affected buffers, and add checks that the buffers will suffice.

2020-06-05  Harald Anlauf  <anlauf@gmx.de>

gcc/fortran/
	PR fortran/95530
	PR fortran/95537
	* decl.c (gfc_match_decl_type_spec): Enlarge buffer, and enhance
	string copy to detect buffer overflow.
	* gfortran.h (gfc_common_head): Enlarge buffer.
	* trans-common.c (finish_equivalences): Enhance string copy to
	detect buffer overflow.
2020-06-05 20:30:34 +02:00
Iain Sandoe 608832716e coroutines: co_returns are statements, not expressions.
This corrects an error in the CO_RETURN_EXPR tree
class.

gcc/cp/ChangeLog:

	* cp-tree.def (CO_RETURN_EXPR): Correct the class
	to use tcc_statement.
2020-06-05 19:27:21 +01:00
Mark Wielaard 1c7bcefbc9 diagnostics: Consistently add fixit hint for implicit builtin declaration
There are two warnings that might trigger when a builtin function is
used but not declared yet. Both called through implicitly_declare in
c-decl. The first in implicit_decl_warning does warn for builtins,
but does not add a fixit hint for them (only for non-builtins when
a header is suggested through lookup_name_fuzzy). This warning is
guarded by -Wimplicit-function-declaration. The second warning, which
does include a fixit hint if possible, is given when the implicit
builtin declaration has an incompatible signature. This second warning
cannot be disabled.

This setup means that you only get a fixit-hint for usage of builtin
functions where the implicit signature is different than the actual
signature of the builtin. No fixit hints with header suggestions
are ever generated for builtins like abs, isdigit or putchar.

It seems more consistent to always generate a fixit-hint if possible
for the -Wimplicit-function-declaration warning. And for the second
warning to make it depend on -Wbuiltin-declaration-mismatch like
other warnings about builtin declaration mismatches.

Include a new test to show we get fixit-hints for abs, isdigit and
putchar now. Some small tweaks to existing tests to show the
effect of -Wno-builtin-declaration-mismatch with this change. And
a testcase to show that #pragma GCC diagnostic ignored now works.

gcc/c/ChangeLog:

	* c-decl.c (implicit_decl_warning): When warned and olddecl is
	an undeclared builtin, then add a fixit header hint, if found.
	(implicitly_declare): Add OPT_Wbuiltin_declaration_mismatch to
	warning_at about implicit builtin declaration type mismatch.

gcc/testsuite/ChangeLog:

	* gcc.dg/missing-header-fixit-3.c: Add
	-Wno-implicit-function-declaration.
	* gcc.dg/missing-header-fixit-4.c: Add new expected output.
	* gcc.dg/missing-header-fixit-5.c: New testcase.
	* gcc.dg/Wbuiltin-declaration-mismatch-ignore.c: Likewise.
2020-06-05 20:21:17 +02:00
Iain Buclaw 0cdc55f5ed d: Merge upstream dmd f5638c7b8.
Adds a CHECKENABLE enum, uses it for all contract parameters for
consistency in state checking.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd f5638c7b8.
	* d-builtins.cc (d_init_versions): Use new CHECKENABLE enum.
	* d-codegen.cc (array_bounds_check): Likewise.
	(build_frame_type): Likewise.
	(get_frameinfo): Likewise.
	* d-lang.cc (d_init_options): Likewise.
	(d_init_options_struct): Don't initialize x_flag_bounds_check.
	(d_handle_option): Use new CHECKENABLE enum.
	(d_post_options): Likewise.  Set flag_bounds_check here.
	* expr.cc (ExprVisitor::visit(AssertExp *)): Use new CHECKENABLE enum.
2020-06-05 20:13:50 +02:00
Jason Merrill 5094c4400a c++: Fix pretty-print of pointer minus integer.
For whatever reason, GCC internally represents a pointer minus an integer as
a pointer plus a very large unsigned integer.  But exposing that to users is
unsightly, and it's easy enough to show the real value.

gcc/cp/ChangeLog:

	* error.c (dump_binary_op): Handle negative operand to
	POINTER_PLUS_EXPR.

gcc/c-family/ChangeLog:

	* c-pretty-print.c (pp_c_additive_expression): Handle negative
	operand to POINTER_PLUS_EXPR.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/constexpr-ptrsub2.C: New test.
2020-06-05 13:54:54 -04:00
Tom Tromey 640e05e02b fortran/95509 - fix spellcheck-operator.f90 regression
My earlier patch to add case handling to the spell checker caused a
Fortran regression.  I believe I must have misread the test results.

This patch fixes the problem by changing the cutoff.  I chose this
value because the previous patch effectively multiplied the result of
get_edit_distance by 2 (unless a case change is involved).

gcc/fortran/ChangeLog:

	PR fortran/95509
	* misc.c (gfc_closest_fuzzy_match): Update cutoff value
	computation.
2020-06-05 11:44:24 -06:00
Thomas Schwinge 1afc467256 [OpenACC 'exit data'] Strip 'GOMP_MAP_STRUCT' mappings
These are not itself necessary for OpenACC 'exit data' directives, and are
skipped over (now) in libgomp.  We might as well not emit them to start with,
in line with the equivalent OpenMP directive.  We keep the no-op handling in
libgomp for the reason of backward compatibility.

	gcc/
	* gimplify.c (gimplify_adjust_omp_clauses): Remove
	'GOMP_MAP_STRUCT' mapping from OpenACC 'exit data' directives.
	gcc/testsuite/
	* c-c++-common/goacc/struct-enter-exit-data-1.c: New file.
	libgomp/
	* oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>: Explain
	special handling.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
2020-06-05 18:04:13 +02:00
Thomas Schwinge 1809628fcf [OpenACC 'exit data'] Simplify 'GOMP_MAP_STRUCT' handling
libgomp/
	* oacc-mem.c (goacc_exit_data_internal) <GOMP_MAP_STRUCT>:
	Simplify.

Co-Authored-By: Julian Brown <julian@codesourcery.com>
2020-06-05 18:04:12 +02:00
Julian Brown 9643f5bbe2 Add 'libgomp.oacc-c-c++-common/struct-copyout-{1,2}.c'
libgomp/
	* testsuite/libgomp.oacc-c-c++-common/struct-copyout-1.c: New test.
	* testsuite/libgomp.oacc-c-c++-common/struct-copyout-2.c: New test.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
2020-06-05 18:04:12 +02:00
Iain Buclaw 5905cbdbcf d: Merge upstream dmd 56f0a65c4.
Updates the Target interface, removing static from all members, so all
field accesses and member function calls go through a single global
'target'.  Information relating to extern ABI are now in TargetC,
TargetCPP, and TargetObjC for each supported language respectively.

Reviewed-on: https://github.com/dlang/dmd/pull/11228

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 56f0a65c4.
	* d-builtins.cc (build_frontend_type): Remove static.
	(d_build_builtins_module): Use target.va_listType() to get front-end
	type for va_list.
	(d_init_builtins): Move creation of va_list to Target::va_listType.
	* d-codegen.cc (build_interface_binfo): Use new target global.
	(build_vindex_ref): Likewise.
	(identity_compare_p): Likewise.
	* d-ctfloat.cc (CTFloat::parse): Likewise.
	* d-lang.cc (d_init): Likewise.
	* d-port.cc (Port::isFloat32LiteralOutOfRange): Likewise.
	(Port::isFloat64LiteralOutOfRange): Likewise.
	* d-target.cc (define_float_constants): Initialize constants through a
	reference, instead of setting globals.
	(Target::_init): Initialize new fields instead of setting globals.
	(Target::va_listType): Build front-end type from va_list_type_node.
	(Target::toCppMangle): Renamed to ...
	(TargetCPP::toMangle): ... this.
	(Target::cppTypeInfoMangle): Renamed to ...
	(TargetCPP::typeInfoMangle): ... this.
	(Target::cppTypeMangle): Renamed to ...
	(TargetCPP::typeMangle): this.
	(Target::cppParameterType): Renamed to ...
	(TargetCPP::parameterType): ... this.  Use target.va_listType() to get
	front-end type for va_list.
	(Target::cppFundamentalType): Renamed to ...
	(TargetCPP::fundamentalType): ... this.
	* d-tree.h (build_frontend_type): Declare.
	* decl.cc (base_vtable_offset): Use new target global.
	* typeinfo.cc (layout_classinfo_interfaces): Likewise.
	(layout_cpp_typeinfo): Likewise.
	* types.cc (valist_array_p): Use target.va_listType() to get front-end
	type for va_list.
	(layout_aggregate_type): Use new target global.
2020-06-05 17:52:57 +02:00
Martin Sebor 300452d7bf Adjust text of expected warnings to g:b825a22890740f341eae566af27e18e528cd29a7.
gcc/testsuite/ChangeLog:
	* c-c++-common/goacc/uninit-use-device-clause.c: Adjust.
	* c-c++-common/pr59223.c: Same.
	* g++.dg/warn/Wnonnull5.C: Same.
	* gcc.dg/pr59924.c: Same.
	* gcc.dg/ubsan/pr81981.c: Same.
	* gcc.dg/ubsan/pr89284.c: Same.
	* gfortran.dg/goacc/uninit-use-device-clause.f95: Same.
2020-06-05 09:36:29 -06:00
Arnaud Charlet 89b49a963c [Ada] Replace ? by ?? in Error_Msg_N
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_prag.adb (Validate_Compile_Time_Warning_Or_Error): Use ??.
2020-06-05 08:17:56 -04:00
Arnaud Charlet f67a6e93a1 [Ada] Update comments wrt Ada 83 handling
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* cstand.adb (Create_Standard): Update comments.
2020-06-05 08:17:56 -04:00
Arnaud Charlet 4ccf713e54 [Ada] Support 'Reduce under -gnatX
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* scng.adb (Scan): Fix typo to take into account all future
	versions of Ada.
	* sem_attr.ads (Attribute_Impl_Def): Add Attribute_Reduce for
	now.
	* sem_attr.adb (Analyze_Attribute): Only allow 'Reduce under
	-gnatX.
	* snames.ads-tmpl (Name_Reduce): Update comment.
2020-06-05 08:17:55 -04:00
Thomas Quinot 3af132b801 [Ada] Add note about gnatcov reliance on thunk names
2020-06-05  Thomas Quinot  <quinot@adacore.com>

gcc/ada/

	* exp_disp.adb (Expand_Interface_Thunk): Add comment about
	gnatcov reliance on specific name used for thunks.
2020-06-05 08:17:54 -04:00
Ed Schonberg faf2500800 [Ada] Subtype inherits Atomic flag from base type
2020-06-05  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch3.adb (Analyze_Subtype_Declaration): For scalar types,
	and for subtype declarations without a constraint, subtype
	inherits Atomic flag from base type.
2020-06-05 08:17:53 -04:00
Piotr Trojanek bf44027a46 [Ada] Fix punctuation in description of Enum_Rep attribute
2020-06-05  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* doc/gnat_rm/implementation_defined_attributes.rst (Enum_Rep):
	Remove extra colon.
	* gnat_rm.texi: Regenerate.
2020-06-05 08:17:52 -04:00
Eric Botcazou 32115be843 [Ada] Make the Has_Dynamic_Range_Check flag obsolete
2020-06-05  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* atree.adb (New_Copy): Clear Has_Dynamic_Range_Check on
	subexpression nodes.
	* checks.adb (Append_Range_Checks): Assert that the node
	doesn't have the Has_Dynamic_Range_Check flag set.
	(Insert_Range_Checks): Likewise.
	* exp_ch3.adb (Expand_N_Subtype_Indication): Do not apply
	range checks for a full type or object declaration.
	* sem_ch3.ads: Move with and use clauses for Nlists to...
	(Process_Range_Expr_In_Decl): Change default to No_List for
	the Check_List parameter.
	* sem_ch3.adb: ...here.
	(Process_Range_Expr_In_Decl): Likewise.  When the insertion
	node is a declaration, only insert on the list if is present
	when the declaration involves discriminants, and only insert
	on the node when there is no list otherwise.
2020-06-05 08:17:51 -04:00
Piotr Trojanek 0ad46f0448 [Ada] Do not create an empty list of nodes that confuses GNATprove
2020-06-05  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* sem_aggr.adb (Resolve_Record_Aggregate): Create the
	N_Aggregate node with its Expressions field set to No_List and
	not to an empty list.
2020-06-05 08:17:51 -04:00
Dmitriy Anisimkov f8ca4dd657 [Ada] Optimize Normalize_Pathname
2020-06-05  Dmitriy Anisimkov  <anisimko@adacore.com>

gcc/ada/

	* libgnat/s-os_lib.adb (Is_Dirsep): Moved from Build_Path to
	package level to reuse.
	(Normalize_Pathname.Final_Value): Reduce 2 'if' statements to
	one.
	(Normalize_Pathname.Fill_Directory): New procedure instead of
	function Get_Directory. Remove slash to backslash conversion and
	drive letter uppercasing on Windows.
2020-06-05 08:17:50 -04:00
Arnaud Charlet c8e89a6de5 [Ada] Spurious assert failure in Walk_Library_Items
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem.adb (Assert_Done): Relax check for main unit, as it was
	overzealous in the case of the main unit itself.
2020-06-05 08:17:49 -04:00
Piotr Trojanek 2db2527a8d [Ada] Use Is_Incomplete_Type instead of a low-level Ekind test
2020-06-05  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* exp_ch3.adb, sem_ch8.adb, sem_util.adb: Use Is_Incomplete_Type
	to make the code easier to read.
2020-06-05 08:17:48 -04:00
Piotr Trojanek 50554999f2 [Ada] Simplify iteration over components
2020-06-05  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* einfo.adb: Minor reformatting.
	* sem_util.adb (Has_Full_Default_Initialization,
	Is_Partially_Initialized_Type, Caller_Known_Size_Record,
	Large_Max_Size_Mutable): Iterate with
	First_Component/Next_Component; rename Ent to Comp.
2020-06-05 08:17:47 -04:00
Eric Botcazou c7d193178f [Ada] Fix incorrect initialization for array of non-standard enumeration type
2020-06-05  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Use
	Expr_Rep_Value instead of Expr_Value to obtain the equivalent
	integer value.
	* sem_eval.ads (Expr_Value): Document more supported cases.
	* sem_eval.adb (Expr_Rep_Value): Copy missing cases from
	Exp_Value.
2020-06-05 08:17:46 -04:00
Bob Duff a2754419d0 [Ada] Put_Image attribute: Rtsfind cleanups
2020-06-05  Bob Duff  <duff@adacore.com>

gcc/ada/

	* rtsfind.adb, rtsfind.ads: Move subtypes of RTU_Id into package
	body, because they are not needed by clients. Change "Child_" to
	"Descendant", because grandchildren and great grandchildren are
	involved.  Replace all the repetitive comments with a single
	concise one.  Change the parent subtypes to be more consistent;
	use the most specific parent.
2020-06-05 08:17:46 -04:00
Piotr Trojanek d1987ffdc2 [Ada] Move routine for detecting special Text_IO packages from GNATprove
2020-06-05  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* rtsfind.ads, rtsfind.adb (Is_Text_IO_Special_Package): Moved
	from the GNATprove backend to the frontend.
2020-06-05 08:17:45 -04:00
Yannick Moy ca124a6285 [Ada] Add comment about function only used in CodePeer
2020-06-05  Yannick Moy  <moy@adacore.com>

gcc/ada/

	* sem_util.ads: Add comment about function only used in
	CodePeer.
2020-06-05 08:17:44 -04:00
Ed Schonberg 2107ca0242 [Ada] Spurious error on address clause in task body
2020-06-05  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* sem_ch9.adb, (Analyze_Task_Body): After analying the task
	body, indicate that all local variables have no delayed aspects.
	This prevents improper later calls to
	Check_Aspect_At_End_Of_Declarations, that would happen when the
	constructed task_procedure body (generated during expansion) is
	analyzed. The legality of aspect specifications that may appear
	on local declarations has already been established, and it is in
	general not possible to recheck them properly during expansion,
	when visibility may not be fully established.
2020-06-05 08:17:43 -04:00
Piotr Trojanek a8aecf319a [Ada] Add missing Global contract to Ada.Containers.Functional_Vectors
2020-06-05  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

	* libgnat/a-cofuve.ads (First): Add Global contract.
2020-06-05 08:17:42 -04:00
Arnaud Charlet a9969d7feb [Ada] AI12-0207 Convention of anonymous access types
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_prag.adb (Set_Convention_From_Pragma): Set the convention
	of anonymous access array components.
2020-06-05 08:17:42 -04:00
Arnaud Charlet 632d4a43d7 [Ada] AI12-0336 Meaning of Time_Offset
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/a-calfor.ads, libgnat/a-catizo.ads,
	libgnat/a-catizo.adb (Local_Time_Offset, Local_Image): New.
	(UTC_Time_Offset): Now a renaming of Local_Time_Offset.
2020-06-05 08:17:41 -04:00
Eric Botcazou bec136971a [Ada] Fix assertion failure on double rederivation of private type
2020-06-05  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* sem_ch3.adb (Available_Full_View): New function returning
	either the full or the underlying full view.
	(Build_Full_Derivation): Add guard for the full view.
	(Copy_And_Build): Retrieve the underlying full view, if any,
	also if deriving a completion.
	(Build_Derived_Private_Type): Use Available_Full_View throughout
	to decide whether a full derivation must be done.
2020-06-05 08:17:40 -04:00
Bob Duff e0fd1b9c9d [Ada] Put_Image attribute
2020-06-05  Bob Duff  <duff@adacore.com>

gcc/ada/

	* exp_attr.adb, exp_ch11.adb, exp_imgv.adb, exp_tss.ads,
	par-ch4.adb, sem_attr.adb, sem_util.ads: Misc cleanup.
2020-06-05 08:17:39 -04:00
Arnaud Charlet c3c80e3c3a [Ada] AI12-0144 Make Discrete_Random more flexible
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/a-nudira.ads, libgnat/a-nudira.adb (Random): New
	function.
2020-06-05 08:17:38 -04:00
Arnaud Charlet 61fa3fd79f [Ada] AI12-0237 Getting the representation of an enumeration value
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* sem_attr.ads (Attribute_Impl_Def): Remove Enum_Rep/Val.
	* sem_attr.adb (Attribute_20): New, move Enum_Rep/Val here.
	(Analyze_Attribute): Take Attribute_20 into account.
2020-06-05 08:17:38 -04:00
Arnaud Charlet 79d09a491c [Ada] AI12-0318 No_IO should apply to Ada.Directories
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* restrict.ads (Unit_Array): Add a-direct.
2020-06-05 08:17:37 -04:00
Arnaud Charlet f191b2c864 [Ada] AI12-0235 System.Storage_Pools should be pure
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/s-stopoo.ads: Mark package Pure and leave room for
	Nonblocking once this aspect is supported.
2020-06-05 08:17:36 -04:00
Eric Botcazou efd0843da8 [Ada] Add No_Truncation flag on view conversion for GNAT-LLVM
2020-06-05  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* exp_attr.adb (Expand_N_Attribute_Reference) <Valid_Scalars>:
	Set the No_Truncation flag on the unchecked conversion built for
	scalar types.
2020-06-05 08:17:35 -04:00
Bob Duff 5620a9cd82 [Ada] Assertion_Policy (Ignore) ignores invariants
2020-06-05  Bob Duff  <duff@adacore.com>

gcc/ada/

	* einfo.adb, einfo.ads, exp_util.adb: Remove Invariants_Ignored
	flag.
	* sem_prag.adb (Invariant): Instead of setting a flag to be
	checked elsewhere, remove the pragma as soon as it is analyzed
	and checked for legality.
2020-06-05 08:17:35 -04:00
Eric Botcazou 6c8e70fe86 [Ada] Rename parameter of routines in Checks
2020-06-05  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* checks.ads (Apply_Length_Check): Rename Ck_Node parameter to
	Expr.
	(Apply_Range_Check): Likewise.
	(Get_Range_Checks): Likewise.
	* checks.adb (Apply_Float_Conversion_Check): Likewise.
	(Apply_Selected_Length_Checks): Likewise.
	(Apply_Selected_Range_Checks): Likewise.
	(Guard_Access): Likewise.
	(Selected_Length_Checks): Likewise.  Also avoid shadowing in
	child procedures.
	(Selected_Range_Checks): Likewise.
2020-06-05 08:17:34 -04:00
Arnaud Charlet a4c17870b8 [Ada] Minor wording changes wrt Ada 202x
2020-06-05  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* par-ch3.adb, par-ch4.adb, scng.adb, sem_aggr.adb,
	sem_ch10.adb, sem_ch12.adb, sem_prag.adb: Update wording: change
	Ada_2020 to Ada 2020 in comments and mention -gnat2020 instead
	of -gnatX switch.
2020-06-05 08:17:33 -04:00
Iain Buclaw d3da83f66f d: Merge upstream dmd 6d5bffa54
Removes an unused parameter from Condition::include(), all callers have
been updated in the front-end.

Reviewed-on: https://github.com/dlang/dmd/pull/11229

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 6d5bffa54.
	* d-builtins.cc (maybe_set_builtin_1): Update call to
	Condition::include().
	* decl.cc (DeclVisitor::visit(AttribDeclaration *)): Likewise.
	* types.cc (layout_aggregate_members): Likewise.
2020-06-05 12:29:47 +02:00
Richard Biener 9758d196f5 tree-optimization/95539 - fix SLP_TREE_REPRESENTATIVE vs. dr_info
This fixes a disconnect between the stmt_info used for dr_info
analysis and the one in SLP_TREE_REPRESENTATIVE with a temporary
workaround.

2020-06-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/95539
	* tree-vect-data-refs.c
	(vect_slp_analyze_and_verify_instance_alignment): Use
	SLP_TREE_REPRESENTATIVE for the data-ref check.
	* tree-vect-stmts.c (vectorizable_load): Reset stmt_info
	back to the first scalar stmt rather than the
	SLP_TREE_REPRESENTATIVE to match previous behavior.

	* gcc.dg/vect/pr95539.c: New testcase.
2020-06-05 11:45:43 +02:00
Fei Yang 9a182ef9ee expand: Simplify removing subregs when expanding a copy [PR95254]
In rtl expand, if we have a copy that matches one of the following patterns:
  (set (subreg:M1 (reg:M2 ...)) (subreg:M1 (reg:M2 ...)))
  (set (subreg:M1 (reg:M2 ...)) (mem:M1 ADDR))
  (set (mem:M1 ADDR) (subreg:M1 (reg:M2 ...)))
  (set (subreg:M1 (reg:M2 ...)) (constant C))
where mode M1 is equal in size to M2, try to detect whether the mode change
involves an implicit round trip through memory.  If so, see if we can avoid
that by removing the subregs and doing the move in mode M2 instead.

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

gcc/
	PR target/95254
	* expr.c (emit_move_insn): Check src and dest of the copy to see
	if one or both of them are subregs, try to remove the subregs when
	innermode and outermode are equal in size and the mode change involves
	an implicit round trip through memory.

gcc/testsuite/
	PR target/95254
	* gcc.target/aarch64/pr95254.c: New test.
	* gcc.target/i386/pr67609.c: Check "movq\t%xmm0" instead of "movdqa".
2020-06-05 10:34:59 +01:00