aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2020-10-27[RS6000] dimode_off.c testAlan Modra1-1/+1
This tests behaviour near the limit of 16-bit signed offsets. If power10 prefix instructions are enabled, no such testing occurs. * gcc.target/powerpc/dimode_off.c: Add -mno-prefixed to options.
2020-10-27[RS6000] Non-pcrel tests when power10Alan Modra5-6/+6
These tests require -mno-pcrel because they are testing features of the non-pcrel ABI. * gcc.target/powerpc/cprophard.c: Add -mno-pcrel to options. * gcc.target/powerpc/float128-hw3.c: Likewise. * gcc.target/powerpc/pr79439-1.c: Likewise. * gcc.target/powerpc/pr79439-2.c: Likewise. * gcc.target/powerpc/r2_shrink-wrap.c: Likewise.
2020-10-26syscall: import additional BSD-specific syscall wrappersNikhil Benesch1-1/+1
Import additional code from upstream for handing system calls on BSD systems. This makes the syscall package on NetBSD complete enough to compile the standard library. Updates golang/go#38538. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/265123
2020-10-26Combine logical OR ranges properly.Andrew MacLeod2-2/+36
When combining logical OR operands with a FALSE result, union the false ranges for operand1 and operand2... not intersection. gcc/ PR tree-optimization/97567 * gimple-range-gori.cc (gori_compute::logical_combine): Union the ranges of operand1 and operand2, not intersect. gcc/testsuite/ * gcc.dg/pr97567.c: New.
2020-10-26Extend builtin fnspecsJan Hubicka6-463/+452
* attr-fnspec.h: Update toplevel comment. (attr_fnspec::attr_fnspec): New constructor. (attr_fnspec::arg_read_p, attr_fnspec::arg_written_p, attr_fnspec::arg_access_size_given_by_arg_p, attr_fnspec::arg_single_access_p attr_fnspec::loads_known_p attr_fnspec::stores_known_p, attr_fnspec::clobbers_errno_p): New member functions. (gimple_call_fnspec): Declare. (builtin_fnspec): Declare. * builtins.c: Include attr-fnspec.h (builtin_fnspec): New function. * builtins.def (BUILT_IN_MEMCPY): Do not specify RET1 fnspec. (BUILT_IN_MEMMOVE): Do not specify RET1 fnspec. (BUILT_IN_MEMSET): Do not specify RET1 fnspec. (BUILT_IN_STRCAT): Do not specify RET1 fnspec. (BUILT_IN_STRCPY): Do not specify RET1 fnspec. (BUILT_IN_STRNCAT): Do not specify RET1 fnspec. (BUILT_IN_STRNCPY): Do not specify RET1 fnspec. (BUILT_IN_MEMCPY_CHK): Do not specify RET1 fnspec. (BUILT_IN_MEMMOVE_CHK): Do not specify RET1 fnspec. (BUILT_IN_MEMSET_CHK): Do not specify RET1 fnspec. (BUILT_IN_STRCAT_CHK): Do not specify RET1 fnspec. (BUILT_IN_STRCPY_CHK): Do not specify RET1 fnspec. (BUILT_IN_STRNCAT_CHK): Do not specify RET1 fnspec. (BUILT_IN_STRNCPY_CHK): Do not specify RET1 fnspec. * gimple.c (gimple_call_fnspec): Return attr_fnspec. (gimple_call_arg_flags): Update. (gimple_call_return_flags): Update. * tree-ssa-alias.c (check_fnspec): New function. (ref_maybe_used_by_call_p_1): Use fnspec for builtin handling. (call_may_clobber_ref_p_1): Likewise. (attr_fnspec::verify): Update verifier. * calls.c (decl_fnspec): New function. (decl_return_flags): Use it.
2020-10-26Handle signed 1-bit ranges in irange::invert.Aldy Hernandez3-8/+54
The problem here is we are trying to add 1 to a -1 in a signed 1-bit field and coming up with UNDEFINED because of the overflow. Signed 1-bits are annoying because you can't really add or subtract one, because the one is unrepresentable. For invert() we have a special subtract_one() function that handles 1-bit signed fields. This patch implements the analogous add_one() function so that invert works. gcc/ChangeLog: PR tree-optimization/97555 * range-op.cc (range_tests): Test 1-bit signed invert. * value-range.cc (subtract_one): Adjust comment. (add_one): New. (irange::invert): Call add_one. gcc/testsuite/ChangeLog: * gcc.dg/pr97555.c: New test.
2020-10-26Implement three-level optimize_for_size predicatesJan Hubicka4-25/+76
this patch implements thre two-state optimize_for_size predicates, so with -Os and with profile feedback for never executed code it returns OPTIMIZE_SIZE_MAX while in cases we decide to optimize for size based on branch prediction logic it return OPTIMIZE_SIZE_BALLANCED. The idea is that for places where we guess that code is unlikely we do not want to do extreme optimizations for size that leads to many fold slowdowns (using idiv rather than few shigts or using rep based inlined stringops). I will update RTL handling code to also support this with BB granuality (which we don't currently). LLVM has -Os and -Oz levels where -Oz is our -Os and LLVM's -Os would ocrrespond to OPTIMIZE_SIZE_BALLANCED. I wonder if we want to export this to command line somehow? For me it would be definitly useful to test things, I am not sure how "weaker" -Os is desired in practice. gcc/ChangeLog: * cgraph.h (cgraph_node::optimize_for_size_p): Return optimize_size_level. (cgraph_node::optimize_for_size_p): Update. * coretypes.h (enum optimize_size_level): New enum. * predict.c (unlikely_executed_edge_p): Microoptimize. (optimize_function_for_size_p): Return optimize_size_level. (optimize_bb_for_size_p): Likewise. (optimize_edge_for_size_p): Likewise. (optimize_insn_for_size_p): Likewise. (optimize_loop_nest_for_size_p): Likewise. * predict.h (optimize_function_for_size_p): Update declaration. (optimize_bb_for_size_p): Update declaration. (optimize_edge_for_size_p): Update declaration. (optimize_insn_for_size_p): Update declaration. (optimize_loop_for_size_p): Update declaration. (optimize_loop_nest_for_size_p): Update declaration.
2020-10-26Refactor SLP instance analysisRichard Biener1-108/+152
This refactors the toplevel entry to analyze an SLP instance to expose a worker analyzing from a vector of stmts and an SLP entry kind. 2020-10-26 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (enum slp_instance_kind): New. (vect_build_slp_instance): Split out from... (vect_analyze_slp_instance): ... this.
2020-10-26Re: error: ‘EVRP_MODE_DEBUG’ was not declared – was: [PUSHED] Ranger ↵Andrew MacLeod1-1/+1
classes. Initialize zerov to match vr-values.c. * gimple-range.cc (range_of_builtin_call): Initialize zerov to 0.
2020-10-26c++: Implement __is_nothrow_constructible and __is_nothrow_assignableVille Voutilainen12-4/+144
gcc/c-family/ChangeLog: * c-common.c (__is_nothrow_assignable): New. (__is_nothrow_constructible): Likewise. * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New. (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise. gcc/cp/ChangeLog: * cp-tree.h (CPTK_IS_NOTHROW_ASSIGNABLE): New. (CPTK_IS_NOTHROW_CONSTRUCTIBLE): Likewise. (is_nothrow_xible): Likewise. * method.c (is_nothrow_xible): New. (is_trivially_xible): Tweak. * parser.c (cp_parser_primary_expression): Handle the new RID_*. (cp_parser_trait_expr): Likewise. * semantics.c (trait_expr_value): Handle the new RID_*. (finish_trait_expr): Likewise. libstdc++-v3/ChangeLog: * include/std/type_traits (__is_nt_constructible_impl): Remove. (__is_nothrow_constructible_impl): Adjust. (is_nothrow_default_constructible): Likewise. (__is_nt_assignable_impl): Remove. (__is_nothrow_assignable_impl): Adjust.
2020-10-26Fix simdclonesJan Hubicka6-6/+29
gcc/ChangeLog: PR ipa/97576 * cgraphclones.c (cgraph_node::materialize_clone): Clear stmt references. * cgraphunit.c (mark_functions_to_output): Do not clear them here. * ipa-inline-transform.c (inline_transform): Clear stmt references. * symtab.c (symtab_node::clear_stmts_in_references): Make recursive for clones. * tree-ssa-structalias.c (ipa_pta_execute): Do not clear references. gcc/testsuite/ChangeLog: PR ipa/97576 * gcc.c-torture/compile/pr97576.c: New test.
2020-10-26AArch64: Add FLAG for store intrinsics [PR94442]zhengnannan2-11/+12
2020-10-26 Zhiheng Xie <xiezhiheng@huawei.com> Nannan Zheng <zhengnannan@huawei.com> gcc/ChangeLog: * config/aarch64/aarch64-builtins.c: Add FLAG STORE. * config/aarch64/aarch64-simd-builtins.def: Add proper FLAG for store intrinsics.
2020-10-26PR tree-optimization/97546 Bail out of find_bswap_or_nop on non-INTEGER_CST ↵Kyrylo Tkachov2-1/+27
sizes This patch fixes the ICE in the PR by bailing out of find_bswap_or_nop on poly_int sizes. I don't think it intends to handle them and from my reading of the code it's the most appropriate place to reject them here rather than in the callers. Bootstrapped and tested on aarch64-none-linux-gnu. gcc/ PR tree-optimization/97546 * gimple-ssa-store-merging.c (find_bswap_or_nop): Return NULL if type is not INTEGER_CST. gcc/testsuite/ PR tree-optimization/97546 * gcc.target/aarch64/sve/acle/general/pr97546.c: New test.
2020-10-26middle-end/97521 - always use single-bit bools in mask vector typesRichard Biener3-37/+40
This makes us always use a single-bit boolean type component type for integer mode mask VECTOR_BOOLEAN_TYPE_P to match the RTL and target representation. This aovids the need for magic translation and the inconsistencies from the translation requirement now that we expose temporaries of those types on the GIMPLE level. 2020-10-23 Richard Biener <rguenther@suse.de> PR middle-end/97521 * expr.c (const_scalar_mask_from_tree): Remove. (expand_expr_real_1): Always VIEW_CONVERT integer mode vector constants to an integer type. * tree.c (build_truth_vector_type_for_mode): Use a single-bit boolean component type for non-vector-mode mask_mode. * gcc.target/i386/pr97521.c: New testcase.
2020-10-26x86: Inline strncmp only with -minline-all-stringopsH.J. Lu3-12/+25
Expand strncmp to "repz cmpsb" only with -minline-all-stringops since "repz cmpsb" can be much slower than strncmp function implemented with vector instructions, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 gcc/ PR target/95458 * config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem): Return false for -mno-inline-all-stringops. gcc/testsuite/ PR target/95458 * gcc.target/i386/pr95458-1.c: New test. * gcc.target/i386/pr95458-2.c: Likewise.
2020-10-26x86: Add cmpmemsi for -minline-all-stringopsH.J. Lu7-63/+162
We used to expand memcmp to "repz cmpsb" via cmpstrnsi.  It was changed by commit 9b0f6f5e511ca512e4faeabc81d2fd3abad9b02f Author: Nick Clifton <nickc@redhat.com> Date: Fri Aug 12 16:26:11 2011 +0000 builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern. * builtins.c (expand_builtin_memcmp): Do not use cmpstrnsi pattern. * doc/md.texi (cmpstrn): Note that the comparison stops if both fetched bytes are zero. (cmpstr): Likewise. (cmpmem): Note that the comparison does not stop if both of the fetched bytes are zero. Duplicate the cmpstrn pattern for cmpmem. The only difference is that the length argument of cmpmem is guaranteed to be less than or equal to lengths of 2 memory areas. Since "repz cmpsb" can be much slower than memcmp function implemented with vector instruction, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 expand cmpmem to "repz cmpsb" only for -minline-all-stringops. gcc/ PR target/95151 * config/i386/i386-expand.c (ix86_expand_cmpstrn_or_cmpmem): New function. * config/i386/i386-protos.h (ix86_expand_cmpstrn_or_cmpmem): New prototype. * config/i386/i386.md (cmpmemsi): New pattern. gcc/testsuite/ PR target/95151 * gcc.target/i386/pr95151-1.c: New test. * gcc.target/i386/pr95151-2.c: Likewise. * gcc.target/i386/pr95151-3.c: Likewise. * gcc.target/i386/pr95151-4.c: Likewise.
2020-10-26IBM Z: Add vcond_mask expanderAndreas Krebbel1-0/+11
After adding vec_cmp expanders we have seen various performance related regression in the testsuite. These appear to be caused by a missing vcond_mask definition in the backend. Fixed with this patch. The patch fixes the following testsuite fails: FAIL: gcc.dg/vect/vect-21.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-21.c scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-23.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-23.c scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-24.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-24.c scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-live-6.c -flto -ffat-lto-objects scan-tree-dump vect "vectorized 1 loops" FAIL: gcc.dg/vect/vect-live-6.c scan-tree-dump vect "vectorized 1 loops" FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrab\\t%v.?,%v.?,7 6 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesraf\\t%v.?,%v.?,31 6 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrah\\t%v.?,%v.?,15 6 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlb\\t%v.?,%v.?,7 4 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlf\\t%v.?,%v.?,31 4 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlh\\t%v.?,%v.?,15 4 FAIL: gcc.dg/vect/vect-21.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-21.c scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-23.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-23.c scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-24.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-24.c scan-tree-dump-times vect "vectorized 3 loops" 1 FAIL: gcc.dg/vect/vect-live-6.c -flto -ffat-lto-objects scan-tree-dump vect "vectorized 1 loops" FAIL: gcc.dg/vect/vect-live-6.c scan-tree-dump vect "vectorized 1 loops" FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrab\\t%v.?,%v.?,7 6 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesraf\\t%v.?,%v.?,31 6 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrah\\t%v.?,%v.?,15 6 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlb\\t%v.?,%v.?,7 4 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlf\\t%v.?,%v.?,31 4 FAIL: gcc.target/s390/vector/vcond-shift.c scan-assembler-times vesrlh\\t%v.?,%v.?,15 4 gcc/ChangeLog: * config/s390/vector.md ("vcond_mask_<mode><mode>"): New expander.
2020-10-26middle-end/97554 - avoid overflow in alloc size computeRichard Biener1-1/+2
This avoids overflow in the allocation size computations in sbitmap_vector_alloc when the result exceeds 2GB. 2020-10-26 Richard Biener <rguenther@suse.de> * sbitmap.c (sbitmap_vector_alloc): Use size_t for byte quantities to avoid overflow.
2020-10-26tree-optimization/97539 - reset out-of-loop debug uses before peelingRichard Biener2-1/+57
This makes sure to reset out-of-loop debug uses before vectorizer loop peeling as we cannot make sure to retain the use-def dominance relationship when there are no LC SSA nodes. 2020-10-26 Richard Biener <rguenther@suse.de> PR tree-optimization/97539 * tree-vect-loop-manip.c (vect_do_peeling): Reset out-of-loop debug uses before peeling. * gcc.dg/pr97539.c: New testcase.
2020-10-26Make default duplicate and insert methods of summaries abort; fix falloutJan Hubicka10-110/+210
the default duplicate and insert methods of sumaries produce empty summary that is not useful for anything and makes it easy to introduce bugs. This patch makes the default hooks to abort and summaries that do not need dupicaito/insertion disable the corresponding hooks. I also implemented missing insertion hook for ipa-sra which forced me to move analysis out of anonymous namespace. 2020-10-23 Jan Hubicka <hubicka@ucw.cz> * cgraph.h (struct cgraph_node): Make ipa_transforms_to_apply vl_ptr. * ipa-inline-analysis.c (initialize_growth_caches): Disable insertion and duplication hooks. * ipa-inline-transform.c (clone_inlined_nodes): Clear ipa_transforms_to_apply. (save_inline_function_body): Disable insertion hoook for ipa_saved_clone_sources. * ipa-prop.c (ipcp_transformation_initialize): Disable insertion hook. * ipa-prop.h (ipa_node_params_t): Disable insertion hook. * ipa-reference.c (propagate): Disable insertion hoook. * ipa-sra.c (ipa_sra_summarize_function): Move out of anonymous namespace. (ipa_sra_function_summaries::insert): New virtual function. * passes.c (execute_one_pass): Do not add transforms to inline clones. * symbol-summary.h (function_summary_base): Make insert and duplicate hooks fail instead of silently producing empty summaries; add way to disable duplication hooks (call_summary_base): Likewise. * tree-nested.c (nested_function_info::get_create): Disable insertion hooks (maybe_record_nested_function): Likewise.
2020-10-26[Ada] Handle Iterated_Component_Association with Others_ChoiceEd Schonberg1-6/+18
gcc/ada/ * exp_aggr.adb (Build_Array_Aggr_Code): If the aggregate includes an Others_Choice in an association that is an Iterated_Component_Association, generate a proper loop for it.
2020-10-26[Ada] Further small edition to documentation of Ada.Text_IO.Fixed_IOEric Botcazou2-3/+3
gcc/ada/ * libgnat/a-tifiio.adb: Add missing sign in documentation. * libgnat/s-imgrea.ads: Minor fixes in commentary.
2020-10-26[Ada] Replace GNAT_Extended_Ravenscar profile namePat Rogers2-18/+30
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Include "Jorvik" in pragma Profile description. * gnat_rm.texi: Regenerate.
2020-10-26[Ada] Avoid crash on use of Ada 2020 featureBob Duff2-7/+6
gcc/ada/ * sem_attr.adb (Check_Image_Type): Remove "|", so the compiler will not crash. * errout.ads: Improve comment. This has nothing to do with -gnatQ.
2020-10-26[Ada] Further small edition to documentation of Ada.Text_IO.Fixed_IOEric Botcazou1-17/+14
gcc/ada/ * libgnat/a-tifiio.adb: Minor editions to documentation.
2020-10-26[Ada] Fix freezing of previous contractsPiotr Trojanek1-4/+15
gcc/ada/ * contracts.adb (Causes_Contract_Freezing): Extend condition to match the one in Analyze_Subprogram_Body_Helper. This routine is used both as an assertion at the very start of Freeze_Previous_Contracts and to detect previous declaration for which Freeze_Previous_Contracts has been executed.
2020-10-26[Ada] Another small edition to documentation of Ada.Text_IO.Fixed_IOEric Botcazou1-15/+14
gcc/ada/ * libgnat/a-tifiio.adb: Move around documentaton paragraph.
2020-10-26[Ada] Fix harmless assertion failure in GNATprove modePiotr Trojanek1-1/+18
gcc/ada/ * inline.adb (Establish_Actual_Mapping_For_Inlined_Call): Add guard for a call to Set_Last_Assignment with the same condition as the assertion in that routine and explain why this guard fails in GNATprove mode.
2020-10-26[Ada] Document characteristics of ordinary fixed point typesEric Botcazou2-14/+16
gcc/ada/ * doc/gnat_rm/implementation_defined_characteristics.rst: Adjust the entries of 3.5.9(8) and 3.5.9(10). * gnat_rm.texi: Regenerate.
2020-10-26[Ada] Relax assertion on Small in Ada.Text_IO.Fixed_IOEric Botcazou1-11/+11
gcc/ada/ * libgnat/a-tifiio.adb: Change the range of supported Small values. (E0, E1, E2): Adjust factors. (Exact): Return false if the Small does not fit in 64 bits.
2020-10-26[Ada] Fix Accept_Socket and Connect_Socket timeout supportDmitriy Anisimkov1-50/+25
gcc/ada/ * libgnat/g-socket.adb (Wait_On_Socket): Boolean parameter For_Read changed to Event parameter of type GNAT.Sockets.Poll.Wait_Event_Set. Implementation is simplified and based on call to GNAT.Sockets.Poll.Wait now.
2020-10-26[Ada] Minor editions to documentation of Ada.Text_IO.Fixed_IOEric Botcazou1-35/+33
gcc/ada/ * libgnat/a-tifiio.adb: Minor editions to documentation.
2020-10-26[Ada] Fix GNATprove crash on generics with access typesYannick Moy1-1/+9
gcc/ada/ * sem_ch12.adb (Restore_Private_Views): Do not lose the information provided by Is_Generic_Actual_Type in GNATprove mode.
2020-10-26[Ada] Suppress warnings on unreferenced parameters of dispatching opsArnaud Charlet2-12/+19
gcc/ada/ * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning on formal parameters of all dispatching operations. gcc/testsuite/ * gnat.dg/warn14.adb: Update expectations.
2020-10-26[Ada] Fix typos in error message for array delta aggregatesPiotr Trojanek1-1/+1
gcc/ada/ * sem_aggr.adb (Resolve_Delta_Array_Aggregate): Fix typos in error message.
2020-10-26[Ada] Restore hex addresses and improve symbolic backtracesOlivier Hainque1-9/+12
gcc/ada/ * libgnat/s-dwalin.adb (Symbolic_Traceback): Always emit the hex address at the beginning of an entry if suppression is not requested. Consistently output a "???" for the subprogram name when it is unknown.
2020-10-26[Ada] x86-lynx178elf - gcc build failsDoug Rupp1-0/+3
gcc/ada/ * s-oscons-tmplt.c (_nfds_t): Use sizeof (unsigned long int).
2020-10-26[Ada] Fix interference between iterated element-and-component associationPiotr Trojanek1-6/+6
gcc/ada/ * par-ch4.adb (P_Iterated_Component_Association): Move code for iterated_element_association to Build_Iterated_Element_Association.
2020-10-26[Ada] Do not instantiate generic bodies outside of main unit in GNATproveYannick Moy1-0/+10
gcc/ada/ * sem_ch12.adb (Needs_Body_Instantiated): In GNATprove mode, do not instantiate bodies outside of the main unit.
2020-10-26[Ada] Spurious error on Old attribute reference in delta aggregateEd Schonberg1-2/+7
gcc/ada/ * sem_aggr.adb (Resolve_Delta_Array_Aggregate): For an association that is an iterated component association, attach the copy of the expression to the tree prior to analysis, in order to preserve its context. This is needed when verifying static semantic rules that depend on context, for example that a use of 'Old appears only within a postcondition.
2020-10-26[Ada] gnatpp: Document that --no-comments-fill is now the defaultBob Duff1-2/+2
gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Document that --no-comments-fill is now the default.
2020-10-26[Ada] Missing errors on extension aggregates with unknown discriminantsGary Dismukes1-4/+17
gcc/ada/ * sem_aggr.adb (Resolve_Extension_Aggregate): When testing for an aggregate that is illegal due to having an ancestor type that has unknown discriminants, add an "or else" condition testing whether the aggregate type has unknown discriminants and that Partial_View_Has_Unknown_Discr is also set on the ancestor type. Extend the comment, including adding ??? about a possible simpler test.
2020-10-26[Ada] Delete: set Position to No_ElementBob Duff3-0/+6
gcc/ada/ * libgnat/a-cihama.adb, libgnat/a-cohama.adb, libgnat/a-cohase.adb (Delete): Set Position.Position, and assert.
2020-10-26[Ada] Improve error on missing with clauseArnaud Charlet1-3/+19
gcc/ada/ * sem_ch8.adb (Find_Direct_Name.Undefined): Handle known unit names with 3 selectors.
2020-10-26[Ada] Fix SPARK expansion of iterated_component_assoc in delta aggregatePiotr Trojanek1-0/+1
gcc/ada/ * exp_spark.adb (Expand_SPARK_Delta_Or_Update): Add missing call to Enter_Name, just like it is called for iterated_component_association in Expand_SPARK_N_Aggregate.
2020-10-26[Ada] Cleanup SPARK expansion of aggregates with iterated_component_assocPiotr Trojanek1-7/+3
gcc/ada/ * exp_spark.adb (Expand_SPARK_Delta_Or_Update): Reuse local constant Expr and the Choice_List routine. (Expand_SPARK_N_Aggregate): Reuse local constant Expr.
2020-10-26[Ada] Fix typos in comments about parsing iterated_component_associationPiotr Trojanek1-8/+8
gcc/ada/ * par-ch4.adb (P_Iterated_Component_Association): Fix typos in comments.
2020-10-26[Ada] AI12-0395: Allow aspect_specifications on formal parametersArnaud Charlet3-4/+4
gcc/ada/ * par-ch6.adb (P_Formal_Part): Ada 2020 supports scanning aspects on formal parameters. * doc/gnat_rm/implementation_defined_aspects.rst (Aspect Unreferenced): Update documentation. * gnat_rm.texi: Regenerate.
2020-10-26[Ada] Crash on membership test in expression functionEd Schonberg1-1/+10
gcc/ada/ * freeze.adb (Freeze_Type_Refs): When an entity in an expression function is a type, freeze the entity and not just its type, which would be incomplete when the type is derived and/or tagged.
2020-10-26[Ada] Handle subtype_indication in 'Update for arraysPiotr Trojanek1-0/+3
gcc/ada/ * exp_attr.adb (Expand_Update_Attribute): Handle subtype_indication just like in Expand_Delta_Array_Aggregate.