aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-10-15[nvptx, testsuite] Xfail stack atomicsTom de Vries3-0/+3
Nvptx currently doesn't support atomics if it involves a stack address. PR97444 is open about. Xfail corresponding execution fails in gcc.dg/atomic. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.dg/atomic/c11-atomic-exec-6.c: Xfail execution for nvptx. * gcc.dg/atomic/c11-atomic-exec-7.c: Same. * gcc.dg/atomic/stdatomic-op-5.c: Same.
2020-10-15Fix fndecl's for fortran coarray calls.Andre Vehreschild1-38/+38
gcc/fortran/ChangeLog: * trans-decl.c (gfc_build_builtin_function_decls): Fix the coarray fndecls.
2020-10-15[nvptx] Remove -m32Tom de Vries3-31/+8
The nvptx port has an -m32 option, but it's not clear whether this was ever build/tested/used. Don't expose to user anymore. Tested on nvptx. gcc/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> PR target/97436 * config/nvptx/nvptx.opt (m32): Comment out. * doc/invoke.texi (NVPTX options): Remove -m32. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> PR target/97436 * gcc.target/nvptx/atomic_fetch-3.c: Remove.
2020-10-15Fix toplevel comment of attr-fnspec.hJan Hubicka1-5/+7
gcc/ChangeLog: 2020-10-15 Jan Hubicka <hubicka@ucw.cz> Richard Biener <rguenther@suse.de> * attr-fnspec.h: Fix toplevel comment.
2020-10-15fix TARGET_MEM_REF dumpingRichard Biener1-2/+1
This fixes the missing constant offset from TARGET_MEM_REF dumping. 2020-10-15 Richard Biener <rguenther@suse.de> * tree-pretty-print.c (dump_mem_ref): Print constant offset also for TARGET_MEM_REF.
2020-10-15Also accept symbols in other partition in symtab_node::binds_to_current_def_pJan Hubicka1-1/+1
* symtab.c (symtab_node::binds_to_current_def_p): Also accept symbols defined in other partition.
2020-10-15libgomp: Amend documentation for omp_get_max_active_levels and ↵Kwok Cheung Yeung1-3/+3
omp_get_supported_active_levels 2020-10-15 Kwok Cheung Yeung <kcy@codesourcery.com> libgomp/ * libgomp.texi (omp_get_max_active_levels): Modify description. (omp_get_supported_active_levels): Make descriptions consistent.
2020-10-15Fix ICE in vectorizable_live_operationRichard Biener2-2/+20
This fixes the case where the insertion iterator for the live stmt is the end of a BB by adjusting the dominance query to the definition of the def we're substituting. 2020-10-15 Richard Biener <rguenther@suse.de> * tree-vect-loop.c (vectorizable_live_operation): Adjust dominance query. * gcc.dg/vect/bb-slp-52.c: New testcase.
2020-10-15[Ada] Spurious visibility on private with packageArnaud Charlet3-8/+11
gcc/ada/ * sem_ch10.adb (Install_With_Clause): Fix implementation of Ada 2005 AI-262 by taking into account generic packages. Minor reformatting. * libgnat/a-cbhase.ads, libgnat/a-cbhase.adb: Remove use clause on runtime unit spec.
2020-10-15[Ada] Wrong use of Scope_Depth_ValueArnaud Charlet3-20/+32
gcc/ada/ * einfo.ads, einfo.adb (Scope_Depth_Value, Set_Scope_Depth_Value): Add assertions on valid nodes and update documentation accordingly. (Write_Field22_Name): Sync with change in Scope_Depth_Value. * sem_ch8.adb (Find_Direct_Name): Fix call to Scope_Depth_Value.
2020-10-15[Ada] Ada2020: AI12-0003 Specifying the standard storage poolJavier Miranda2-3/+20
gcc/ada/ * sem_prag.adb (Analyze_Pragma): Adding semantic support of Standard to Default_Storage_Pool. * freeze.adb (Freeze_Entity): If pragma Default_Storage_Pool applies and it is set to Standard then use the global pool as the associated storage pool of the access type.
2020-10-15[Ada] Cleanup definition of Might_Have_TasksJavier Miranda3-11/+10
gcc/ada/ * exp_ch6.ads (Might_Have_Tasks): Update documentation. * exp_ch6.adb (Might_Have_Tasks): Return also true when the type has tasks. (Make_Build_In_Place_Call_In_Allocator): Code cleanup. * exp_ch3.adb (Ensure_Activation_Chain_And_Master, Expand_N_Full_Type_Declaration, Expand_N_Object_Declaration): Code cleanup.
2020-10-15[Ada] Get finalization right when a function returns a function callSteve Baird6-20/+40
gcc/ada/ * checks.adb (Apply_Predicate_Check): Generate "infinite recursion" warning message even if run-time predicate checking is disabled. * exp_ch6.adb (Expand_Simple_Function_Return): In testing whether the returned expression is a function call, look for the case where the call has been transformed into a dereference of an access value that designates the result of a function call. * sem_ch3.adb (Analyze_Object_Declaration): Legality checking for a static expression is unaffected by assertion policy (and, in particular, enabling/disabling of subtype predicates. To get the right legality checking, we need to call Check_Expression_Against_Static_Predicate for a static expression even if predicate checking is disabled for the given predicate-bearing subtype. On the other hand, we don't want to call Make_Predicate_Check unless predicate checking is enabled. * sem_ch7.adb (Uninstall_Declarations.Preserve_Full_Attributes): Preserve the Predicates_Ignored attribute. * sem_eval.adb (Check_Expression_Against_Static_Predicate): Previously callers ensured that this procedure was only called if predicate checking was enabled; that is no longer the case, so predicates-disabled case must be handled. * sem_prag.adb (Analyze_Pragma): Fix bug in setting Predicates_Ignored attribute in Predicate pragma case.
2020-10-15[Ada] Crash on subtype of fixed-point typeEd Schonberg1-11/+10
gcc/ada/ * freeze.adb (Freeze_Fixed_Point_Type): Do not scale the bounds of a declared subtype using the 'Small of the type; this is done during resolution of the bound itself, unlike what is done for the bounds of the base type, which are used to determine its required size. Previous code performed this scaling twice, leading to meaningless values for such a subtype.
2020-10-15[Ada] Fix access to uninitialized global variable when emitting errorPiotr Trojanek1-1/+1
gcc/ada/ * sem_util.adb (Bad_Predicated_Subtype_Use): Emit an unconditional error, not a conditional warning.
2020-10-15[Ada] Cleanup defensive guards for Null_Exclusion_PresentPiotr Trojanek1-11/+13
gcc/ada/ * sem_ch3.adb (Process_Subtype): Combine guards for Null_Exclusion_Present in May_Have_Null_Exclusion; use this combined guard when checking AI-231.
2020-10-15[Ada] Bring defensive guard for Null_Exclusion_Present up to datePiotr Trojanek1-9/+13
gcc/ada/ * sem_ch3.adb (Process_Subtype): Sync May_Have_Null_Exclusion with assertion in Null_Exclusion_Present; clarify the scope of local variables.
2020-10-15[Ada] Explain predicate function not being inherited by index typePiotr Trojanek1-10/+15
gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration): Fix style. (Make_Index): Refactor to avoid repeated detection of subtype indication; add comment.
2020-10-15[Ada] Adjust style in support for CUDA_Execute pragmaPiotr Trojanek1-8/+8
gcc/ada/ * sem_prag.adb (Is_Acceptable_Dim3): Use Is_RTE to not pull CUDA package unless necessary; rename local Tmp variable; iterate with procedural Next.
2020-10-15[Ada] Avoid unnecessary (re)assignments in Make_InfoPiotr Trojanek2-16/+13
gcc/ada/ * sem_ch3.adb (Array_Type_Declaration): Refine type of a local variable. (Make_Index): Simplify to avoid assignment with a type entity and then backtracking by reassigning to Empty; remove excessive whitespace. * sem_ch9.adb (Analyze_Entry_Body): Remove extra parens.
2020-10-15[Ada] Remove excessive defensive calls to Is_TypePiotr Trojanek1-3/+1
gcc/ada/ * sem_ch3.adb (Access_Subprogram_Declaration): Remove extra parens. (Make_Index): Remove excessive calls to Is_Type.
2020-10-15[Ada] Code cleanupArnaud Charlet1-11/+2
gcc/ada/ * sem_util.adb (Enter_Name): Remove unnecessary conditions in Enter_Name that come from the beginning of times.
2020-10-15[Ada] Remove obsolete DSP commentBob Duff1-9/+8
gcc/ada/ * exp_ch6.adb (Expand_Simple_Function_Return): Remove DSP part of comment, and reformat.
2020-10-15[Ada] Do not expand 'Initialized in codepeer modeBoris Yakobowski1-0/+8
gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Do not expand 'Initialized in CodePeer mode.
2020-10-15[Ada] Assert failure on incorrect codeArnaud Charlet1-1/+6
gcc/ada/ * sem_ch12.adb (Reset_Entity): Protect against malformed tree.
2020-10-15[Ada] Double evaluation of predicateArnaud Charlet1-1/+1
gcc/ada/ * sem_ch13.adb (Add_Predicates): Prevent analyzing twice the same pragma in case an inner package references the type with a predicate (as opposed to defining the type).
2020-10-15[Ada] Do not use maximal values from System in runtime unitsEric Botcazou5-9/+5
gcc/ada/ * libgnat/a-cfinve.adb (Int): Use subtype of Long_Long_Integer. * libgnat/a-cofove.adb (Int): Likewise. * libgnat/a-cgcaso.adb (T): Likewise. * libgnat/a-cogeso.adb (T): Likewise. * libgnat/g-debpoo.ads (Byte_Count): Use Long_Long_Integer'Size.
2020-10-15[Ada] Simplify membership tests with N_Entity subtypePiotr Trojanek1-10/+3
gcc/ada/ * sem_ch12.adb: Replace list of N_Defining_... enumerations with N_Entity.
2020-10-15[Ada] Refine type from Nat to Pos in Make_IndexPiotr Trojanek2-6/+6
gcc/ada/ * sem_ch3.ads, sem_ch3.adb (Make_Index): Refined type of parameter. (Constrain_Index): Likewise. (Array_Type_Declaration): Refine type of a local counter variable; remove a trivially useless initialization.
2020-10-15[Ada] Fix range check on constrained array with expanded index namePiotr Trojanek1-2/+2
gcc/ada/ * sem_ch3.adb (Analyze_Subtype_Declaration): Recognize both identifiers and expanded names; use high-level Is_Scalar_Type instead of low-level membership test.
2020-10-15[Ada] Add support for compile time evaluation of Shift_Right_ArithmeticArnaud Charlet2-50/+127
gcc/ada/ * sem_eval.adb (Eval_Intrinsic_Call, Fold_Shift): Add support for Shift_Right_Arithmetic and for signed integers. * exp_ch4.adb (Expand_N_Op_Rotate_Left, Expand_N_Op_Rotate_Right, Expand_N_Op_Shift_Left, Expand_N_Op_Shift_Right_Arithmetic): Minor reformatting and code cleanup to ensure a consistent handling. Update comments and add assertion.
2020-10-15[Ada] Ada2020: AI12-0180 Using subprograms and entries in invariantsBob Duff2-10/+19
gcc/ada/ * sem_ch13.adb (Visible_Component): Enable this code for task and protected types, as well as record and private types. * sem_ch13.ads (Replace_Type_References_Generic): Update comment. Move the efficiency comment into the body, because it's about the implementation.
2020-10-15[Ada] Warn on unknown aspectArnaud Charlet2-6/+8
gcc/ada/ * par-ch13.adb (Get_Aspect_Specifications): Generate a warning rather than an error on unknown aspects unless -gnatd2 is used. (Aspect_Specifications_Present): Improve detection of unknown aspects. * debug.adb (Debug_Flag_2): Update document.
2020-10-15[Ada] Complete support for static intrinsic functionsArnaud Charlet1-0/+1
gcc/ada/ * sem_res.adb (Resolve_Call): Do not try to inline intrinsic calls.
2020-10-15[Ada] Ada_2020: Add aspect Aggregate to standard container unitsEd Schonberg24-26/+200
gcc/ada/ * exp_aggr.adb (Expand_N_Aggregate): A record aggregate requires a non-private type. * sem_ch13.adb (Valid_Assign_Indexed): New subprogram local to Resolve_Aspect_Aggregate, to handle the case when the corresponding name appearing in the aspect specification for an indexed aggregate is an overloaded operation. * libgnat/a-convec.ads, libgnat/a-convec.adb, libgnat/a-coinve.ads, libgnat/a-coinve.adb, libgnat/a-cobove.ads, libgnat/a-cobove.adb, libgnat/a-cdlili.ads, libgnat/a-cdlili.adb, libgnat/a-cbdlli.ads, libgnat/a-cbdlli.adb, libgnat/a-cohama.ads, libgnat/a-cihama.ads, libgnat/a-cbhama.ads, libgnat/a-cborma.ads, libgnat/a-ciorma.ads, libgnat/a-coorma.ads, libgnat/a-cihase.ads, libgnat/a-cohase.ads, libgnat/a-cbhase.ads, libgnat/a-cborse.ads, libgnat/a-ciorse.ads, libgnat/a-coorse.ads: Add Ada_2020 aspect Aggregate to types declared in standard containers, as well as new subprograms where required.
2020-10-15[Ada] Add iterators over GNAT.Array_Split.Slice_SetArnaud Charlet2-11/+51
gcc/ada/ * libgnat/g-arrspl.ads, libgnat/g-arrspl.adb (Create, First_Cursor, Advance, Has_Element): New.
2020-10-15[Ada] AI12-0385 Predefined shifts and rotates should be staticArnaud Charlet4-4/+212
gcc/ada/ * Makefile.rtl: Add target pair for interfac.ads. * libgnat/interfac.ads: Add a comment. * libgnat/interfac__2020.ads: New, used for bootstrap purposes. * sem_util.adb (Is_Static_Function): Always return False for pre Ada 2020 to e.g. ignore the Static aspect in Interfaces for Ada < 2020.
2020-10-15[Ada] Do not remove side effects from any object declarations in SPARKPiotr Trojanek1-10/+9
gcc/ada/ * exp_util.adb (Remove_Side_Effects): Move special-casing for GNATprove to be applied to all object declarations.
2020-10-15tree-optimization/97482 - fix split_constant_offset of nop-conversionsRichard Biener3-1/+48
split_constant_offset is confused about a nop-conversion from unsigned long to sizetype and tries to prove non-overflowing of the inner operation. Obviously the conversion could have been elided so make sure split_constant_offset handles this properly. It also makes sure that convert_to_ptrofftype does not introduce conversions not necessary which in this case is the source for the unnecessary conversion. 2020-10-15 Richard Biener <rguenther@suse.de> PR tree-optimization/97482 * tree-data-ref.c (split_constant_offset_1): Handle trivial conversions better. * fold-const.c (convert_to_ptrofftype_loc): Elide conversion if the offset is already ptrofftype_p. * gcc.dg/vect/pr97428.c: New testcase.
2020-10-15[nvptx, testsuite] Remove xfail for PR84958Tom de Vries1-1/+1
The xfail in gcc.dg/tree-ssa/pr84512.c for PR84958 has started to xpass, presumably because of commit 744fd446c32 "tree-ssa-sccvn.c (class pass_fre): Add may_iterate pass parameter". Remove the xfail. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.dg/tree-ssa/pr84512.c: Remove xfail for nvptx.
2020-10-15[nvptx, testsuite] Fix xpass with ident-0b.cTom de Vries1-0/+1
For nvptx, I see: ... XPASS: c-c++-common/ident-0b.c -Wc++-compat scan-assembler-not GCC: ... Fix this by requiring effective target ident_directive. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * c-c++-common/ident-0b.c: Require effective target ident_directive.
2020-10-15[nvptx, testsuite] Remove dg-skip-if for ptxas oomTom de Vries1-1/+0
There's a dg-skip-if for nvptx that is related to ptxas oom. If I remove it, the test-case passes for me (with ptxas from cuda 9.1). I've tested it on a range of cudas, from 5.0 to 11.1 and did not manage to reproduce the fail. Remove the dg-skip-if. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.c-torture/compile/limits-externdecl.c: Remove dg-skip-if for nvptx.
2020-10-15[nvptx, testsuite] Disable default xfailsTom de Vries2-3/+3
For nvptx, I run into a couple of XPASSes due to nvptx not being listed in: ... { xfail { ! { long list of targets } } } ... Add nvptx to the list to get a PASS. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.dg/attr-alloc_size-11.c: Don't xfail for nvptx. * gcc.dg/tree-ssa/20040204-1.c: Same.
2020-10-15[nvptx, testsuite] Remove dg-skip-if for ptxas crash fixed in cuda 8.0Tom de Vries1-1/+0
The test-case gcc.c-torture/execute/pr68185.c has a dg-skip-if for nvptx due to "ptxas crashes or executes incorrectly". I've managed to reproduce the problem using cuda 7.5: ... FAIL: gcc.c-torture/execute/pr68185.c -O0 (test for excess errors) Excess errors: nvptx-as: ptxas terminated with signal 11 [Segmentation fault], core dumped ... but it's fixed starting cuda 8.0. Remove the dg-skip-if. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.c-torture/execute/pr68185.c: Remove dg-skip-if for nvptx.
2020-10-15[nvptx, testsuite] Remove dg-skip-if for ptxas crashesTom de Vries1-2/+0
There's a dg-skip-if for nvptx that is related to a ptxas crash. If I remove it, the test-case passes for me (with ptxas from cuda 9.1). I've tested this on a range of cudas, from 5.0 to 11.1 and did not manage to reproduce the fail. Remove the dg-skip-if. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.c-torture/execute/981019-1.c: Remove dg-skip-if for nvptx.
2020-10-15[nvptx, testsuite] Remove xpassing xfails for ptxas crashesTom de Vries6-6/+0
There's a couple of nvptx xfails that are related to ptxas crashes, which are xpassing for me (with ptxas from cuda 9.1). I've tested these on a range of cudas, from 5.0 to 11.1 and did not manage to reproduce the fails. Remove the xfails. Tested on nvptx. gcc/testsuite/ChangeLog: 2020-10-15 Tom de Vries <tdevries@suse.de> * gcc.c-torture/compile/pr42717.c: Remove nvptx xfail. * gcc.c-torture/compile/pr61684.c: Same. * gcc.c-torture/execute/pr20601-1.c: Same. * gcc.c-torture/execute/pr52129.c: Same. * gcc.c-torture/execute/pr59221.c: Same. * gcc.dg/pr68671.c: Same.
2020-10-15testsuite: Partially fix up modref-*.c testsJakub Jelinek2-11/+13
This ia a partial attempt to fix: FAIL: gcc.dg/ipa/modref-1.c (test for excess errors) FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 1" FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 2" FAIL: gcc.dg/tree-ssa/modref-4.c (test for excess errors) FAIL: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref1 "param offset: 1" UNRESOLVED: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref2 "param offset: 2" UNRESOLVED: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref2 "return 0" The return 0 scan still FAILs. 2020-10-15 Jakub Jelinek <jakub@redhat.com> * gcc.dg/ipa/modref-1.c: Remove space between param offset: and number in scan-ipa-dump. (b): Declare return type to void. (main): Declare return type to int. Change c to array of 3 chars. * gcc.dg/tree-ssa/modref-4.c: Remove space between param offset: and number in scan-ipa-dump. Use modref1 instead of modref2. (b): Declare return type to void. (main): Declare return type to int. Change c to array of 3 chars.
2020-10-15IPA: fix profile handling in IRAMartin Liska2-3/+4
gcc/ChangeLog: PR ipa/97295 * profile-count.c (profile_count::to_frequency): Move part of gcc_assert to STATIC_ASSERT. * regs.h (REG_FREQ_FROM_BB): Do not use count.to_frequency for a function that does not have count_max initialized.
2020-10-15params: Fix up help.exp testingJakub Jelinek1-1/+1
This patch fixes: Running /usr/src/gcc/gcc/testsuite/gcc.misc-tests/help.exp ... FAIL: compiler driver --help=params option(s): "[^.]$" absent from output: "y" FAIL: compiler driver --help=param option(s): "^ +-.*[^:.]$" absent from output: " --param-ipa-jump-function-lookups= Maximum number of statements visited during jump function offset discovery" 2020-10-15 Jakub Jelinek <jakub@redhat.com> * params.opt (-param-ipa-jump-function-lookups=): Add full stop at the end of the parameter description.
2020-10-15RISC-V: Add support for -mcpu option.Kito Cheng15-61/+356
- The behavior of -mcpu basically equal to -march plus -mtune, but it has lower priority than -march and -mtune. - The behavior and available options has sync with clang except we don't add few LLVM specific value, and add more sifive processor to the list. - -mtune also accept all available options of -mcpu, and use it setting. gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_cpu_tables): New. (riscv_arch_str): Return empty string if current_subset_list is NULL. (riscv_find_cpu): New. (riscv_handle_option): Verify option value of -mcpu. (riscv_expand_arch): Using std::string. (riscv_default_mtune): New. (riscv_expand_arch_from_cpu): Ditto. * config/riscv/riscv-cores.def: New. * config/riscv/riscv-protos.h (riscv_find_cpu): New. (riscv_cpu_info): New. * config/riscv/riscv.c (riscv_tune_info): Rename ... (riscv_tune_param): ... to this. (riscv_cpu_info): Rename ... (riscv_tune_info): ... to this. (tune_info): Rename ... (tune_param): ... to this. (rocket_tune_info): Update data type name. (sifive_7_tune_info): Ditto. (optimize_size_tune_info): Ditto. (riscv_cpu_info_table): Rename ... (riscv_tune_info_table): ... to this. (riscv_parse_cpu): Rename ... (riscv_parse_tune): ... to this, and translate valid -mcpu option to -mtune option. (riscv_rtx_costs): Rename tune_info to tune_param. (riscv_class_max_nregs): Ditto. (riscv_memory_move_cost): Ditto. (riscv_init_machine_status): Use value of -mcpu if -mtune is not given, and rename tune_info to tune_param. * config/riscv/riscv.h (riscv_expand_arch_from_cpu): New. (riscv_default_mtune): Ditto. (EXTRA_SPEC_FUNCTIONS): Add riscv_expand_arch_from_cpu and riscv_default_mtune. (OPTION_DEFAULT_SPECS): Handle default value of -march/-mabi. (DRIVER_SELF_SPECS): Expand -march from -mcpu if -march is not given. * config/riscv/riscv.opt (-mcpu): New option. * config/riscv/t-riscv ($(common_out_file)): Add riscv-cores.def to dependency. * doc/invoke.texi (RISC-V Option): Add -mcpu, and update the description of default value for -mtune and -march. gcc/testsuite/ChangeLog: * gcc.target/riscv/mcpu-1.c: New. * gcc.target/riscv/mcpu-2.c: Ditto. * gcc.target/riscv/mcpu-3.c: Ditto. * gcc.target/riscv/mcpu-4.c: Ditto. * gcc.target/riscv/mcpu-5.c: Ditto. * gcc.target/riscv/mcpu-6.c: Ditto. * gcc.target/riscv/mcpu-7.c: Ditto.