aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-11[Ada] Crash on dispatching conditional entry callJavier Miranda4-3/+190
2020-06-11 Javier Miranda <miranda@adacore.com> gcc/ada/ * exp_ch9.adb (Expand_N_Conditional_Entry_Call): Replace call to New_Copy_List by calls to the new routine New_Copy_Separate_List. * sem_util.ads (New_Copy_Separate_List, New_Copy_Separate_Tree): New routines. * sem_util.adb (New_Copy_Separate_List, New_Copy_Separate_Tree): New routines. (New_Copy_Tree): Extend the machinery that detects syntactic nodes to handle lists of indentifiers with field More_Ids; otherwise such nodes are erroneously handled as semantic nodes. Copy aspect specifications attached to nodes. * sem_ch12.adb (Copy_Generic_Node): Protect reading attribute Etype.
2020-06-11[Ada] Fix unnesting crash with Predicate_Failure/no predBob Duff1-2/+0
2020-06-11 Bob Duff <duff@adacore.com> gcc/ada/ * sem_ch13.adb (Analyze_Aspect_Specifications): Do not set the Has_Predicates flag when the Predicate_Failure aspect is seen. It is legal (but pointless) to use this aspect without a predicate. If we set the flag, we generate a half-baked Predicate procedure, and if that procedure is nested, it causes unnesting to crash.
2020-06-11[Ada] Put_Image attributeBob Duff5-22/+30
2020-06-11 Bob Duff <duff@adacore.com> gcc/ada/ * exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove special processing of protected types, because those are handled by Build_Protected_Put_Image_Call. (Enable_Put_Image): Use the switch -gnatd_z to control enabling of Put_Image. Disable Put_Image for types in Remote_Types packages. * debug.adb: Document -gnatd_z switch. * exp_imgv.adb, libgnat/a-stteou.ads, opt.ads: Minor cleanups.
2020-06-11[Ada] Simplify iteration over formal parameters for aliasing errorPiotr Trojanek1-4/+4
2020-06-11 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_warn.adb (Warn_On_Overlapping_Actuals): Add label to the outer loop and use it in the exit statement.
2020-06-11[Ada] Generate predicate checks for on assignments in recordsGhjuvan Lacambre1-0/+14
2020-06-11 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * exp_ch3.adb (Build_Assignment): Generate predicate check if subtype mark has predicate.
2020-06-11[Ada] Missing accessibility error on object in type conversionJustin Squirek1-33/+43
2020-06-11 Justin Squirek <squirek@adacore.com> gcc/ada/ * sem_util.adb (Expand_N_Attribute_Reference): Use original nodes where required to avoid looking at the expanded tree.
2020-06-11[Ada] Remove aspects that were commented outArnaud Charlet8-13/+1
2020-06-11 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-catizo.ads, libgnat/a-nbnbin.ads, libgnat/a-nbnbre.ads, libgnat/a-nubinu.ads, libgnat/s-aoinar.ads, libgnat/s-aomoar.ads, libgnat/s-aotase.ads, libgnat/s-stopoo.ads: Remove aspects that we will not implement.
2020-06-11[Ada] Add fallback on Integer_ArithmeticArnaud Charlet1-14/+75
2020-06-11 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-aoinar.adb (Atomic_Fetch_And_Add, Atomic_Fetch_And_Subtract): Add fallback using compare-and-exchange, in case the integer type does not map to a machine type.
2020-06-11asan: fix RTX emission for ilp32Martin Liska1-0/+1
gcc/ChangeLog: PR sanitizer/95634 * asan.c (asan_emit_stack_protection): Fix emission for ilp32 by using Pmode instead of ptr_mode. Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
2020-06-11vect: Rename things related to rgroup_masksKewen Lin3-130/+133
Power supports vector memory access with length (in bytes) instructions. Like existing fully masking for SVE, it is another approach to vectorize the loop using partially-populated vectors. As Richard Sandiford pointed out, we can rename the rgroup struct rgroup_masks to rgroup_controls, rename its members mask_type to type, masks to controls to be more generic. Besides, this patch also renames some functions like vect_set_loop_mask to vect_set_loop_control, release_vec_loop_masks to release_vec_loop_controls, vect_set_loop_masks_directly to vect_set_loop_controls_directly. Bootstrapped/regtested on aarch64-linux-gnu. gcc/ChangeLog: * tree-vect-loop-manip.c (vect_set_loop_mask): Renamed to ... (vect_set_loop_control): ... this. (vect_maybe_permute_loop_masks): Rename rgroup_masks related things. (vect_set_loop_masks_directly): Renamed to ... (vect_set_loop_controls_directly): ... this. Also rename some variables with ctrl instead of mask. Rename vect_set_loop_mask to vect_set_loop_control. (vect_set_loop_condition_masked): Rename rgroup_masks related things. Also rename some variables with ctrl instead of mask. * tree-vect-loop.c (release_vec_loop_masks): Renamed to ... (release_vec_loop_controls): ... this. Rename rgroup_masks related things. (_loop_vec_info::~_loop_vec_info): Rename release_vec_loop_masks to release_vec_loop_controls. (can_produce_all_loop_masks_p): Rename rgroup_masks related things. (vect_get_max_nscalars_per_iter): Likewise. (vect_estimate_min_profitable_iters): Likewise. (vect_record_loop_mask): Likewise. (vect_get_loop_mask): Likewise. * tree-vectorizer.h (struct rgroup_masks): Renamed to ... (struct rgroup_controls): ... this. Also rename mask_type to type and rename masks to controls.
2020-06-11vect: Rename fully_masked_p to using_partial_vectors_pKewen Lin3-21/+28
Power supports vector memory access with length (in bytes) instructions. Like existing fully masking for SVE, it is another approach to vectorize the loop using partially-populated vectors. As Richard Sandiford suggested, this patch is to update the existing fully_masked_p field to using_partial_vectors_p. Introduce one macro LOOP_VINFO_USING_PARTIAL_VECTORS_P for partial vectorization checking usage, update the LOOP_VINFO_FULLY_MASKED_P with LOOP_VINFO_USING_PARTIAL_VECTORS_P && !masks.is_empty() and still use it for mask-based partial vectors approach specific checks. Bootstrapped/regtested on aarch64-linux-gnu. gcc/ChangeLog: * tree-vect-loop-manip.c (vect_set_loop_condition): Rename LOOP_VINFO_FULLY_MASKED_P to LOOP_VINFO_USING_PARTIAL_VECTORS_P. (vect_gen_vector_loop_niters): Likewise. (vect_do_peeling): Likewise. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Rename fully_masked_p to using_partial_vectors_p. (vect_analyze_loop_costing): Rename LOOP_VINFO_FULLY_MASKED_P to LOOP_VINFO_USING_PARTIAL_VECTORS_P. (determine_peel_for_niter): Likewise. (vect_estimate_min_profitable_iters): Likewise. (vect_transform_loop): Likewise. * tree-vectorizer.h (LOOP_VINFO_FULLY_MASKED_P): Updated. (LOOP_VINFO_USING_PARTIAL_VECTORS_P): New macro.
2020-06-11vect: Rename can_fully_mask_p to can_use_partial_vectors_pKewen Lin3-24/+29
Power supports vector memory access with length (in bytes) instructions. Like existing fully masking for SVE, it is another approach to vectorize the loop using partially-populated vectors. As Richard Sandiford pointed out, we should extend the existing flag can_fully_mask_p to be more generic, to indicate whether we have any chances with partial vectors for this loop. So this patch is to rename this flag to can_use_partial_vectors_p to be more meaningful, also rename the macro LOOP_VINFO_CAN_FULLY_MASK_P to LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. Bootstrapped/regtested on aarch64-linux-gnu. gcc/ChangeLog: * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Rename can_fully_mask_p to can_use_partial_vectors_p. (vect_analyze_loop_2): Rename LOOP_VINFO_CAN_FULLY_MASK_P to LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. Rename saved_can_fully_mask_p to saved_can_use_partial_vectors_p. (vectorizable_reduction): Rename LOOP_VINFO_CAN_FULLY_MASK_P to LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. (vectorizable_live_operation): Likewise. * tree-vect-stmts.c (permute_vec_elements): Likewise. (check_load_store_masking): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. * tree-vectorizer.h (LOOP_VINFO_CAN_FULLY_MASK_P): Renamed to ... (LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P): ... this. (_loop_vec_info): Rename can_fully_mask_p to can_use_partial_vectors_p.
2020-06-11Fix -Wformat-diag in options-save.cMartin Liska1-1/+1
The patch removes bunch of warnings: options-save.c:12004:29: warning: unquoted identifier or keyword ‘global_options’ in format [-Wformat-diag] 12004 | internal_error ("Error: global_options are modified in local context\n"); gcc/ChangeLog: * optc-save-gen.awk: Quote error string.
2020-06-11Fix bug where evrp was trapping on identical original and modified statements.Aldy Hernandez1-8/+11
2020-06-10slim up mem exprs to avoid line breaks in -fverbose-asmAlexandre Oliva1-1/+2
An asm operand with a "VIEW_CONVERT_EXPR<struct { [...] }>" will output the definition of the struct as asm code. Oops. Enable TDF_SLIM in print_mem_expr to avoid such line breaks. for gcc/ChangeLog * print-rtl.c (print_mem_expr): Enable TDF_SLIM in dump_flags.
2020-06-10RISC-V: Unify the output asm pattern between gpr_save and gpr_restore pattern.Kito Cheng4-18/+3
gcc/ChangeLog: * config/riscv/riscv-protos.h (riscv_output_gpr_save): Remove. * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Update value. * config/riscv/riscv.c (riscv_output_gpr_save): Remove. * config/riscv/riscv.md (gpr_save): Update output asm pattern.
2020-06-10RISC-V: Describe correct USEs for gpr_save pattern [PR95252]Kito Cheng6-5/+156
- Verified on rv32emc/rv32gc/rv64gc bare-metal target and rv32gc/rv64gc linux target with qemu. gcc/ChangeLog: * config/riscv/predicates.md (gpr_save_operation): New. * config/riscv/riscv-protos.h (riscv_gen_gpr_save_insn): New. (riscv_gpr_save_operation_p): Ditto. * config/riscv/riscv-sr.c (riscv_remove_unneeded_save_restore_calls): Ignore USEs for gpr_save patter. * config/riscv/riscv.c (gpr_save_reg_order): New. (riscv_expand_prologue): Use riscv_gen_gpr_save_insn to gen gpr_save. (riscv_gen_gpr_save_insn): New. (riscv_gpr_save_operation_p): Ditto. * config/riscv/riscv.md (S3_REGNUM): New. (S4_REGNUM): Ditto. (S5_REGNUM): Ditto. (S6_REGNUM): Ditto. (S7_REGNUM): Ditto. (S8_REGNUM): Ditto. (S9_REGNUM): Ditto. (S10_REGNUM): Ditto. (S11_REGNUM): Ditto. (gpr_save): Model USEs correctly. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr95252.c: New.
2020-06-11Daily bump.GCC Administrator6-1/+514
2020-06-10[PR51447] restore the global reg var before returning from mainAlexandre Oliva1-0/+6
A runtime system might legitimately hold in rbx a value expected to be preserved across the call to main, but its use as a global register variable stops main from preserving it. for gcc/testsuite/ChangeLog PR rtl-optimization/51447 * gcc.c-torture/execute/pr51447.c (main): Preserve call-saved register.
2020-06-10coroutines: Make call argument handling more robust [PR95440]Iain Sandoe2-2/+41
build_new_method_call is supposed to be able to handle a null arguments list pointer (when the method has no parms). There were a couple of places where uses of the argument list pointer were not defended against NULL. gcc/cp/ChangeLog: PR c++/95440 * call.c (add_candidates): Use vec_safe_length() for testing the arguments list. (build_new_method_call_1): Use vec_safe_is_empty() when checking for an empty args list. gcc/testsuite/ChangeLog: PR c++/95440 * g++.dg/coroutines/pr95440.C: New test.
2020-06-10PR middle-end/95353 - spurious -Wstringop-overflow writing to a trailing ↵Martin Sebor20-361/+1188
array plus offset Also resolves: PR middle-end/92939 - missing -Wstringop-overflow on negative index from the end of array gcc/ChangeLog: PR middle-end/95353 PR middle-end/92939 * builtins.c (inform_access): New function. (check_access): Call it. Add argument. (addr_decl_size): Remove. (get_range): New function. (compute_objsize): New overload. Only use compute_builtin_object_size with raw memory function. (check_memop_access): Pass new argument to compute_objsize and check_access. (expand_builtin_memchr, expand_builtin_strcat): Same. (expand_builtin_strcpy, expand_builtin_stpcpy_1): Same. (expand_builtin_stpncpy, check_strncat_sizes): Same. (expand_builtin_strncat, expand_builtin_strncpy): Same. (expand_builtin_memcmp): Same. * builtins.h (check_nul_terminated_array): Declare extern. (check_access): Add argument. (struct access_ref, struct access_data): New structs. * gimple-ssa-warn-restrict.c (clamp_offset): New helper. (builtin_access::overlap): Call it. * tree-object-size.c (decl_init_size): Declare extern. (addr_object_size): Correct offset computation. * tree-object-size.h (decl_init_size): Declare. * tree-ssa-strlen.c (handle_integral_assign): Remove a call to maybe_warn_overflow when assigning to an SSA_NAME. gcc/testsuite/ChangeLog: PR middle-end/95353 PR middle-end/92939 * c-c++-common/Wstringop-truncation.c: Remove an xfail. * gcc.dg/Warray-bounds-46.c: Remove a bogus warning. * gcc.dg/Wrestrict-9.c: Disable -Wstringop-overflow. * gcc.dg/Wstringop-overflow-12.c: Remove xfails. * gcc.dg/Wstringop-overflow-28.c: Same. * gcc.dg/builtin-stringop-chk-4.c: Same. * gcc.dg/builtin-stringop-chk-5.c: Same. * gcc.dg/builtin-stringop-chk-8.c: Same. * gcc.dg/strlenopt-74.c: Avoid buffer overflow. * gcc.dg/Wstringop-overflow-34.c: New test. * gcc.dg/Wstringop-overflow-35.c: New test. * gcc.dg/Wstringop-overflow-36.c: New test. * gcc.dg/Wstringop-overflow-37.c: New test. * gcc.dg/Wstringop-overflow-38.c: New test.
2020-06-10Adjust evrp trapping code to display removal of PHIs.Aldy Hernandez1-1/+9
2020-06-10avoid stmt-info allocation for debug stmtsRichard Biener4-4/+24
The following avoids allocating stmt info structs for debug stmts. 2020-06-10 Richard Biener <rguenther@suse.de> * tree-vect-loop.c (vect_determine_vectorization_factor): Skip debug stmts. (_loop_vec_info::_loop_vec_info): Likewise. (vect_update_vf_for_slp): Likewise. (vect_analyze_loop_operations): Likewise. (update_epilogue_loop_vinfo): Likewise. * tree-vect-patterns.c (vect_determine_precisions): Likewise. (vect_pattern_recog): Likewise. * tree-vect-slp.c (vect_detect_hybrid_slp): Likewise. (_bb_vec_info::_bb_vec_info): Likewise. * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2020-06-10tree-optimization/95576 - fix compare-debug issue with SLP vectorizationRichard Biener2-1/+31
The following avoids leading debug stmts in BB vectorizer regions. 2020-06-10 Richard Biener <rguenther@suse.de> PR tree-optimization/95576 * tree-vect-slp.c (vect_slp_bb): Skip leading debug stmts. * g++.dg/vect/pr95576.cc: New testcase.
2020-06-10aarch64: Fix an ICE in register_tuple_type [PR95523]z002190973-0/+15
When registering the tuple type in register_tuple_type, the TYPE_ALIGN (tuple_type) will be changed by -fpack-struct=n. We need to maintain natural alignment in handle_arm_sve_h. 2020-06-10 Haijian Zhang <z.zhanghaijian@huawei.com> gcc/ PR target/95523 * config/aarch64/aarch64-sve-builtins.h (sve_switcher::m_old_maximum_field_alignment): New member. * config/aarch64/aarch64-sve-builtins.cc (sve_switcher::sve_switcher): Save maximum_field_alignment in m_old_maximum_field_alignment and clear maximum_field_alignment. (sve_switcher::~sve_switcher): Restore maximum_field_alignment. gcc/testsuite/ PR target/95523 * gcc.target/aarch64/sve/pr95523.c: New test.
2020-06-10[Ada] AI12-0364 Add a modular atomic arithmetic packageArnaud Charlet6-8/+294
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-aomoar.ads, libgnat/s-aomoar.adb: New files. * libgnat/s-atopar.ads: Move... * libgnat/s-aoinar.ads: Here. * libgnat/s-atopar.adb: Move... * libgnat/s-aoinar.adb: Here. * impunit.adb: Update list of runtime files. * Makefile.rtl (GNATRTL_NONTASKING_OBJS=): Adjust.
2020-06-10c++: Fix ICE with delayed parsing of noexcept-specifier [PR95562]Marek Polacek2-0/+18
Here we ICE because a DEFERRED_PARSE expression leaked to tsubst_copy. We create these expressions for deferred noexcept-specifiers in cp_parser_save_noexcept; they are supposed to be re-parsed in cp_parser_late_noexcept_specifier. In this case we never got around to re-parsing it because the noexcept-specifier was attached to a pointer to a function, not to a function declaration. But we should not have delayed the parsing here in the first place; we already avoid delaying the parsing for alias-decls, typedefs, and friend function declarations. (Clang++ also doesn't delay the parsing for pointers to function.) gcc/cp/ChangeLog: PR c++/95562 * parser.c (cp_parser_direct_declarator): Clear CP_PARSER_FLAGS_DELAY_NOEXCEPT if the declarator kind is not cdk_id. gcc/testsuite/ChangeLog: PR c++/95562 * g++.dg/cpp0x/noexcept60.C: New test.
2020-06-10[Ada] AI12-0311 New checks for language-defined unitsArnaud Charlet2-24/+39
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * snames.ads-tmpl (Name_Characters_Assertion_Check, Name_Containers_Assertion_Check, Name_Interfaces_Assertion_Check, Name_IO_Assertion_Check, Name_Numerics_Assertion_Check, Name_Strings_Assertion_Check, Name_System_Assertion_Check): New constants. * types.ads (Characters_Assertion_Check, Containers_Assertion_Check, Interfaces_Assertion_Check, IO_Assertion_Check, Numerics_Assertion_Check, Strings_Assertion_Check, System_Assertion_Check): New constants. (All_Checks): Update accordingly.
2020-06-10[Ada] Don't build equivalent record aggregate if type has predicatesGhjuvan Lacambre1-0/+11
2020-06-10 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * exp_ch3.adb (Build_Equivalent_Record_Aggregate): Return Empty if Etype of record component has predicates.
2020-06-10[Ada] Ada 202x AI12-0192 "requires late initialization"Arnaud Charlet1-24/+182
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_ch3.adb (Build_Init_Statements): Implement the notion of "require late initialization".
2020-06-10[Ada] Add missing Sloc on new explicit dereferencesEric Botcazou1-0/+3
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_util.adb (Copy_And_Maybe_Dereference): Temporarily copy the parent node of the original tree when dereferencing.
2020-06-10[Ada] Additional warnings on overlapping actuals of composite typesEd Schonberg1-1/+17
2020-06-10 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_warn.adb (Warn_On_Overlapping_Actuals): Add a warning when two actuals in a call overlap, both are composite types that may be passed by reference, and only one of them is writable.
2020-06-10[Ada] Implement AI12-0162 Memberships and Unchecked_UnionsEric Botcazou1-11/+12
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_N_In): Use an expression with actions to insert the PE raise statement for the Unchecked_Union case.
2020-06-10[Ada] Remove obsolete code in Resolve_CallEric Botcazou2-22/+1
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch4.adb (Analyze_Call): Use idiomatic condition. * sem_res.adb (Resolve_Call): Remove obsolete code.
2020-06-10[Ada] Insert explicit dereferences when building actual subtypeEric Botcazou1-5/+24
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_util.adb (Copy_And_Maybe_Dereference): New function. (Build_Access_Record_Constraint): Use it to copy the prefix. (Build_Actual_Array_Constraint): Likewise. (Build_Actual_Record_Constraint): Likewise.
2020-06-10[Ada] Disable unwanted warnings in Assertion_Policy(Ignore) modeBob Duff2-27/+15
2020-06-10 Bob Duff <duff@adacore.com> gcc/ada/ * sem_prag.adb (Invariant): Remove the pragma removing code. It doesn't work to remove the pragma, because various flags are set during Build_Invariant_Procedure_Declaration and Build_Invariant_Procedure_Body that need to be set to avoid the spurious warnings. * exp_util.adb (Make_Invariant_Call): Avoid calling the invariant-checking procedure if the body is empty. This is an optimization.
2020-06-10[Ada] Fix gnatmetric switches descriptionVasiliy Fofanov1-2/+2
2020-06-10 Vasiliy Fofanov <fofanov@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Fix gnatmetric switches description.
2020-06-10[Ada] Update headersArnaud Charlet4-40/+16
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * repinfo-input.ads, repinfo-input.adb, repinfo.adb, repinfo.ads: Update header.
2020-06-10[Ada] Improve code generated for dynamic discriminated aggregateEric Botcazou1-15/+26
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_aggr.adb (In_Place_Assign_OK): Do not necessarily return false for a type with discriminants. (Convert_To_Assignments): Use Parent_Node and Parent_Kind more consistently. In the in-place assignment case, first apply a discriminant check if need be, and be prepared for a rewritten aggregate as a result.
2020-06-10[Ada] Remove more references to ASISArnaud Charlet17-182/+60
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * atree.adb, contracts.adb, debug.adb, freeze.adb, repinfo-input.adb, repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_disp.adb, sem_eval.adb, sem_prag.adb: Remove more references to ASIS.
2020-06-10[Ada] Fix typo in exception messageArnaud Charlet1-1/+1
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-secsta.adb (Round_Up): Fix typo in exception message.
2020-06-10[Ada] Fix minor typo in comment of membership choice parsingPiotr Trojanek1-1/+1
2020-06-10 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * par-ch4.adb (P_Membership_Test): Fix typo in a grammar rule.
2020-06-10[Ada] Revert workaround for expansion of Enum_Rep in GNATprove modePiotr Trojanek1-9/+2
2020-06-10 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove expansion of First and Last attributes.
2020-06-10[Ada] Fold Enum_Rep attribute in evaluation and not in expansionPiotr Trojanek3-37/+9
2020-06-10 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Remove folding for Enum_Rep attribute. * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Remove duplicated code for folding Enum_Rep attribute. * sem_attr.adb (Eval_Attribute): Relax condition for folding Enum_Rep attribute; previously dead code is now executed when the attribute prefix is an enumeration literal; refine type in processing of Enum_Val.
2020-06-10[Ada] Classwide controlled obj not dispatchingJavier Miranda1-13/+19
2020-06-10 Javier Miranda <miranda@adacore.com> gcc/ada/ * sem_ch3.adb (Analyze_Declarations): Adjust the machinery that takes care of late body overriding of initialize, adjust, finalize. Remove ASIS mode code.
2020-06-10[Ada] Ada_2020 AI12-0220: Pre/Postconditions on Access_To_Subprogram typesEd Schonberg6-3/+309
2020-06-10 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * einfo.ads (Access_Subprogram_Wrapper): New attribute of Subprogram_Type entities. Denotes subprogram constructed for Access_To_Subprogram types that include pre- and postconditions. * einfo.adb: Subprogram bodies for Access_Subprogram_Wrapper. * exp_ch6.adb (Expand_Call): An indirect call through an Access_To_subprogram that includes contracts is rewritten as a call to the corresponding Access_ ubprogram_Wrapper. Handle derived types that inherit contract from parent. * sem_prag.adb (Build_Access_Subprogram_Wrapper): Build subprogram declaration for subprogram that incorporates the contracts of an Access_To_Subprogram type declaration. Build corresponding body and attach it to freeze actions for type. * sem_util.ads, sem_util.adb (Is_Access_Subprogram_Wrapper): Utility that uses signature of the subprogram to determine whether it is a generated wrapper for an Access_To_Subprogram type.
2020-06-10[Ada] Fix assertion failure on functions with contractsGhjuvan Lacambre1-3/+6
2020-06-10 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * par-ch6.adb (P_Subprogram): Make sure the specification belongs to a procedure.
2020-06-10[Ada] Simplify detection of static membership choicesPiotr Trojanek1-5/+10
2020-06-10 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_ch13.adb (All_Membership_Choices_Static): Assert an AST property documented in sinfo.ads and simplify an excessive condition.
2020-06-10[Ada] Minor fix style and typos in commentsPiotr Trojanek4-4/+4
2020-06-10 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Fix a copy-paste mistake in comment. * sem_res.adb (Flag_Effectively_Volatile_Objects): Fix a type in the SPARK RM rule number. * exp_ch4.adb, sem_util.adb: Fix style in single line comments.
2020-06-10[Ada] Remove unreferenced GNATprove utility routine Get_Low_BoundPiotr Trojanek2-16/+0
2020-06-10 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_aux.ads, sem_aux.adb (Get_Low_Bound): Remove.