Commit Graph

186171 Commits

Author SHA1 Message Date
Patrick Palka
85a594f7dc libstdc++: Define split_view::_InnerIter::base as per P2210
libstdc++-v3/ChangeLog:

	* include/std/ranges (split_view::_InnerIter::base): Define as
	per P2210.
2021-06-20 12:38:35 -04:00
GCC Administrator
b245d1c3d6 Daily bump. 2021-06-20 00:16:21 +00:00
Patrick Palka
bc046a60cf libstdc++: Implement LWG 3555 changes to transform/elements_view
libstdc++-v3/ChangeLog:

	* include/std/ranges (transform_view::_Iterator::_S_iter_concept):
	Consider _Base instead of _Vp as per LWG 3555.
	(elements_view::_Iterator::_S_iter_concept): Likewise.
2021-06-18 20:50:23 -04:00
Patrick Palka
15736576df libstdc++: Implement LWG 3553 changes to split_view
libstdc++-v3/ChangeLog:

	* include/std/ranges (split_view::_OuterIter::value_type::begin):
	Remove the non-const overload, and remove the copyable constraint
	on the const overload as per LWG 3553.
2021-06-18 20:50:22 -04:00
Patrick Palka
4123650bd0 libstdc++: Implement LWG 3546 changes to common_iterator
libstdc++-v3/ChangeLog:

	* include/bits/stl_iterator.h
	(__detail::__common_iter_use_postfix_proxy): Add
	move_constructible constraint as per LWG 3546.
	(common_iterator::__postfix_proxy): Adjust initializer of
	_M_keep as per LWG 3546.
2021-06-18 20:50:13 -04:00
GCC Administrator
c5581d4842 Daily bump. 2021-06-19 00:16:33 +00:00
Patrick Palka
cc9c94d43d libstdc++: Reduce ranges::minmax/minmax_element comparison complexity
This rewrites ranges::minmax and ranges::minmax_element so that it
performs at most 3*N/2 many comparisons, as required by the standard.
In passing, this also fixes PR100387 by avoiding a premature std::move
in ranges::minmax and in std::shift_right.

	PR libstdc++/100387

libstdc++-v3/ChangeLog:

	* include/bits/ranges_algo.h (__minmax_fn::operator()): Rewrite
	to limit comparison complexity to 3*N/2.
	(__minmax_element_fn::operator()): Likewise.
	(shift_right): Avoid premature std::move of __result.
	* testsuite/25_algorithms/minmax/constrained.cc (test04, test05):
	New tests.
	* testsuite/25_algorithms/minmax_element/constrained.cc (test02):
	Likewise.
2021-06-18 19:33:39 -04:00
Aaron Sawdey
a798b3f15c Fix p10 fusion regtests
Update the count of matches for the fusion combine patterns after
the recent changes to them.  At Segher's request, used \m and \M
in the match patterns. Also I have grouped together all alternatives of
each fusion insn, which should hopefully make this test a little less
fragile.

gcc/testsuite/ChangeLog

	* gcc.target/powerpc/fusion-p10-2logical.c: Update pattern
	match counts.
	* gcc.target/powerpc/fusion-p10-addadd.c: Update pattern match
	counts.
	* gcc.target/powerpc/fusion-p10-ldcmpi.c: Update pattern match
	counts.
	* gcc.target/powerpc/fusion-p10-logadd.c: Update pattern match
	counts.
2021-06-18 17:14:39 -05:00
Jeff Law
629cbc682a [committed] More useless code elimination on the H8
gcc/
	* config/h8300/h8300.c (h8300_select_cc_mode): Handle SYMBOL_REF.
	* config/h8300/logical.md (<code><mode>3 logcial expander): Generate
	more efficient code when the source can be trivially simplified.
2021-06-18 18:05:08 -04:00
Andrew MacLeod
cb448ade74 Calculate a global definition if one has not been registered.
With poor values gone, Pick up range restrictions from statements
by folding them with global cache values.

	* gimple-range-cache.cc (ranger_cache::range_of_def):  Calculate
	a range if global is not available.
	(ranger_cache::entry_range): Fallback to range_of_def.
	* gimple-range-cache.h (range_of_def): Adjust prototype.
