aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-10[Ada] Remove Determine_LicenseArnaud Charlet1-159/+1
2020-06-10 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * scn.adb (Determine_License): Remove.
2020-06-10[Ada] Incorrect accessibility checks on functions callsJustin Squirek6-184/+203
2020-06-10 Justin Squirek <squirek@adacore.com> gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Add condition to handle processing of objects initialized by a call to a function return an anonymous access type. * exp_ch6.adb, exp_ch6.ads (Has_Unconstrained_Access_Discriminants): Moved to sem_util.adb (Needs_Result_Accessibility_Level): Moved to sem_util.adb * sem_util.adb, sem_util.ads (Has_Unconstrained_Access_Discriminants): Moved from exp_ch6.adb (Needs_Result_Accessibility_Level): Moved from exp_ch6.adb * sem_res.adb (Valid_Conversion): Add condition for the special case where the operand of a conversion is the result of an anonymous access type
2020-06-10[Ada] Reject illegal bodies for null proceduresGhjuvan Lacambre1-0/+7
2020-06-10 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * par-ch6.adb (P_Subprogram): Reject duplicate subprogram declarations.
2020-06-10[Ada] Fix incorrect insertion of post-call actions in if-expressionEric Botcazou1-5/+10
2020-06-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch6.adb (Insert_Post_Call_Actions): Deal with the context of an if-expression and with a call written in prefixed notation.
2020-06-10[Ada] Minor reformatting and some typo fixesGary Dismukes4-14/+14
2020-06-10 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * einfo.ads: Minor reformatting of a comment. * exp_aggr.adb: Minor reformatting and a grammar correction. * exp_attr.adb: Minor reformatting and a typo fix in some comments. * sem_ch12.adb: Fix three typos in comments.
2020-06-10Make {SLP_TREE,STMT_VINFO}_VEC_STMTS a vector of gimple *Richard Biener7-380/+282
This makes {SLP_TREE,STMT_VINFO}_VEC_STMTS a vector of gimple * and not allocate a stmt_vec_info for vectorizer generated stmts since this is now possible after removing the only use which was chaining of vector stmts via STMT_VINFO_RELATED_STMT. This also removes all stmt_vec_info allocations done for vector stmts, the remaining ones are for stmts in the scalar IL and for patterns which are not part of the IL. Thus after this the stmt UIDs inside a basic-block are suitable for dominance checking if you ignore (or lazy-fill) UIDs of zero of the vector stmts inserted during transform. This property is ensured by a new flag set when pattern analysis is complete. 2020-06-10 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_slp_tree::vec_stmts): Make it a vector of gimple * stmts. (_stmt_vec_info::vec_stmts): Likewise. (vec_info::stmt_vec_info_ro): New flag. (vect_finish_replace_stmt): Adjust declaration. (vect_finish_stmt_generation): Likewise. (vectorizable_induction): Likewise. (vect_transform_reduction): Likewise. (vectorizable_lc_phi): Likewise. * tree-vect-data-refs.c (vect_create_data_ref_ptr): Do not allocate stmt infos for increments. (vect_record_grouped_load_vectors): Adjust. * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise. (vectorize_fold_left_reduction): Likewise. (vect_transform_reduction): Likewise. (vect_transform_cycle_phi): Likewise. (vectorizable_lc_phi): Likewise. (vectorizable_induction): Likewise. (vectorizable_live_operation): Likewise. (vect_transform_loop): Likewise. * tree-vect-patterns.c (vect_pattern_recog): Set stmt_vec_info_ro. * tree-vect-slp.c (vect_get_slp_vect_def): Adjust. (vect_get_slp_defs): Likewise. (vect_transform_slp_perm_load): Likewise. (vect_schedule_slp_instance): Likewise. (vectorize_slp_instance_root_stmt): Likewise. * tree-vect-stmts.c (vect_get_vec_defs_for_operand): Likewise. (vect_finish_stmt_generation_1): Do not allocate a stmt info. (vect_finish_replace_stmt): Do not return anything. (vect_finish_stmt_generation): Likewise. (vect_build_gather_load_calls): Adjust. (vectorizable_bswap): Likewise. (vectorizable_call): Likewise. (vectorizable_simd_clone_call): Likewise. (vect_create_vectorized_demotion_stmts): Likewise. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_scan_store): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. (vectorizable_comparison): Likewise. (vect_transform_stmt): Likewise. * tree-vectorizer.c (vec_info::vec_info): Initialize stmt_vec_info_ro. (vec_info::replace_stmt): Copy over stmt UID rather than unsetting/setting a stmt info allocating a new UID. (vec_info::set_vinfo_for_stmt): Assert !stmt_vec_info_ro.
2020-06-10Merge evrp uses of substitute_and_fold_engine into the engine itself.Aldy Hernandez10-303/+220
This patch merges the evrp uses of the substitute and fold engine into the engine itself, at least the parts that can be re-used by other engine uses. It also adds a context parameter to get_value() for further use. gcc/ * gimple-loop-versioning.cc (loop_versioning::name_prop::get_value): Add stmt parameter. * gimple-ssa-evrp.c (class evrp_folder): New. (class evrp_dom_walker): Remove. (execute_early_vrp): Use evrp_folder instead of evrp_dom_walker. * tree-ssa-ccp.c (ccp_folder::get_value): Add stmt parameter. * tree-ssa-copy.c (copy_folder::get_value): Same. * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in): Pass stmt to get_value. (substitute_and_fold_engine::replace_phi_args_in): Same. (substitute_and_fold_dom_walker::after_dom_children): Call post_fold_bb. (substitute_and_fold_dom_walker::foreach_new_stmt_in_bb): New. (substitute_and_fold_dom_walker::propagate_into_phi_args): New. (substitute_and_fold_dom_walker::before_dom_children): Adjust to call virtual functions for folding, pre_folding, and post folding. Call get_value with PHI. Tweak dump. * tree-ssa-propagate.h (class substitute_and_fold_engine): New argument to get_value. New virtual function pre_fold_bb. New virtual function post_fold_bb. New virtual function pre_fold_stmt. New virtual function post_new_stmt. New function propagate_into_phi_args. * tree-vrp.c (vrp_folder::get_value): Add stmt argument. * vr-values.c (vr_values::extract_range_from_stmt): Adjust dump output. (vr_values::fold_cond): New. (vr_values::simplify_cond_using_ranges_1): Call fold_cond. * vr-values.h (class vr_values): Add simplify_cond_using_ranges_when_edge_is_known. gcc/testsuite/ * gcc.dg/tree-ssa/ssa-dse-30.c: Adjust test for folding of memmove happening later.
2020-06-10Revamp frvrp*changes flags.Aldy Hernandez7-27/+21
Flags are now: frvrp1-changes Common Var(flag_rvrp1_changes) Init(0) Allow IL changes in rvrp1 pass. frvrp2-changes Common Var(flag_rvrp2_changes) Init(1) Allow IL changes in rvrp2 pass. fevrp-traps Common Var(flag_evrp_traps) Init(0) Trap on any EVRP changes to the IL. There is also another flag, but it is for testsuite use only, to turn on/off the RVRP changes for all passes: frvrp-changes Common Var(flag_rvrp_changes) Init(-1) Override for both -frvrp1-changes and -frvrp2-changes. This is meant to be used by the testsuite to keep RVRP passes from making IL changes in some tests, thus making easier to test evrp functionality.
2020-06-10Tidy up gimple_state class.Aldy Hernandez5-177/+49
Previous method names were confusing.
2020-06-10Add missing store in emission of asan_stack_free.Martin Liska1-2/+18
gcc/ChangeLog: 2020-05-19 Martin Liska <mliska@suse.cz> PR sanitizer/94910 * asan.c (asan_emit_stack_protection): Emit also **SavedFlagPtr(FakeStack, class_id) = 0 in order to release a stack frame.
2020-06-10Move evrp trapping conditional to its own function.Aldy Hernandez3-4/+11
2020-06-10Remove unused tmp_stats_pre_fold_bb_end.Aldy Hernandez2-2/+0
2020-06-10AArch64: Adjust costing of by element MUL to be the same as SAME3 MUL.Tamar Christina2-1/+38
The cost model is currently treating multiplication by element as being more expensive than 3 same multiplication. This means that if the value is on the SIMD side we add an unneeded DUP. If the value is on the genreg side we use the more expensive DUP instead of fmov. This patch corrects the costs such that the two multiplies are costed the same which allows us to generate fmul v3.4s, v3.4s, v0.s[0] instead of dup v0.4s, v0.s[0] fmul v3.4s, v3.4s, v0.4s gcc/ChangeLog: * config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Adjust costs for mul. gcc/testsuite/ChangeLog: * gcc.target/aarch64/asimd-mull-elem.c: New test.
2020-06-10Introduce STMT_VINFO_VEC_STMTSRichard Biener6-1500/+873
This gets rid of the linked list of STMT_VINFO_VECT_STMT and STMT_VINFO_RELATED_STMT in preparation for vectorized stmts no longer needing a stmt_vec_info (just for this chaining). This has ripple-down effects in all places we gather vectorized defs. For this new interfaces are introduced and used throughout vectorization, simplifying code in a lot of places and merging it with the SLP way of gathering vectorized operands. There is vect_get_vec_defs as the new recommended unified interface and vect_get_vec_defs_for_operand as one for non-SLP operation. I've resorted to keep the structure of the code the same where using vect_get_vec_defs would have been too disruptive for this already large patch. 2020-06-10 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_vfa_access_size): Adjust. (vect_record_grouped_load_vectors): Likewise. * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise. (vectorize_fold_left_reduction): Likewise. (vect_transform_reduction): Likewise. (vect_transform_cycle_phi): Likewise. (vectorizable_lc_phi): Likewise. (vectorizable_induction): Likewise. (vectorizable_live_operation): Likewise. (vect_transform_loop): Likewise. * tree-vect-slp.c (vect_get_slp_defs): New function, split out from overload. * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Remove. (vect_get_vec_def_for_operand): Likewise. (vect_get_vec_def_for_stmt_copy): Likewise. (vect_get_vec_defs_for_stmt_copy): Likewise. (vect_get_vec_defs_for_operand): New function. (vect_get_vec_defs): Likewise. (vect_build_gather_load_calls): Adjust. (vect_get_gather_scatter_ops): Likewise. (vectorizable_bswap): Likewise. (vectorizable_call): Likewise. (vectorizable_simd_clone_call): Likewise. (vect_get_loop_based_defs): Remove. (vect_create_vectorized_demotion_stmts): Adjust. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_scan_store): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. (vectorizable_comparison): Likewise. (vect_transform_stmt): Adjust and remove no longer applicable sanity checks. * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize STMT_VINFO_VEC_STMTS. (vec_info::free_stmt_vec_info): Relase it. * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Remove. (_stmt_vec_info::vec_stmts): Add. (STMT_VINFO_VEC_STMT): Remove. (STMT_VINFO_VEC_STMTS): New. (vect_get_vec_def_for_operand_1): Remove. (vect_get_vec_def_for_operand): Likewise. (vect_get_vec_defs_for_stmt_copy): Likewise. (vect_get_vec_def_for_stmt_copy): Likewise. (vect_get_vec_defs): New overloads. (vect_get_vec_defs_for_operand): New. (vect_get_slp_defs): Declare.
2020-06-10tmmark: verify_ssa failed [PR95569]Qian Chao2-0/+19
This patch fixes a latent bug exposed by eb72dc663e9070b281be83a80f6f838a3a878822. See the discussion on the bug for details. Bootstrapped and regtested on aarch64-linux-gnu. No new fails introduced. 2020-06-10 Qian Chao <qianchao9@huawei.com> gcc/ChangeLog: PR tree-optimization/95569 * trans-mem.c (expand_assign_tm): Ensure that rtmp is marked TREE_ADDRESSABLE. gcc/testsuite/ChangeLog: PR tree-optimization/95569 * gcc.dg/tm/pr95569.c: New test.
2020-06-10Add more unimplemented operands in enhanced_operand_compare::operand_equal_p.Aldy Hernandez1-0/+6
2020-06-10Fix off-by-one allocation bug in get_fresh_function_name.Aldy Hernandez1-1/+1
2020-06-10Add gcc_assert that &global_options are not dirty modified.Martin Liska4-0/+51
gcc/ChangeLog: 2020-03-20 Martin Liska <mliska@suse.cz> PR tree-optimization/92860 * optc-save-gen.awk: Generate new function cl_optimization_compare. * opth-gen.awk: Generate declaration of the function. gcc/c-family/ChangeLog: 2020-03-20 Martin Liska <mliska@suse.cz> PR tree-optimization/92860 * c-attribs.c (handle_optimize_attribute): Save global options and compare it after parsing of function attribute. * c-pragma.c (opt_stack::saved_global_options): New field. (handle_pragma_push_options): Save global_options. (handle_pragma_pop_options): Compare them after pop.
2020-06-10Daily bump.GCC Administrator7-1/+477
2020-06-09PowerPC: Add future hwcap2 bitsMichael Meissner2-0/+16
This patch adds support for the two new HWCAP2 fields used by the __builtin_cpu_supports function. It adds support in the target_clones attribute for -mcpu=future. The two new __builtin_cpu_supports tests are: __builtin_cpu_supports ("isa_3_1") __builtin_cpu_supports ("mma") The bits used are the bits that the Linux kernel engineers will be using for these new features. gcc/ 2020-06-09 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/ppc-auxv.h (PPC_PLATFORM_FUTURE): Allocate 'future' PowerPC platform. (PPC_FEATURE2_ARCH_3_1): New HWCAP2 bit for ISA 3.1. (PPC_FEATURE2_MMA): New HWCAP2 bit for MMA. * config/rs6000/rs6000-call.c (cpu_supports_info): Add ISA 3.1 and MMA HWCAP2 bits. * config/rs6000/rs6000.c (CLONE_ISA_3_1): New clone support. (rs6000_clone_map): Add 'future' system target_clones support. testsuite/ 2020-06-09 Michael Meissner <meissner@linux.ibm.com> * gcc.target/powerpc/clone3.c: New test for using 'future' with the target_clones attribute.
2020-06-09PowerPC: Add future hwcap2 bitsMichael Meissner1-0/+33
This patch adds support for the two new HWCAP2 fields used by the __builtin_cpu_supports function. It adds support in the target_clones attribute for -mcpu=future. The two new __builtin_cpu_supports tests are: __builtin_cpu_supports ("isa_3_1") __builtin_cpu_supports ("mma") The bits used are the bits that the Linux kernel engineers will be using for these new features. testsuite/ 2020-06-05 Michael Meissner <meissner@linux.ibm.com> * gcc.target/powerpc/clone3.c: New test for using 'future' with the target_clones attribute.
2020-06-09PowerPC: Add future hwcap2 bitsMichael Meissner3-1/+11
This patch adds support for the two new HWCAP2 fields used by the __builtin_cpu_supports function. It adds support in the target_clones attribute for -mcpu=future. The two new __builtin_cpu_supports tests are: __builtin_cpu_supports ("isa_3_1") __builtin_cpu_supports ("mma") The bits used are the bits that the Linux kernel engineers will be using for these new features. gcc/ 2020-06-05 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/ppc-auxv.h (PPC_PLATFORM_FUTURE): Allocate 'future' PowerPC platform. (PPC_FEATURE2_ARCH_3_1): New HWCAP2 bit for ISA 3.1. (PPC_FEATURE2_MMA): New HWCAP2 bit for MMA. * config/rs6000/rs6000-call.c (cpu_supports_info): Add ISA 3.1 and MMA HWCAP2 bits. * config/rs6000/rs6000.c (CLONE_ISA_3_1): New clone support. (rs6000_clone_map): Add 'future' system target_clones support.
2020-06-09Remove loop_ranger::range_of_phi as loop_ranger::range_of_stmt handles things.Aldy Hernandez3-19/+1
2020-06-09PowerPC: Add pcrel/prefixed target supports.Michael Meissner1-0/+6
2020-06-09 Michael Meissner <meissner@linux.ibm.com> * lib/target-supports.exp (check_effective_target_powerpc_pcrel): New. (check_effective_target_powerpc_prefixed_addr): New.
2020-06-09When specifying a non-system prefix with --with-zstd, the build fails ↵Michael Kuhn3-2/+7
because the header and library cannot be found (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95005). The attached patch fixes the problem and is what we use in Spack to make GCC build with zstd support. gcc/ * Makefile.in (ZSTD_INC): Define. (ZSTD_LIB): Include ZSTD_LDFLAGS. (CFLAGS-lto-compress.o): Add ZSTD_INC. * configure.ac (ZSTD_CPPFLAGS, ZSTD_LDFLAGS): New variables for AC_SUBST. * configure: Rebuilt.
2020-06-09asan: fix wrong options for a test-case.Martin Liska1-1/+1
gcc/testsuite/ChangeLog: * c-c++-common/asan/inline-kernel.c: Add missing -fno-sanitize-address option.
2020-06-09coroutines: Ensure distinct DTOR trees [PR95137].Iain Sandoe1-9/+13
Part of the PR notes that there are UBSAN fails for the coroutines test suite. These are primarily related to the use of the same DTOR tree in the two edges from the await block. Fixed by building a new tree for each. gcc/cp/ChangeLog: PR c++/95137 * coroutines.cc (expand_one_await_expression): Build separate DTOR trees for the awaitable object on the destroy and resume paths.
2020-06-09tree-inline: Fix VLA handling [PR95552]Jason Merrill2-0/+20
The problem in this testcase comes from cloning the constructor into complete and base variants. When we clone the body the first time, walk_tree_1 calls copy_tree_body_r on the type of the artificial TYPE_DECL we made for the VLA type without calling it on the decl itself, so we overwrite the type of the TYPE_DECL without copying the decl first. This has been broken since we started inserting a TYPE_DECL for anonymous VLAs in r7-457. This patch fixes walk_tree_1 to call the function on the TYPE_DECL, as we do for other decls of a DECL_EXPR. gcc/ChangeLog: PR c++/95552 * tree.c (walk_tree_1): Call func on the TYPE_DECL of a DECL_EXPR. gcc/testsuite/ChangeLog: PR c++/95552 * g++.dg/ext/vla23.C: New test.
2020-06-09tsan: Add optional support for distinguishing volatilesMarco Elver4-12/+109
Add support to optionally emit different instrumentation for accesses to volatile variables. While the default TSAN runtime likely will never require this feature, other runtimes for different environments that have subtly different memory models or assumptions may require distinguishing volatiles. One such environment are OS kernels, where volatile is still used in various places, and often declare volatile to be appropriate even in multi-threaded contexts. One such example is the Linux kernel, which implements various synchronization primitives using volatile (READ_ONCE(), WRITE_ONCE()). Here the Kernel Concurrency Sanitizer (KCSAN), is a runtime that uses TSAN instrumentation but otherwise implements a very different approach to race detection from TSAN: https://github.com/google/ktsan/wiki/KCSAN Due to recent changes in requirements by the Linux kernel, KCSAN requires that the compiler supports tsan-distinguish-volatile (among several new requirements): https://lore.kernel.org/lkml/20200521142047.169334-7-elver@google.com/ gcc/ * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new builtin for volatile instrumentation of reads/writes. (BUILT_IN_TSAN_VOLATILE_READ2): Likewise. (BUILT_IN_TSAN_VOLATILE_READ4): Likewise. (BUILT_IN_TSAN_VOLATILE_READ8): Likewise. (BUILT_IN_TSAN_VOLATILE_READ16): Likewise. (BUILT_IN_TSAN_VOLATILE_WRITE1): Likewise. (BUILT_IN_TSAN_VOLATILE_WRITE2): Likewise. (BUILT_IN_TSAN_VOLATILE_WRITE4): Likewise. (BUILT_IN_TSAN_VOLATILE_WRITE8): Likewise. (BUILT_IN_TSAN_VOLATILE_WRITE16): Likewise. * tsan.c (get_memory_access_decl): Argument if access is volatile. If param tsan-distinguish-volatile is non-zero, and access if volatile, return volatile instrumentation decl. (instrument_expr): Check if access is volatile. gcc/testsuite/ * c-c++-common/tsan/volatile.c: New test.
2020-06-09PowerPC: PowerPC tests: Add prefixed/pcrel tests.Michael Meissner1-0/+19
testsuite/ 2020-06-09 Michael Meissner <meissner@linux.ibm.com> * lib/target-supports.exp (check_effective_target_powerpc_pcrel): New. (check_effective_target_powerpc_prefixed_addr): New.
2020-06-09Implement loop_ranger::range_of_stmt to use SCEV when evaluating PHI's.Aldy Hernandez4-2/+33
2020-06-09Remove dead codeRichard Biener1-42/+0
This removes dead code left over from the reduction vectorization refactoring last year. 2020-06-09 Richard Biener <rguenther@suse.de> * tree-vect-loop.c (vectorizable_induction): Remove dead code.
2020-06-09d: Merge upstream dmd 13d67c575.Iain Buclaw25-57/+843
Reviewed-on: https://github.com/dlang/dmd/pull/11224 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 13d67c575. * d-builtins.cc (build_frontend_type): Update call to TypeVector::create. * d-frontend.cc (Global::_init): Move setting of errorLimit to ... * d-lang.cc (d_init_options): ... here. Update for new field location of errorLimit. (d_post_options): Likewise. * d-port.cc (Port::readwordLE): Update signature. (Port::readwordBE): Likewise. (Port::readlongLE): Likewise. (Port::readlongBE): Likewise. * decl.cc (get_symbol_decl): Update for new field types.
2020-06-09c++: Tweak predeclare_vla.Jason Merrill1-1/+2
We only need to predeclare a VLA type if it's wrapped in a pointer type; otherwise gimplify_type_sizes will handle it. gcc/cp/ChangeLog: PR c++/95552 * cp-gimplify.c (predeclare_vla): Only predeclare a VLA if it's wrapped in a pointer type.
2020-06-09openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)Tobias Burnus1-3/+3
gcc/ChangeLog: * omp-offload.c (add_decls_addresses_to_decl_constructor, omp_finish_file): With in_lto_p, stream out all offload-table items even if the symtab_node does not exist.
2020-06-09Remove dead codeRichard Biener1-43/+0
This removes dead code that was left over from the reduction vectorization refactoring last year. 2020-06-09 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vect_transform_stmt): Remove dead code.
2020-06-09Fix some ChangeLog entriesPatrick Palka2-2/+2
2020-06-09gcov-dump: fix --help spacingMartin Liska1-1/+1
Pushed to master. gcc/ChangeLog: * gcov-dump.c (print_usage): Fix spacing for --raw option in --help.
2020-06-09sanitizer: do not inline no-sanitize into sanitizer fnMartin Liska6-14/+103
gcc/ChangeLog: * cif-code.def (ATTRIBUTE_MISMATCH): Rename to... (SANITIZE_ATTRIBUTE_MISMATCH): ...this. * ipa-inline.c (sanitize_attrs_match_for_inline_p): Handle all sanitizer options. (can_inline_edge_p): Use renamed CIF_* enum value. gcc/testsuite/ChangeLog: * c-c++-common/asan/inline.c: New test. * c-c++-common/asan/inline-kernel.c: New test. * c-c++-common/tsan/inline.c: New test. * c-c++-common/ubsan/inline.c: New test.
2020-06-09AArch64+SVE: Add support for unpacked unary ops and BICJoe Ramsay8-19/+127
MD patterns extended for unary ops ABS, CLS, CLZ, CNT, NEG and NOT to support unpacked vectors. Also extended patterns for BIC to support unpacked vectors where input elements are of the same width. gcc/ChangeLog: 2020-06-09 Joe Ramsay <joe.ramsay@arm.com> * config/aarch64/aarch64-sve.md (<optab><mode>2): Add support for unpacked vectors. (@aarch64_pred_<optab><mode>): Add support for unpacked vectors. (@aarch64_bic<mode>): Enable unpacked BIC. (*bic<mode>3): Enable unpacked BIC. gcc/testsuite/ChangeLog: 2020-06-09 Joe Ramsay <joe.ramsay@arm.com> * gcc.target/aarch64/sve/logical_unpacked_abs.c: New test. * gcc.target/aarch64/sve/logical_unpacked_bic_1.c: New test. * gcc.target/aarch64/sve/logical_unpacked_bic_2.c: New test. * gcc.target/aarch64/sve/logical_unpacked_bic_3.c: New test. * gcc.target/aarch64/sve/logical_unpacked_bic_4.c: New test. * gcc.target/aarch64/sve/logical_unpacked_neg.c: New test. * gcc.target/aarch64/sve/logical_unpacked_not.c: New test.
2020-06-09gcov: improve --coverage small exampleMartin Liska1-1/+2
Pushed to master. gcc/ChangeLog: PR gcov-profile/95365 * doc/gcov.texi: Compile and link one example in 2 steps.
2020-06-09[Ada] Missing check on private overriding of dispatching primitiveJavier Miranda5-12/+47
2020-06-09 Javier Miranda <miranda@adacore.com> gcc/ada/ * sem_ch6.adb (New_Overloaded_Entity): Add missing call to check subtype conformance of overriding dispatching primitive. * sem_eval.adb (Subtypes_Statically_Match): Handle derivations of private subtypes. * libgnat/g-exptty.adb, libgnat/g-exptty.ads (Set_Up_Communications): Fix the profile since null-exclusion is missing in the access type formals. * sem_disp.ads (Check_Operation_From_Private_View): Adding documentation.
2020-06-09[Ada] Small enhancement in XEinfo utilityEric Botcazou2-16/+44
2020-06-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * einfo.ads (XEINFO section): Update format description. (Is_Subprogram_Or_Entry): Move pragma to regular section. (Is_Subprogram_Or_Generic_Subprogram): Likewise. * xeinfo.adb (Get_B4): Rename to... (Get_B0): ...this. (Translate_Expr): New procedure extracted from... (XEinfo): ...here. Try to apply Get_B0 first and then call Translate_Expr to translate supported constructs.
2020-06-09[Ada] Implement AI12-0028: Import of variadic C functionsEric Botcazou10-107/+278
2020-06-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch6.adb (Freeze_Subprogram): Deal with convention C_Family. * freeze.adb (Freeze_Profile): Likewise. Add missing guard. * sem_mech.adb (Set_Mechanisms): Likewise. * lib-xref.adb (Output_Import_Export_Info): Ditto for C_Variadic. * repinfo.adb (List_Subprogram_Info): Likewise. * sem_prag.adb (Set_Convention_From_Pragma): Move main checks for Stdcall to... (Process_Convention): ...here. Add checks for C_Variadic. * snames.ads-tmpl: Add Name_C_Variadic_0 .. Name_C_Variadic_16. Use consistent format for subtype declarations. (Convention_Id): Add Convention_C_Variadic_0 .. C_Variadic_16 and move Convention_CPP up. (Convention_C_Family): New subtype of Convention_Id. (Convention_C_Variadic): Likewise. (Foreign_Convention): Use explicit upper bound. Add pragma Inline for Is_Configuration_Pragma_Name, Is_Function_Attribute_Name, Is_Internal_Attribute_Name and Is_Procedure_Attribute_Name. * snames.adb-tmpl (Get_Convention_Id): Deal with Name_Variadic_n. (Get_Convention_Name): Deal with Convention_Variadic_n. * types.h (Convention_Id): New typedef. * xsnamest.adb (Name2): New variable. (Is_Conv): New pattern. (Get_Subt1): Likewise. (Get_Subt2): Likewise. Output subtypes of Convention_Id into the C header file.
2020-06-09[Ada] Code clean ups and comments updatesArnaud Charlet6-4/+17
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_ch3.adb, exp_ch4.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, exp_util.adb: Add comments related to errors that should be moved to semantic analysis. Also replace "?" with "??" in warning messages.
2020-06-09[Ada] Improve handling of null unbounded stringsArnaud Charlet2-42/+13
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-strunb__shared.ads, libgnat/a-strunb__shared.adb (Reference, Unreference): No-op for Empty_Shared_String. Remove unneeded calls to Reference.
2020-06-09[Ada] Remove kludge for AI05-0087Arnaud Charlet2-41/+14
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_ch5.adb (Expand_N_Assignment): Remove kludge for AI05-0087. * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0087 retroactively since it's a binding interpretation.
2020-06-09[Ada] Small cleanup in Einfo unitEric Botcazou2-114/+173
2020-06-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * einfo.ads (Has_Foreign_Convention): Fix description. (Component_Alignment): Move around. (Has_DIC): Likewise. (Has_Interrupt_Handler): Likewise. (Has_Invariants): Likewise. (Is_Atomic_Or_VFA): Likewise. (Next_Index): Likewise. (Scope_Depth): Likewise. (Init_Component_Size): Likewise. (Init_Component_Location): Likewise. (Init_Size): Likewise. (Inline Pragmas for functions): Add Corresponding_Function, Corresponding_Procedure, Entry_Max_Queue_Lengths_Array, Finalize_Storage_Only, Has_DIC, Has_Invariants, Initialization_Statements, Is_Anonymous_Access_Type, Next_Stored_Discriminant, Address_Clause, Alignment_Clause, Float_Rep, Has_Foreign_Convention, Has_Non_Limited_View, Is_Constant_Object, Is_Discriminal, Is_Finalizer, Is_Null_State, Is_Prival, Is_Protected_Component, Is_Protected_Record_Type, Is_Subprogram_Or_Entry, Is_Task_Record_Type, Size_Clause, Stream_Size_Clause, Type_High_Bound, Type_Low_Bound, Known_*, Unknown_*. (Inline Pragmas for procedures): Add Set_Corresponding_Function, Set_Corresponding_Procedure, Set_Finalize_Storage_Only, Set_Float_Rep, Set_Initialization_Statements, Init_Normalized_First_Bit, Init_Normalized_Position, Init_Normalized_Position_Max. * einfo.adb (Was_Hidden): Move around. (Is_Packed_Array): Likewise. (Model_Emin_Value): Likewise. (Model_Epsilon_Value): Likewise. (Model_Mantissa_Value): Likewise. (Model_Small_Value): Likewise.
2020-06-09[Ada] Ada2020 AI12-0282: Shared variable control aspects in genericsEd Schonberg1-2/+21
2020-06-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Check_Shared_Variable_Control_Aspects): Require exact match between formal and actual for aspects Atomic and Volatile only for formal derived types.
2020-06-09[Ada] Improve handling of aggregates in Side_Effect_FreeArnaud Charlet1-0/+6
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_util.adb (Side_Effect_Free): Improve handling of N_Aggregate.