aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-09-20[Ada] Add SPARK_Mode => Off to System.File_Control_BlockClaire Dross1-1/+1
gcc/ada/ * libgnat/s-ficobl.ads: The entire package has a SPARK_Mode => Off aspect.
2021-09-20[Ada] Use OS_Time for interface to TZ functions.Doug Rupp3-22/+21
gcc/ada/ * libgnat/a-calend.adb: Remove time_t, replace with OS_Time. * libgnat/s-os_lib.ads: Fix comments regarding time_t conversion functions to reflect the use of To_Ada in in Ada.Calendar package body. * sysdep.c (__gnat_localtime_tzoff): Use OS_Time instead of time_t.
2021-09-20[Ada] Accept volatile expressions as non-scalar actual parametersPiotr Trojanek1-26/+0
gcc/ada/ * sem_res.adb (Resolve_Actual): Remove
2021-09-20[Ada] Clean up Uint fields, remove unused routinesBob Duff22-485/+325
gcc/ada/ * einfo-utils.ads, einfo-utils.adb, fe.h, einfo.ads, gen_il-fields.ads: Remove unused and no-longer-used routines. Move related routines together. Rewrite incorrect documentation, and documentation that will be incorrect when e.g. Esize-related routines are fixed. Remove unused field Normalized_Position_Max. * cstand.adb, exp_pakd.adb, freeze.adb, gen_il-gen-gen_entities.adb, itypes.adb, layout.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb, sem_prag.adb, sem_util.adb, ttypes.ads: Update calls to routines removed from or renamed in Einfo.Utils. * uintp.ads (Upos): Fix this subtype, which was unintentionally declared to include Uint_0.
2021-09-20[Ada] Cleanups related to building of dispatch tablesPiotr Trojanek2-2/+2
gcc/ada/ * exp_ch7.adb (Expand_N_Package_Declaration): Fix wording in comment. * exp_disp.adb (Mark_DT): Remove unnecessary initialization of I_Depth.
2021-09-20[Ada] Accept volatile properties on constant objectsPiotr Trojanek2-55/+29
gcc/ada/ * contracts.adb (Add_Contract_Item): Accept volatile-related properties on constants. (Analyze_Object_Contract): Check external properties on constants; accept volatile constants. (Check_Type_Or_Object_External_Properties): Replace "variable" with "object" in error messages; replace Decl_Kind with a local constant. * sem_prag.adb (Analyze_Pragma): Accept volatile-related properties on constants.
2021-09-20[Ada] SPARK proof of the Ada.Strings.Fixed libraryPierre-Alexandre Bazin4-349/+1166
gcc/ada/ * libgnat/a-strfix.adb ("*"): Added loop invariants and lemmas for proof. (Delete): Added assertions for proof, and conditions to avoid overflow. (Head): Added loop invariant. (Insert): Same as Delete. (Move): Declared with SPARK_Mode Off. (Overwrite): Added assertions for proof, and conditions to avoid overflow. (Replace_Slice): Added assertions for proof, and conditions to avoid overflow. (Tail): Added loop invariant and avoided overflows. (Translate): Added loop invariants. (Trim): Ensured empty strings returned start at 1. * libgnat/a-strfix.ads (Index): Rewrote contract cases for easier proof. (Index_Non_Blank): Separated the null string case. (Count): Specified Mapping shouldn't be null. (Find_Token): Specified Source'First should be Positive when no From is given. (Translate): Specified Mapping shouldn't be null. ("*"): Rewrote postcondition for easier proof. * libgnat/a-strsea.adb (Belongs): Added postcondition. (Count): Rewrote loops and added loop invariants to avoid overflows. (Find_Token): Added loop invariants. (Index): Rewrote loops to avoid overflows and added loop invariants for proof. (Index_Non_Blank): Added loop invariants. (Is_Identity): New function isolated without SPARK_Mode. * libgnat/a-strsea.ads: Fix starting comment as package is no longer private. (Match): Declared ghost expression function Match. (Is_Identity): Described identity in the postcondition. (Index, Index_Non_Blank, Count, Find_Token): Added contract from a-strfix.ads.
2021-09-20[Ada] Minor style fixes in Resolve_Aspect_AggregatePiotr Trojanek1-9/+11
gcc/ada/ * sem_ch13.adb (Resolve_Aspect_Aggregate): Move comments after specs; fix typo in header box; cleanup whitespace.
2021-09-20[Ada] Adjust latest change for ELF platformsEric Botcazou1-6/+5
gcc/ada/ * libgnat/s-objrea.adb (Get_Load_Address): Return 0 for ELF.
2021-09-20[Ada] Add support for PE-COFF PIE to System.Dwarf_LineEric Botcazou5-67/+111
gcc/ada/ * adaint.c (__gnat_get_executable_load_address): Add Win32 support. * libgnat/s-objrea.ads (Get_Xcode_Bounds): Fix typo in comment. (Object_File): Minor reformatting. (ELF_Object_File): Uncomment predicate. (PECOFF_Object_File): Likewise. (XCOFF32_Object_File): Likewise. * libgnat/s-objrea.adb: Minor reformatting throughout. (Get_Load_Address): Implement for PE-COFF. * libgnat/s-dwalin.ads: Remove clause for System.Storage_Elements and use consistent wording in comments. (Dwarf_Context): Set type of Low, High and Load_Address to Address. * libgnat/s-dwalin.adb (Get_Load_Displacement): New function. (Is_Inside): Call Get_Load_Displacement. (Low_Address): Likewise. (Open): Adjust to type change. (Aranges_Lookup): Change type of Addr to Address. (Read_Aranges_Entry): Likewise for Start and adjust. (Enable_Cach): Adjust to type change. (Symbolic_Address): Change type of Addr to Address. (Symbolic_Traceback): Call Get_Load_Displacement.
2021-09-20[Ada] Fix repeated generation of dispatch tables in CodePeer modePiotr Trojanek1-1/+2
gcc/ada/ * exp_disp.adb (Make_DT): Move call to Set_Has_Dispatch_Table, so it is executed regardless of the Generate_SCIL mode.
2021-09-20[Ada] Spurious link error with child unit and different Assertion modes.Ed Schonberg3-3/+51
gcc/ada/ * exp_util.ads (Force_Evaluation): Add formal parameter Discr_Number, to indicate discriminant expression for which an external name must be created. (Remove_Side_Effects): Ditto. * exp_util.adb (Force_Evaluation): Call Remove_Side_Effects with added parameter. (Remove_Side_Effects, Build_Temporary): If Discr_Number is positive, create an external name with suffix DISCR and the given discriminant number, analogous to what is done for temporaries for array type bounds. * sem_ch3.adb (Process_Discriminant_Expressions): If the constraint is for an object or component declaration and the corresponding entity may be visible in another unit, invoke Force_Evaluation with the new parameter.
2021-09-20[Ada] Clean up Uint fields (continued)Arnaud Charlet1-5/+0
gcc/ada/ * gen_il-internals.ads (Invalid_Val): Remove, unused and generates warnings.
2021-09-20[Ada] Refine types of local constants that store Etype resultsPiotr Trojanek4-8/+8
gcc/ada/ * exp_aggr.adb, exp_ch4.adb, exp_ch5.adb, sprint.adb: Refine types of local constants.
2021-09-20[Ada] Implementation of Preelaborable_Initialization attribute for AI12-0409Gary Dismukes10-57/+295
gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Fold Preelaborable_Initialization attribute in cases where it hasn't been folded by the analyzer. * exp_disp.adb (Original_View_In_Visible_Part): This function is removed and moved to sem_util.adb. * sem_attr.adb (Attribute_22): Add Attribute_Preelaborable_Initialization as an Ada 2022 attribute. (Analyze_Attribute, Attribute_Preelaborable_Initialization): Check that the prefix of the attribute is either a formal private or derived type, or a composite type declared within the visible part of a package or generic package. (Eval_Attribute): Perform folding of Preelaborable_Initialization attribute based on Has_Preelaborable_Initialization applied to the prefix type. * sem_ch3.adb (Resolve_Aspects): Add specialized code for Preelaborable_Initialization used at the end of a package visible part for setting Known_To_Have_Preelab_Init on types that are specified with True or that have a conjunction of one or more P_I attributes applied to formal types. * sem_ch7.adb (Analyze_Package_Specification): On call to Has_Preelaborable_Initialization, pass True for new formal Formal_Types_Have_Preelab_Init, so that error checking treats subcomponents that are declared within types in generics as having preelaborable initialization when the subcomponents are of formal types. * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Add test for P_I to prevent calling Make_Pragma_From_Boolean_Aspect, since this aspect is handled specially and the Known_To_Have_Preelab_Init flag will get set on types that have the aspect by other means. (Analyze_Aspect_Specifications.Analyze_One_Aspect): Add test for Aspect_Preelaborable_Initialization for allowing the aspect to be specified on formal type declarations. (Is_Operational_Item): Treat Attribute_Put_Image as an operational attribute. The need for this was encountered while working on these changes. * sem_util.ads (Has_Preelaborable_Initialization): Add Formal_Types_Have_Preelab_Init as a new formal parameter that defaults to False. (Is_Conjunction_Of_Formal_Preelab_Init_Attributes): New function. (Original_View_In_Visible_Part): Moved here from exp_disp.adb, so it can be called by Analyze_Attribute. * sem_util.adb (Has_Preelaborable_Initialization): Return True for formal private and derived types when new formal Formal_Types_Have_Preelab_Init is True, and pass along the Formal_Types_Have_Preelab_Init flag in the array component case. (Check_Components): Pass along Formal_Types_Have_Preelab_Init flag on call to Has_Preelaborable_Initialization. (Is_Conjunction_Of_Formal_Preelab_Init_Attributes): New function that returns True when passed an expression that includes one or more attributes for Preelaborable_Initialization applied to prefixes that denote formal types. (Is_Formal_Preelab_Init_Attribute): New utility function nested within Is_Conjunction_Of_Formal_Preelab_Init_Attributes that determines whether a node is a P_I attribute applied to a generic formal type. (Original_View_In_Visible_Part): Moved here from exp_util.adb, so it can be called by Analyze_Attribute. * snames.ads-tmpl: Add note near the start of spec giving details about what needs to be done when adding a name that corresponds to both an attribute and a pragma. Delete existing occurrence of Name_Preelaborable_Initialization, and add a note comment in the list of Name_* constants at that place, indicating that it's included in type Pragma_Id, etc., echoing other such comments for names that are both an attribute and a pragma. Insert Name_Preelaborable_Initialization in the alphabetized set of Name_* constants corresponding to attributes (between First_Attribute_Name and Last_Attribute_Name). (type Attribute_Id): Add new literal Attribute_Preelaborable_Initialization. (type Pragma_Id): Move Pragma_Preelaborable_Initialization from its current position to the end of the type, in the special set of pragma literals that have corresponding atttributes. Add to accompanying comment, indicating that functions Get_Pragma_Id and Is_Pragma_Name need to be updated when adding a pragma literal to the special set. * snames.adb-tmpl (Get_Pragma_Id): Add case alternative for Pragma_Preelaborable_Initialization. (Is_Pragma_Name): Add test for Name_Preelaborable_Initialization.
2021-09-20[Ada] Fix condition in op interpretation resolutionGhjuvan Lacambre1-1/+1
gcc/ada/ * sem_ch4.adb (Finc_Non_Universal_Interpretations): Fix check.
2021-09-20[Ada] Don't examine all discriminants when looking for the first onePiotr Trojanek1-0/+1
gcc/ada/ * sem_ch3.adb (Build_Discriminant_Constraints): Exit once a first discriminant is found and the Discrim_Present flag is set.
2021-09-20[Ada] Fix assertion in GNATprove_ModeBob Duff2-2/+10
gcc/ada/ * gnat1drv.adb (Gnat1drv): Avoid calling List_Rep_Info in Generate_SCIL and GNATprove_Mode. * repinfo.adb (List_Common_Type_Info): Fix comment.
2021-09-20[Ada] Small cleanup in System.Dwarf_LineEric Botcazou2-9/+6
gcc/ada/ * libgnat/s-dwalin.ads: Remove clause for Ada.Exceptions.Traceback, add clause for System.Traceback_Entries and alphabetize. (AET): Delete. (STE): New package renaming. (Symbolic_Traceback): Adjust. * libgnat/s-dwalin.adb: Remove clauses for Ada.Exceptions.Traceback and System.Traceback_Entries. (Symbolic_Traceback): Adjust.
2021-09-20[Ada] Only assign type to op if compatibleGhjuvan Lacambre1-1/+1
gcc/ada/ * sem_ch4.adb (Find_Non_Universal_Interpretations): Check if types are compatible before adding interpretation.
2021-09-20[Ada] Spurious accessibility error on allocator in generic instanceJustin Squirek1-1/+7
gcc/ada/ * exp_ch4.adb (Expand_N_Type_Conversion): Add guard to protect against calculating accessibility levels against internal compiler-generated types.
2021-09-20[Ada] Capitalize commentGhjuvan Lacambre1-1/+1
gcc/ada/ * sem_dim.adb (Dimensions_Msg_Of): Capitalize comment.
2021-09-20[Ada] Refactor scan_backend_switch to share logic across backendsGhjuvan Lacambre5-110/+176
gcc/ada/ * adabkend.adb (Scan_Back_End_Switches): Replace switch-scanning logic with call to Backend_Utils.Scan_Common_Back_End_Switches. * back_end.adb (Scan_Back_End_Switches): Replace switch-scanning logic with call to Backend_Utils.Scan_Common_Back_End_Switches. * backend_utils.adb: New file. * backend_utils.ads: New file. * gcc-interface/Make-lang.in: Add ada/backend_utils.o.
2021-09-20[Ada] Work around CodePeer bug by declaring variableGhjuvan Lacambre1-1/+6
gcc/ada/ * atree.adb (Get_32_Bit_Field): Declare result before returning.
2021-09-20[Ada] Move Build_And_Insert_Cuda_Initialization to Expand_CUDA_PackageGhjuvan Lacambre3-28/+41
gcc/ada/ * exp_ch7.adb (Expand_N_Package_Body): Replace Build_And_Insert_Cuda_Initialization with Expand_CUDA_Package. * gnat_cuda.adb (Expand_CUDA_Package): New procedure. (Build_And_Insert_Cuda_Initialization): Make internal. * gnat_cuda.ads (Expand_CUDA_Package): New procedure. (Build_And_Insert_Cuda_Initialization): Remove from spec.
2021-09-20[Ada] usage.adb: make -gnatw.c description clearerGhjuvan Lacambre1-2/+4
gcc/ada/ * usage.adb (Usage): Update -gnatw.c messages.
2021-09-20[Ada] Remove inappropriate test from Is_By_Reference_TypeEric Botcazou1-4/+1
gcc/ada/ * sem_aux.adb (Is_By_Reference_Type): Do not test Error_Posted.
2021-09-20Use the proper vectypeRichard Biener1-1/+1
The following uses the SLP node vectype rather than the vectype stored in the DR group. 2021-09-17 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vectorizable_load): Use the vectype from the SLP node.
2021-09-20Fortran/OpenMP: unconstrained/reproducible ordered modifierTobias Burnus9-6/+756
gcc/fortran/ChangeLog: * gfortran.h (gfc_omp_clauses): Add order_unconstrained. * dump-parse-tree.c (show_omp_clauses): Dump it. * openmp.c (gfc_match_omp_clauses): Match unconstrained/reproducible modifiers to ordered(concurrent). (OMP_DISTRIBUTE_CLAUSES): Accept ordered clause. (resolve_omp_clauses): Reject ordered + order on same directive. * trans-openmp.c (gfc_trans_omp_clauses, gfc_split_omp_clauses): Pass on unconstrained modifier of ordered(concurrent). gcc/testsuite/ChangeLog: * gfortran.dg/gomp/order-5.f90: New test. * gfortran.dg/gomp/order-6.f90: New test. * gfortran.dg/gomp/order-7.f90: New test. * gfortran.dg/gomp/order-8.f90: New test. * gfortran.dg/gomp/order-9.f90: New test.
2021-09-20Avoid premature alignment setting in vect_duplicate_ssa_name_ptr_infoRichard Biener1-7/+0
This removes adjusting alignment based on the vectorized accesses and instead keeps what was set on the original access. The code generating the actual accesses make sure to properly align the vectorized accesses based on the generated pointer already and the vectorizers alignment is always based of the desired alignment of a vector type and thus will reset alignment to unknown this way for example when doing strided accesses. 2021-09-20 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_duplicate_ssa_name_ptr_info): Do not compute alignment of the vectorized access here.
2021-09-20vect alignmet enhance TLCRichard Biener1-2/+1
This properly marks the loop as for a runtime alias peel rather than (pointlessly) going through DR_MISALIGNMENT. 2021-09-20 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Store -1 for runtime alias peeling iterations.
2021-09-20Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*Richard Biener2-2/+5
This obsoletes the 32bit hppa-hpux configurations which only support STABS as debuginfo format. 2021-09-20 Richard Biener <rguenther@suse.de> gcc/ * config.gcc: Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*. contrib/ * config-list.mk: --enable-obsolete for hppa2.0-hpux10.1 and hppa2.0-hpux11.9.
2021-09-20testsuite: Remove .exe suffix in prune_gcc_outputChristophe Lyon1-0/+3
When running the testsuite under Windows, we noticed failures in testcase which attempt to match compiler error messages containing the name of the executable. For instance, gcc.dg/analyzer/signal-4a.c tries to match 'cc1:' which obviously fails when the executable is called cc1.exe. This patch removes the .exe suffix from various toolchain executables to avoid this problem. 2021-09-08 Christophe Lyon <christophe.lyon@foss.st.com> Torbjörn SVENSSON <torbjorn.svensson@st.com> gcc/testsuite/ * lib/prune.exp (prune_gcc_output): Remove .exe suffix from toolchain executables names.
2021-09-20Don't record string concatenation data for 'RESERVED_LOCATION_P'Thomas Schwinge2-2/+11
'RESERVED_LOCATION_P' means 'UNKNOWN_LOCATION' or 'BUILTINS_LOCATION'. We're using 'UNKNOWN_LOCATION' as a spare value for 'Empty', so should ascertain that we don't use it as a key additionally. Similarly for 'BUILTINS_LOCATION' that we'd later like to use as a spare value for 'Deleted'. As discussed in the source code comment added, for these we didn't have stable behavior anyway. Follow-up to r239175 (commit 88fa5555a309e5d6c6171b957daaf2f800920869) "On-demand locations within string-literals". gcc/ * input.c (string_concat_db::record_string_concatenation) (string_concat_db::get_string_concatenation): Skip for 'RESERVED_LOCATION_P'. gcc/testsuite/ * gcc.dg/plugin/diagnostic-test-string-literals-1.c: Adjust expected error diagnostics.
2021-09-20tree-optimization/65206 - dependence analysis on mixed pointer/arrayRichard Biener5-60/+168
This adds the capability to analyze the dependence of mixed pointer/array accesses. The example is from where using a masked load/store creates the pointer-based access when an otherwise unconditional access is array based. Other examples would include accesses to an array mixed with accesses from inlined helpers that work on pointers. The idea is quite simple and old - analyze the data-ref indices as if the reference was pointer-based. The following change does this by changing dr_analyze_indices to work on the indices sub-structure and storing an alternate indices substructure in each data reference. That alternate set of indices is analyzed lazily by initialize_data_dependence_relation when it fails to match-up the main set of indices of two data references. initialize_data_dependence_relation is refactored into a head and a tail worker and changed to work on one of the indices structures and thus away from using DR_* access macros which continue to reference the main indices substructure. There are quite some vectorization and loop distribution opportunities unleashed in SPEC CPU 2017, notably 520.omnetpp_r, 548.exchange2_r, 510.parest_r, 511.povray_r, 521.wrf_r, 526.blender_r, 527.cam4_r and 544.nab_r see amendments in what they report with -fopt-info-loop while the rest of the specrate set sees no changes there. Measuring runtime for the set where changes were reported reveals nothing off-noise besides 511.povray_r which seems to regress slightly for me (on a Zen2 machine with -Ofast -march=native). 2021-09-08 Richard Biener <rguenther@suse.de> PR tree-optimization/65206 * tree-data-ref.h (struct data_reference): Add alt_indices, order it last. * tree-data-ref.c (free_data_ref): Release alt_indices. (dr_analyze_indices): Work on struct indices and get DR_REF as tree. (create_data_ref): Adjust. (initialize_data_dependence_relation): Split into head and tail. When the base objects fail to match up try again with pointer-based analysis of indices. * tree-vectorizer.c (vec_info_shared::check_datarefs): Do not compare the lazily computed alternate set of indices. * gcc.dg/torture/20210916.c: New testcase. * gcc.dg/vect/pr65206.c: Likewise.
2021-09-20Driver: Fix bootstrap with DEFAULT_{ASSEMBLER,LINKER,DSYMUTIL}.Iain Sandoe1-3/+3
The patch at r12-3662-g5fee8a0a9223d factored the code for printing the names of programes into a separate function. However the moved editions that print out the names of the assembler, linker (and dsymutil on Darwin) when those are specified at configure-time were not adjusted accordingly, leading to a bootstrap fail. Fixed by testing specifically for execute OK, since we know these are programs. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * gcc.c: Test for execute OK when we find the programs for assembler linker and dsymutil and those were specified at configure-time.
2021-09-20Daily bump.GCC Administrator5-1/+136
2021-09-19Correct a function pre/postcondition [PR102403].Martin Sebor3-1/+88
Resolves: PR middle-end/102403 - ICE in init_from_control_deps, at gimple-predicate-analysis.cc:2364 gcc/ChangeLog: PR middle-end/102403 * gimple-predicate-analysis.cc (predicate::init_from_control_deps): Correct a function pre/postcondition. gcc/testsuite/ChangeLog: PR middle-end/102403 * gcc.dg/uninit-pr102403.c: New test. * gcc.dg/uninit-pr102403-c2.c: New test.
2021-09-19Handle null cfun [PR102243].Martin Sebor2-4/+23
Resolves: PR middle-end/102243 - ICE on placement new at global scope gcc/ChangeLog: PR middle-end/102243 * tree-ssa-strlen.c (get_range): Handle null cfun. gcc/testsuite/ChangeLog: PR middle-end/102243 * g++.dg/warn/Wplacement-new-size-10.C: New test.
2021-09-19libgcc, Darwin: Remove unused symlinks.Iain Sandoe1-18/+0
These were used on older systems to equate the FAT libgcc_s library to single-slice equivalents. Unused for any current system and never emitted by GCC. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config/t-slibgcc-darwin: Delete unused code.
2021-09-19libgcc, X86, Darwin: Handle symbols for HF cases.Iain Sandoe4-1/+27
This reorganises the Darwin symbol vers files to include the generic ones at the top level; allowing for arch ports to override (via either exclusion or inclusion as needed). We add an X86-specific vers file containing the new HF symbols. Note that although Darwin does not use ELF-style symbol versioning - the parser that produces the map can consume it. Using the ELF-style description will help us know at which rev the symbols were introduced. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config/i386/t-darwin: Add in a vers file for X86-specific symbols. * config/t-darwin: Add the generic symbol maps here... * config/t-slibgcc-darwin: ... removing from here. * config/i386/libgcc-darwin.ver: New file.
2021-09-19libgcc, X86: Exclude rules for libgcc2 __{div,mul}hc3.Iain Sandoe1-0/+1
We want to override the libgcc2 generic version of these functions for X86. First exclude the original and the add in the replacements. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> libgcc/ChangeLog: * config/i386/t-softfp: Exclude libgcc2 versions of __divhc3 and __mulhc3.
2021-09-19Darwin, crts: Build Darwin10 unwinder shim as a library.Iain Sandoe3-2/+8
We have a small unwinder shim that is only used for Darwin10 (and only then in quite specific cases). To avoid linking this code for every executable or DSO, we can present the crt as a convenience library (rather than a .o file). Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/ChangeLog: * config/darwin.h (LINK_COMMAND_SPEC_A): Use Darwin10 unwinder shim as a convenience library. libgcc/ChangeLog: * config.host: Use convenience library for Darwin10 unwinder shim. * config/t-darwin: Build Darwin10 unwinder shim as a convenience library.
2021-09-19[committed] Make test names unique for a couple of goacc testsJeff Law2-15/+15
gcc/testsuite * gfortran.dg/goacc/privatization-1-compute.f90: Make test names unique. * gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Likewise.
2021-09-19Update the section on binutils versionAndrew Pinski1-0/+3
LTO usage requires binutils 2.35 or newer due to https://sourceware.org/PR25355. This adds a note in the prerequisites page about it. Ok? gcc/ChangeLog: * doc/install.texi: Add note about binutils 2.35 is required for LTO usage.
2021-09-19Fix PR bootstrap/102389: --with-build-config=bootstrap-lto is brokenAndrew Pinski2-4/+8
So the problem here is that now the lto-plugin requires NM that works with LTO to work so we need to pass down NM just like we do for ranlib and ar. OK? Bootstrapped and tested with --with-build-config=bootstrap-lto on aarch64-linux-gnu. Note you need to use binutils 2.35 or later too due to ttps://sourceware.org/PR25355 (I will submit another patch to improve the installation instructions too). config/ChangeLog: PR bootstrap/102389 * bootstrap-lto-lean.mk: Handle NM like RANLIB AND AR. * bootstrap-lto.mk: Likewise.
2021-09-19Minor cleanups to forward threader.Aldy Hernandez4-63/+30
Every time we allocate a threading edge we push it onto the path in a distinct step. There's no need to do this in two steps, and avoiding this, keeps us from exposing the internals of the registry. I've also did some tiny cleanups in thread_across_edge, most importantly removing the bitmap in favor of an auto_bitmap. There are no functional changes. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader_registry::register_path): Use push_edge. * tree-ssa-threadedge.c (jump_threader::thread_around_empty_blocks): Same. (jump_threader::thread_through_normal_block): Same. (jump_threader::thread_across_edge): Same. Also, use auto_bitmap. Tidy up code. * tree-ssa-threadupdate.c (jt_path_registry::allocate_thread_edge): Remove. (jt_path_registry::push_edge): New. (dump_jump_thread_path): Make static. * tree-ssa-threadupdate.h (allocate_thread_edge): Remove. (push_edge): New.
2021-09-19Jit, testsuite: Amend expect processing to tolerate more platforms.Iain Sandoe1-41/+85
The current 'fixed_host_execute' implementation fails on Darwin platforms for a number of reasons: 1/ If the sub-process spawn fails (e.g. because of missing or mal- formed params); rather than reporting the fail output into the match stream, as indicated by the expect manual, it terminates the script. - We fix this by (a) checking that the executable is valid as well as existing (b) we put the spawn into a catch block and report a failure. 2/ There is no recovery path at all for a buffer-full case (and we do see buffer-full events with the default sizes). - Added by the patch here, however it is not as sophisticated as the methods used by dejagnu internally. Here we set the process to be "nowait" and then close the connection - with the intent that this will terminate the spawned process. 3/ The expect logic assumes that 'Totals:' is a valid indicator for the end of the spawned process output. This is not true even for the default dejagnu header (there are a number of additional reporting lines after). In addition to this, there are some tests that intentionally produce more output after the totals report (and there are tests that do not use that mechanism at all). The effect is the we might arrive at the "wait" for the spawned process to finish - but that process might not have completed all its output. For Darwin, at least that causes a deadlock between expect and the spawnee - the latter is doing a non- cancellable write and the former is waiting for the latter to terminate. For some reason this does not seem to affect Linux perhaps the pty implementation allows the write(s) are able to proceed even though there is no reader. - This is fixed by modifying the loop termination condition to be either EOF (which will be the 'correct' condition) or a timeout which would represent an error either in the runtime or in the parsing of the output. As added precautions, we only try to wait if there is a correcly-spawned process, and we are also specific about which process we are waiting for. 4/ Darwin appears to have a bug in either the tcl or termios 'cooking' code that ocassionally inserts an additional CR char into the stream - thus '\n' => '\r\r\n' instead of '\r\n'. The original program output is correct (it only contains a single \n) - the additional character is being inserted somewhere in the translations applied before the output reaches expect. The logic of this expect implementation does not tolerate single \r or \n characters (it will fail with a timeout or buffer-full if that occurs). - This is fixed by having a line-end match that is adjusted for Darwin. 5/ The default buffer size does seem to be too small in some cases noting that GCC uses 10000 as the match buffer size and the default is 2000. - Fixed by increasing the size to 8192. 6/ There is a somewhat arbitrary dumping of output where we match ^$prefix\tSOMETHING... and then process the something. This essentially allows the match to start at any place in the buffer following any collection of non-line-end chars. - Fixed by amending the match for 'general' lines to accommodate these cases, and reporting such lines to the log. At least this should allow debugging of any cases where output that should be recognized is being dropped. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite/ChangeLog: * jit.dg/jit.exp (fixed_local_execute): Amend the match and exit conditions to cater for more platforms.
2021-09-19Make dump_ranger routines externally visible.Aldy Hernandez3-4/+11
There was an inline extern declaration for dump_ranger that was a bit of a hack. I've removed it in favor of an actual prototype. There are also some trivial changes to the dumping code in the path solver. gcc/ChangeLog: * gimple-range-path.cc (path_range_query::path_range_query): Add header. (path_range_query::dump): Remove extern declaration of dump_ranger. * gimple-range-trace.cc (dump_ranger): Add DEBUG_FUNCTION marker. * gimple-range-trace.h (dump_ranger): Add prototype.
2021-09-19[PATCH] Factor out `find_a_program` helper around `find_a_file`John Ericson1-25/+34
gcc/ * gcc.c (find_a_program): New function, factored out of... (find_a_file): Here. (execute): Use find_a_program when looking for programs rather than find_a_file.