2021-06-18 17:43:28 -04:00
Andrew MacLeod
870b674f72 Remove poor value computations.
Remove the old "poor value" approach which made callbacks into ranger
from the cache.  Use only the best available value for all propagation.

	PR tree-optimization/101014
	* gimple-range-cache.cc (ranger_cache::ranger_cache): Remove poor
	value list.
	(ranger_cache::~ranger_cache): Ditto.
	(ranger_cache::enable_new_values): Delete.
	(ranger_cache::push_poor_value): Delete.
	(ranger_cache::range_of_def): Remove poor value processing.
	(ranger_cache::entry_range): Ditto.
	(ranger_cache::fill_block_cache): Ditto.
	* gimple-range-cache.h (class ranger_cache): Remove poor value members.
	* gimple-range.cc (gimple_ranger::range_of_expr): Remove call.
	* gimple-range.h (class gimple_ranger): Adjust.
2021-06-18 17:43:28 -04:00
Antoni Boucher
93022946df MAINTAINERS: Add myself for write after approval
ChangeLog:

2021-06-18  Antoni Boucher  <bouanto@zoho.com>

	* MAINTAINERS (Write After Approval): Add myself.
2021-06-18 16:52:55 -04:00
Harald Anlauf
6fc5433963 Fortran - fix conversion to result type for the min/max intrinsic
gcc/fortran/ChangeLog:

	PR fortran/100283
	PR fortran/101123
	* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Unconditionally
	convert result of min/max to result type.

gcc/testsuite/ChangeLog:

	PR fortran/100283
	PR fortran/101123
	* gfortran.dg/min0_max0_1.f90: New test.
	* gfortran.dg/min0_max0_2.f90: New test.
2021-06-18 19:34:15 +02:00
David Malcolm
3bb85b8687 analyzer: fix issue with symbolic reads with concrete bindings
gcc/analyzer/ChangeLog:
	* store.cc (binding_cluster::get_any_binding): Make symbolic reads
	from a cluster with concrete bindings return unknown.

gcc/testsuite/ChangeLog:
	* gcc.dg/analyzer/symbolic-7.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2021-06-18 13:24:19 -04:00
Patrick Palka
83faf7eacd libstdc++: Implement LWG 3557 change to convertible_to
libstdc++-v3/ChangeLog:

	* include/std/concepts (convertible_to): Just use declval as per
	LWG 3557.
2021-06-18 11:51:33 -04:00
David Malcolm
1aff29d426 analyzer: add region_model_manager::get_or_create_int_cst
gcc/analyzer/ChangeLog:
	* region-model-manager.cc
	(region_model_manager::get_or_create_int_cst): New.
	(region_model_manager::maybe_undo_optimize_bit_field_compare): Use
	it to simplify away a local tree.
	* region-model.cc (region_model::on_setjmp): Likewise.
	(region_model::on_longjmp): Likewise.
	* region-model.h (region_model_manager::get_or_create_int_cst):
	New decl.
	* store.cc (binding_cluster::zero_fill_region): Use it to simplify
	away a local tree.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2021-06-18 11:19:30 -04:00
David Malcolm
86606d2ab7 analyzer: refactor custom_event, introducing precanned_custom_event class
I have followup work where a custom event's description would be better
handled via a vfunc rather that a precanned string, hence this
refactoring to make it easy to add custom_event subclasses.

gcc/analyzer/ChangeLog:
	* checker-path.cc (class custom_event): Make abstract to allow for
	custom vfuncs, splitting existing implementation into...
	(class precanned_custom_event): New subclass.
	(custom_event::get_desc): Move to...
	(precanned_custom_event::get_desc): ...subclass.
	* checker-path.h (class custom_event): Make abstract to allow for
	custom vfuncs, splitting existing implementation into...
	(class precanned_custom_event): New subclass.
	* diagnostic-manager.cc (diagnostic_manager::add_events_for_eedge):
	Use precanned_custom_event.
	* engine.cc
	(stale_jmp_buf::maybe_add_custom_events_for_superedge): Likewise.
	* sm-signal.cc (signal_delivery_edge_info_t::add_events_to_path):
	Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2021-06-18 11:18:10 -04:00
Jonathan Wakely
0532452dcd libstdc++: Replace incorrect static assertion in std::reduce [PR95833]
The standard does not require the iterator's value type to be
convertible to the result type, it only requires that the result of
dereferencing the iterator can be passed to the binary function.

libstdc++-v3/ChangeLog:

	PR libstdc++/95833
	* include/std/numeric (reduce(Iter, Iter, T, BinaryOp)): Replace
	incorrect static_assert with ones matching the 'Mandates'
	conditions in the standard.
	* testsuite/26_numerics/reduce/95833.cc: New test.
2021-06-18 14:46:58 +01:00
Srinath Parvathaneni
f58d03b5df arm: Fix multilib mapping for CDE extensions [PR100856].
On passing +cdecp[0-7] extension to the -march string in command line options,
multilib linking is failing as mentioned in PR100856. This patch fixes this issue by
generating a separate canonical string by removing compiler options which are not
required for multilib linking from march string and assign the new string to mlibarch
option. This mlibarch string is used for multilib comparison.

gcc/ChangeLog:

2021-06-10  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	PR target/100856
	* common/config/arm/arm-common.c (arm_canon_arch_option_1): New function
	derived from arm_canon_arch.
	(arm_canon_arch_option): Call it.
	(arm_canon_arch_multilib_option): New function.
	* config/arm/arm-cpus.in (IGNORE_FOR_MULTILIB): New fgroup.
	* config/arm/arm.h (arm_canon_arch_multilib_option): New prototype.
	(CANON_ARCH_MULTILIB_SPEC_FUNCTION): New macro.
	(MULTILIB_ARCH_CANONICAL_SPECS): New macro.
	(DRIVER_SELF_SPECS): Add MULTILIB_ARCH_CANONICAL_SPECS.
	* config/arm/arm.opt (mlibarch): New option.
	* config/arm/t-rmprofile (MULTILIB_MATCHES): For armv8*-m, replace use
	of march on RHS with mlibarch.

gcc/testsuite/ChangeLog:

2021-06-10  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>

	PR target/100856
	* gcc.target/arm/acle/pr100856.c: New test.
	* gcc.target/arm/multilib.exp: Add tests for cde options.
2021-06-18 13:22:02 +01:00
Marcel Vollweiler
cfa1f8226f gcc/configure.ac: fix register issue for global_load assembler functions
gcc/ChangeLog:

	* config.in: Regenerate.
	* config/gcn/gcn.c (print_operand_address): Fix for global_load assembler
	functions.
	* configure: Regenerate.
	* configure.ac: Fix for global_load assembler functions.
2021-06-18 04:57:25 -07:00
Richard Biener
17a4bee01c tree-optimization/101112 - fix pattern stmt def lookup in SLP reassoc
This fixes the lookup of a pattern stmt def operand.

2021-06-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/101112
	* tree-vect-slp.c (vect_slp_linearize_chain): Fix condition
	to lookup a pattern stmt def.
2021-06-18 13:43:21 +02:00
Jonathan Wakely
92edc4a768 libstdc++: Suppress -Wstringop-overread warning in test
When compiled with -m32 -O2 -D_GLIBCXX_USE_CXX11_ABI=0 we get a warning
for 21_strings/basic_string/cons/char/1.cc:

bits/char_traits.h:409:56: warning: ‘void* __builtin_memcpy(void*, const void*, unsigned int)’ reading 1073741821 bytes from a region of size 19 [-Wstringop-overread]

The warning is legitimate, even if that line cannot be reached because
we throw std::length_error before getting there. Since the invalid
length is deliberate (and mentioned in a comment) just suppress the
warning, so that the test can verify we get the exception.

Also remove an unused typedef that produces another warning.

libstdc++-v3/ChangeLog:

	* testsuite/21_strings/basic_string/cons/char/1.cc: Use
	diagnostic pragma to suppress -Wstringop-overread error.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
2021-06-18 11:15:28 +01:00
Jakub Jelinek
76e990fd21 stor-layout: Don't create DECL_BIT_FIELD_REPRESENTATIVE for QUAL_UNION_TYPE [PR101062]
> The following patch does create them, but treats all such bitfields as if
> they were in a structure where the particular bitfield is the only field.

While the patch passed bootstrap/regtest on the trunk, when trying to
backport it to 11 branch the bootstrap failed with
atree.ads:3844:34: size for "Node_Record" too small
errors.  Turns out the error is not about size being too small, but actually
about size being non-constant, and comes from:
 /* In a FIELD_DECL of a RECORD_TYPE, this is a pointer to the storage
    representative FIELD_DECL.  */
 #define DECL_BIT_FIELD_REPRESENTATIVE(NODE) \
   (FIELD_DECL_CHECK (NODE)->field_decl.qualifier)

 /* For a FIELD_DECL in a QUAL_UNION_TYPE, records the expression, which
    if nonzero, indicates that the field occupies the type.  */
  #define DECL_QUALIFIER(NODE) (FIELD_DECL_CHECK (NODE)->field_decl.qualifier)
so by setting up DECL_BIT_FIELD_REPRESENTATIVE in QUAL_UNION_TYPE we
actually set or modify DECL_QUALIFIER and then construct size as COND_EXPRs
with those bit field representatives (e.g. with array type) as conditions
which doesn't fold into constant.

The following patch fixes it by not creating DECL_BIT_FIELD_REPRESENTATIVEs
for QUAL_UNION_TYPE as there is nowhere to store them,

Shall we change tree.h to document that DECL_BIT_FIELD_REPRESENTATIVE
is valid also on UNION_TYPE?
I see:
tree-ssa-alias.c-  if (TREE_CODE (type1) == RECORD_TYPE
tree-ssa-alias.c:      && DECL_BIT_FIELD_REPRESENTATIVE (field1))
tree-ssa-alias.c:    field1 = DECL_BIT_FIELD_REPRESENTATIVE (field1);
tree-ssa-alias.c-  if (TREE_CODE (type2) == RECORD_TYPE
tree-ssa-alias.c:      && DECL_BIT_FIELD_REPRESENTATIVE (field2))
tree-ssa-alias.c:    field2 = DECL_BIT_FIELD_REPRESENTATIVE (field2);
Shall we change that to || == UNION_TYPE or do we assume all fields
are overlapping in a UNION_TYPE already?
At other spots (asan, ubsan, expr.c) it is unclear what will happen
if they see a QUAL_UNION_TYPE with a DECL_QUALIFIER (or does the Ada FE
lower that somehow)?

2021-06-18  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/101062
	* stor-layout.c (finish_bitfield_layout): Don't add bitfield
	representatives in QUAL_UNION_TYPE.
2021-06-18 11:20:40 +02:00
Gary Dismukes
ba71587184 [Ada] Additional error checking on index constraints with fixed-lower-bound ranges
gcc/ada/

	* sem_ch3.adb (Constrain_Array): Add error checking for
	fixed-lower-bound and constrained index ranges applied
	inappropriately on subtypes of unconstrained and
	fixed-lower-bound array types.
	(Constrain_Index): Correct and refine comment related to
	fixed-lower-bound index ranges.
2021-06-18 04:36:54 -04:00
Bob Duff
161e220201 [Ada] Minor comment cleanups
gcc/ada/

	* gen_il-gen.adb: Improve comments.
	* snames.ads-tmpl (Convention_Id): Remove "--  Plenty of space
	for expansion", because that's irrelevant now that we are no
	longer laying out node fields by hand.
2021-06-18 04:36:54 -04:00
Piotr Trojanek
b3fa853aba [Ada] Fix detection of overlapping slices indexed by characters
gcc/ada/

	* sem_util.adb (Denotes_Same_Object): Handle character literals
	just like integer literals.
2021-06-18 04:36:54 -04:00
Piotr Trojanek
cbe87f4582 [Ada] Fix detection of overlapping actuals with renamings
gcc/ada/

	* sem_util.adb (Denotes_Same_Object): Explicitly test for node
	kinds being the same; deal with renamings one-by-one; adjust
	numbers in references to the Ada RM.
2021-06-18 04:36:54 -04:00
Bob Duff
ca5cdc9053 [Ada] Make "gcc -gnatDGL" handle unterminated last lines properly
gcc/ada/

	* sprint.adb (Write_Source_Line): Check for EOF in
	Line_Terminator loop.  Note that when a source file is read in,
	an EOF character is added to the end.
2021-06-18 04:36:53 -04:00
Piotr Trojanek
f86c2f9c8e [Ada] Reuse Package_Specification in Is_Incomplete_Or_Private_Type
gcc/ada/

	* sem_aux.adb (Package_Specification): Add assertions to confirm
	the kind of the of parameter and returned node.
	* sem_ch12.adb (Remove_Parent): Reorder conditions; this change
	appears to be semantically neutral, but is enough to avoid the
	problematic call to Package_Specification.
	* sem_util.adb (Is_Incomplete_Or_Private_Type): Replace loop
	with a call to Package_Specification.
2021-06-18 04:36:53 -04:00
Bob Duff
a34ce7c5df [Ada] Avoid passing Enum_Lit'Size to the back end
gcc/ada/

	* sem_attr.adb (Eval_Attribute): For Enum_Lit'Size, use
	Enum_Type'Object_Size.
2021-06-18 04:36:53 -04:00
Olivier Hainque
548280b996 [Ada] Fix inaccuracies in signal handler trampoline for aarch64-vxworks
gcc/ada/

	* sigtramp-vxworks-target.inc (__aarch64__): Sync
	REGNO_PC_OFFSET with the back-end DWARF_ALT_FRAME_RETURN_COLUMN.
	In CFI_COMMON_REGS, leave r18 alone, VxWorks private.
2021-06-18 04:36:52 -04:00
Javier Miranda
c37c13e15e [Ada] Ada2020: AI12-0195 overriding class-wide pre/post conditions
gcc/ada/

	* contracts.adb (Process_Spec_Postconditions): Add missing
	support for aliased subprograms and handle wrappers of
	class-wide pre/post conditions.
	(Process_Inherited_Preconditions): Add missing support for
	aliased subprograms and handle wrappers of class-wide pre/post
	conditions.
	* einfo.ads (Class_Wide_Clone): Fix typo.
	(Is_Class_Wide_Clone): Removed since it is not referenced.
	(Is_Wrapper): Documenting new flag.
	(LSP_Subprogram): Documenting new attribute.
	* exp_ch3.adb (Make_Controlling_Function_Wrappers): Decorate
	wrapper as Is_Wrapper and adjust call to
	Override_Dispatching_Operation.
	* freeze.adb (Build_Inherited_Condition_Pragmas): Fix typo in
	documentation.
	(Check_Inherited_Conditions): Handle LSP wrappers; ensure
	correct decoration of LSP wrappers.
	* gen_il-fields.ads (Is_Class_Wide_Clone): Removed.
	(Is_Wrapper): Added.
	(LSP_Subprogram): Added.
	* gen_il-gen-gen_entities.adb (Is_Class_Wide_Clone): Removed.
	(Is_Wrapper): Added.
	(LSP_Subprogram): Added.
	* gen_il-internals.adb (Image): Adding uppercase image of
	LSP_Subprogram.
	* sem_ch6.adb (New_Overloaded_Entity): Fix decoration of LSP
	wrappers.
	* sem_disp.ads (Override_Dispatching_Operation): Remove
	parameter Is_Wrapper; no longer needed.
	* sem_disp.adb (Check_Dispatching_Operation): Adjust assertion.
	(Override_Dispatching_Operation): Remove parameter Is_Wrapper;
	no longer needed.
	* treepr.adb (Image): Adding uppercase image of LSP_Subprogram.
2021-06-18 04:36:52 -04:00
Arnaud Charlet
4edcee5b2b [Ada] Premature freezing of types
gcc/ada/

	* exp_ch4.adb (Expand_N_Quantified_Expression): Ensure the type
	of the name of a "for of" loop is frozen.
	* exp_disp.adb (Check_Premature_Freezing): Complete condition to
	take into account a private type completed by another private
	type now that the freezing rule are better implemented.
	* freeze.adb (Freeze_Entity.Freeze_Profile): Do not perform an
	early freeze on types if not in the proper scope. Special case
	expression functions that requires access to the dispatch table.
	(Should_Freeze_Type): New.
	* sem_ch13.adb (Resolve_Aspect_Expressions): Prevent assert
	failure in case of an invalid tree (previous errors detected).
	* sem_res.adb (Resolve): Remove kludge related to entities
	causing incorrect premature freezing.
	* sem_util.adb (Ensure_Minimum_Decoration): Add protection
	against non base types.
2021-06-18 04:36:52 -04:00
Gary Dismukes
33a3b5f3a5 [Ada] Missing check for assigning too-large array to fixed-lower-bound object
gcc/ada/

	* sem_ch3.adb (Constrain_Index): Set the High_Bound of a
	fixed-lower-bound subtype's range to T (the subtype of the FLB
	index being constrained) rather than Base_Type (T).
2021-06-18 04:36:51 -04:00
Bob Duff
9324e07dbd [Ada] Remove AAMP from compiler sources
gcc/ada/

	* ada_get_targ.adb, aspects.ads, checks.adb, cstand.adb,
	einfo.ads, exp_attr.adb, freeze.adb, get_targ.adb,
	libgnat/a-textio.ads, libgnat/g-memdum.ads,
	libgnat/s-scaval__128.adb, libgnat/s-scaval.adb, make.adb,
	osint.ads, par-prag.adb, sem_ch13.adb, sem_prag.adb,
	sem_prag.ads, set_targ.adb, set_targ.ads, snames.ads-tmpl,
	targparm.ads, types.ads: Remove AAMP-specific code.
	* switch.ads: Minor reformatting.
	* gen_il-fields.ads, gen_il-gen.adb,
	gen_il-gen-gen_entities.adb, gen_il-types.ads, einfo-utils.adb,
	einfo-utils.ads: Package Types now contains "type Float_Rep_Kind
	is (IEEE_Binary);", which used to also have an enumeral AAMP.
	Gen_IL can't handle fields of this type, which would be zero
	sized. Therefore, we move the Float_Rep field into Einfo.Utils
	as a synthesized attribute. (We do not delete the field
	altogether, in case we want new floating-point representations
	in the future.)
	* doc/gnat_rm/implementation_defined_pragmas.rst,
	doc/gnat_rm/implementation_defined_aspects.rst,
	doc/gnat_ugn/building_executable_programs_with_gnat.rst,
	doc/gnat_ugn/the_gnat_compilation_model.rst: Remove
	AAMP-specific documentation.
	* gnat_rm.texi, gnat_ugn.texi: Regenerate.
2021-06-18 04:36:51 -04:00
Gary Dismukes
f44441d80f [Ada] Error issued on string literal assigned to fixed-lower-bound array
gcc/ada/

	* exp_util.adb (Expand_Sliding_Conversion): Move test of
	Is_Fixed_Lower_Bound_Subtype to an assertion. Exclude string
	literals from sliding expansion.
2021-06-18 04:36:51 -04:00
Piotr Trojanek
1be46d12a7 [Ada] Warn about overlapping actuals in all versions of Ada
gcc/ada/

	* sem_warn.adb (Warn_On_Overlapping_Actuals): Cleanup conditions
	related to Ada_Version.
2021-06-18 04:36:50 -04:00
Piotr Trojanek
d94a2f5f1f [Ada] Reuse First_Actual in Address_Value
gcc/ada/

	* sem_util.adb (Address_Value): Simplify.
2021-06-18 04:36:50 -04:00
Bob Duff
537f0ce307 [Ada] Correct A'First (N) where N is an object name
gcc/ada/

	* sem_attr.adb (Check_Array_Or_Scalar_Type): Use Expr_Value
	instead of Intval, because the latter only exists in literals.
	Remove Set_Etype on E1; setting the type is done elsewhere.
2021-06-18 04:36:50 -04:00
Piotr Trojanek
7120f08218 [Ada] Fix asymmetries in detection of overlapping actuals
gcc/ada/

	* sem_warn.adb (Warn_On_Overlapping_Actuals): Examine types of
	both formal parameters; refactor a complex detection of
	by-reference types.
2021-06-18 04:36:49 -04:00
Arnaud Charlet
cd344e9570 [Ada] Fix handling of gnat check/test commands
gcc/ada/

	* gnatcmd.adb: Fix handling of check and test commands.
2021-06-18 04:36:49 -04:00
Gary Dismukes
94c6d6fd75 [Ada] Add documentation for the array fixed-lower-bound feature
gcc/ada/

	* doc/gnat_rm/implementation_defined_pragmas.rst: Add
	documentation for the array fixed-lower-bound feature.
	* gnat_rm.texi: Regenerate.
2021-06-18 04:36:49 -04:00
Bob Duff
73b670e3b1 [Ada] New debug switch to disable large static aggregates
gcc/ada/

	* debug.adb: Document switch.
	* exp_aggr.adb: If -gnatd_g was given, then do not bump the
	limit to 500_000.
2021-06-18 04:36:49 -04:00
Bob Duff
57841a4311 [Ada] Warn on 'in out' param containing access in private type
gcc/ada/

	* sem_util.ads, sem_util.adb (Has_Access_Values): Remove
	Include_Internal parameter that was added in previous change.
	* sem_warn.adb (Warnings_Off_E1): Back out E_Out_Parameter ==>
	Formal_Kind change made previously. Check Is_Private_Type to
	avoid warnings on private types. Misc cleanup.
	* sem_attr.adb (Attribute_Has_Access_Values): Remove
	Include_Internal parameter.
2021-06-18 04:36:48 -04:00
Piotr Trojanek
9c2886684f [Ada] Remove dead code for overlapping actuals in prefix notation
gcc/ada/

	* sem_warn.adb (Warn_On_Overlapping_Actuals): Remove dead branch
	for overlapping actuals in prefix notation.
2021-06-18 04:36:48 -04:00
Eric Botcazou
2a8dbd6b24 [Ada] Do not clear Is_True_Constant flag on imported constants
gcc/ada/

	* sem_prag.adb (Process_Import_Or_Interface): Do not
	artificially record a possible modification for a constant.
2021-06-18 04:36:48 -04:00
Arnaud Charlet
a30647690d [Ada] Code cleanups in exp_ch6.adb
gcc/ada/

	* exp_ch6.adb (Expand_Call_Helper): Code cleanups.
2021-06-18 04:36:47 -04:00
Arnaud Charlet
4463d6eebc [Ada] Update comments related to TBD
gcc/ada/

	* exp_aggr.adb, exp_dist.adb, exp_unst.adb, sa_messages.ads,
	sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_eval.adb,
	sem_util.adb, sem_util.ads, sinfo.ads: Update comments.
2021-06-18 04:36:47 -04:00
Ghjuvan Lacambre
26373979de [Ada] Implement basic support for -fdiagnostics-format=json
gcc/ada/

	* back_end.adb (Scan_Back_End_Switches): Set Opt.JSON_Output to
	True if -fdiagnostics-format=json option is found.
	* back_end.ads (Scan_Compiler_Arguments): Mention
	Opt.JSON_Output.
	* errout.adb (Output_JSON_Message): New procedure.
	(Output_Messages): If Opt.JSON_Output is True, print messages
	with new Output_JSON_Message procedure.
	* opt.ads: Declare JSON_Output variable.
	* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
	Mention new -fdiagnostics-format option.
	* gnat_ugn.texi: Regenerate.
2021-06-18 04:36:47 -04:00
Arnaud Charlet
0becb0faae [Ada] Relax null exclusion mismatch check in Relaxed_RM_Semantics mode
gcc/ada/

	* sem_ch6.adb (Null_Exclusions_Match): Relax null exclusion
	mismatch check when Relaxed_RM_Semantics is set.
2021-06-18 04:36:46 -04:00