aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-04[ARM]: Correct the grouping of operands in MVE vector scatter store ↵Srinath Parvathaneni8-321/+1363
intrinsics (PR94735). The operands in RTL patterns of MVE vector scatter store intrinsics are wrongly grouped, because of which few vector loads and stores instructions are wrongly getting optimized out with -O2. A new predicate "mve_scatter_memory" is defined in this patch, this predicate returns TRUE on matching: (mem(reg)) for MVE scatter store intrinsics. This patch fixes the issue by adding define_expand pattern with "mve_scatter_memory" predicate and calls the corresponding define_insn by passing register_operand as first argument. This register_operand is extracted from the operand with "mve_scatter_memory" predicate in define_expand pattern. gcc/ChangeLog: 2020-06-01 Srinath Parvathaneni <srinath.parvathaneni@arm.com> PR target/94735 * config/arm/predicates.md (mve_scatter_memory): Define to match (mem (reg)) for scatter store memory. * config/arm/mve.md (mve_vstrbq_scatter_offset_<supf><mode>): Modify define_insn to define_expand. (mve_vstrbq_scatter_offset_p_<supf><mode>): Likewise. (mve_vstrhq_scatter_offset_<supf><mode>): Likewise. (mve_vstrhq_scatter_shifted_offset_p_<supf><mode>): Likewise. (mve_vstrhq_scatter_shifted_offset_<supf><mode>): Likewise. (mve_vstrdq_scatter_offset_p_<supf>v2di): Likewise. (mve_vstrdq_scatter_offset_<supf>v2di): Likewise. (mve_vstrdq_scatter_shifted_offset_p_<supf>v2di): Likewise. (mve_vstrdq_scatter_shifted_offset_<supf>v2di): Likewise. (mve_vstrhq_scatter_offset_fv8hf): Likewise. (mve_vstrhq_scatter_offset_p_fv8hf): Likewise. (mve_vstrhq_scatter_shifted_offset_fv8hf): Likewise. (mve_vstrhq_scatter_shifted_offset_p_fv8hf): Likewise. (mve_vstrwq_scatter_offset_fv4sf): Likewise. (mve_vstrwq_scatter_offset_p_fv4sf): Likewise. (mve_vstrwq_scatter_offset_p_<supf>v4si): Likewise. (mve_vstrwq_scatter_offset_<supf>v4si): Likewise. (mve_vstrwq_scatter_shifted_offset_fv4sf): Likewise. (mve_vstrwq_scatter_shifted_offset_p_fv4sf): Likewise. (mve_vstrwq_scatter_shifted_offset_p_<supf>v4si): Likewise. (mve_vstrwq_scatter_shifted_offset_<supf>v4si): Likewise. (mve_vstrbq_scatter_offset_<supf><mode>_insn): Define insn for scatter stores. (mve_vstrbq_scatter_offset_p_<supf><mode>_insn): Likewise. (mve_vstrhq_scatter_offset_<supf><mode>_insn): Likewise. (mve_vstrhq_scatter_shifted_offset_p_<supf><mode>_insn): Likewise. (mve_vstrhq_scatter_shifted_offset_<supf><mode>_insn): Likewise. (mve_vstrdq_scatter_offset_p_<supf>v2di_insn): Likewise. (mve_vstrdq_scatter_offset_<supf>v2di_insn): Likewise. (mve_vstrdq_scatter_shifted_offset_p_<supf>v2di_insn): Likewise. (mve_vstrdq_scatter_shifted_offset_<supf>v2di_insn): Likewise. (mve_vstrhq_scatter_offset_fv8hf_insn): Likewise. (mve_vstrhq_scatter_offset_p_fv8hf_insn): Likewise. (mve_vstrhq_scatter_shifted_offset_fv8hf_insn): Likewise. (mve_vstrhq_scatter_shifted_offset_p_fv8hf_insn): Likewise. (mve_vstrwq_scatter_offset_fv4sf_insn): Likewise. (mve_vstrwq_scatter_offset_p_fv4sf_insn): Likewise. (mve_vstrwq_scatter_offset_p_<supf>v4si_insn): Likewise. (mve_vstrwq_scatter_offset_<supf>v4si_insn): Likewise. (mve_vstrwq_scatter_shifted_offset_fv4sf_insn): Likewise. (mve_vstrwq_scatter_shifted_offset_p_fv4sf_insn): Likewise. (mve_vstrwq_scatter_shifted_offset_p_<supf>v4si_insn): Likewise. (mve_vstrwq_scatter_shifted_offset_<supf>v4si_insn): Likewise. gcc/testsuite/ChangeLog: 2020-06-01 Srinath Parvathaneni <srinath.parvathaneni@arm.com> PR target/94735 * gcc.target/arm/mve/intrinsics/mve_vstore_scatter_base.c: New test. * gcc.target/arm/mve/intrinsics/mve_vstore_scatter_base_p.c: Likewise. * gcc.target/arm/mve/intrinsics/mve_vstore_scatter_offset.c: Likewise. * gcc.target/arm/mve/intrinsics/mve_vstore_scatter_offset_p.c: Likewise. * gcc.target/arm/mve/intrinsics/mve_vstore_scatter_shifted_offset.c: Likewise. * gcc.target/arm/mve/intrinsics/mve_vstore_scatter_shifted_offset_p.c: Likewise.
2020-06-04[PATCH][GCC] arm: Fix the MVE ACLE vbicq intrinsics.Srinath Parvathaneni13-16/+28
Following MVE intrinsic testcases are failing in GCC testsuite. Directory: gcc.target/arm/mve/intrinsics/ Testcases: vbicq_f16.c, vbicq_f32.c, vbicq_s16.c, vbicq_s32.c, vbicq_s8.c ,vbicq_u16.c, vbicq_u32.c and vbicq_u8.c. This patch fixes the vbicq intrinsics by modifying the intrinsic parameters and polymorphic variants in "arm_mve.h" header file. Thanks, Srinath. gcc/ChangeLog: 2020-05-20 Srinath Parvathaneni <srinath.parvathaneni@arm.com> * config/arm/arm_mve.h (__arm_vbicq_n_u16): Correct the intrinsic arguments. (__arm_vbicq_n_s16): Likewise. (__arm_vbicq_n_u32): Likewise. (__arm_vbicq_n_s32): Likewise. (__arm_vbicq): Modify polymorphic variant. gcc/testsuite/ChangeLog: 2020-05-20 Srinath Parvathaneni <srinath.parvathaneni@arm.com> * gcc.target/arm/mve/intrinsics/vbicq_f16.c: Modify. * gcc.target/arm/mve/intrinsics/vbicq_f32.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_n_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_n_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_n_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_n_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_s16.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_s32.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_s8.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_u16.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_u32.c: Likewise. * gcc.target/arm/mve/intrinsics/vbicq_u8.c: Likewise.
2020-06-04add vect_get_slp_vect_defRichard Biener4-17/+17
This adds vect_get_slp_vect_def to get at a SLP nodes vectorized def, abstracting away the details. It also fixes one stray failure to use SLP_TREE_REPRESENTATIVE. 2020-05-04 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_get_slp_vect_def): Declare. * tree-vect-loop.c (vect_create_epilog_for_reduction): Use it. * tree-vect-stmts.c (vect_transform_stmt): Likewise. (vect_is_simple_use): Use SLP_TREE_REPRESENTATIVE. * tree-vect-slp.c (vect_get_slp_vect_defs): Fold into single use ... (vect_get_slp_defs): ... here. (vect_get_slp_vect_def): New function.
2020-06-04Add explicit SLP_TREE_LANESRichard Biener4-19/+19
This adds an explicit number of scalar lanes to the SLP node avoiding to dispatch between stmts/ops and eventually not require those vectors at all. 2020-05-27 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (_slp_tree::lanes): New. (SLP_TREE_LANES): Likewise. * tree-vect-loop.c (vect_create_epilog_for_reduction): Use it. (vectorizable_reduction): Likewise. (vect_transform_cycle_phi): Likewise. (vectorizable_induction): Likewise. (vectorizable_live_operation): Likewise. * tree-vect-slp.c (_slp_tree::_slp_tree): Initialize lanes. (vect_create_new_slp_node): Likewise. (slp_copy_subtree): Copy it. (vect_optimize_slp): Use it. (vect_slp_analyze_node_operations_1): Likewise. (vect_slp_convert_to_external): Likewise. (vect_bb_vectorization_profitable_p): Likewise. * tree-vect-stmts.c (vectorizable_load): Likewise. (get_vectype_for_scalar_type): Likewise.
2020-06-04Simplify SLP code wrt SLP_TREE_DEF_TYPERichard Biener3-194/+89
The following removes the ugly pushing of SLP_TREE_DEF_TYPE to stmt_infos and instead makes sure to handle invariants fully in vect_is_simple_use plus adjusting a few places I refrained from touching when enforcing vector types for them. It also simplifies building SLP nodes with all external operands from scalars by not doing that in the parent but instead not building those from the start. That also gets rid of vect_update_all_shared_vectypes. 2020-06-04 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_update_all_shared_vectypes): Remove. (vect_build_slp_tree_2): Simplify building all external op nodes from scalars. (vect_slp_analyze_node_operations): Remove push/pop of STMT_VINFO_DEF_TYPE. (vect_schedule_slp_instance): Likewise. * tree-vect-stmts.c (ect_check_store_rhs): Pass in the stmt_info, use the vect_is_simple_use overload combining SLP and stmt_info analysis. (vect_is_simple_cond): Likewise. (vectorizable_store): Adjust. (vectorizable_condition): Likewise. (vect_is_simple_use): Fully handle invariant SLP nodes here. Amend stmt_info operand extraction with COND_EXPR and masked stores. * tree-vect-loop.c (vectorizable_reduction): Deal with COND_EXPR representation ugliness.
2020-06-04Adjust range_of_range_op to handle non-trivial assignments involving an ↵Aldy Hernandez4-11/+53
ADDR_EXPR.
2020-06-04Fix zero-masking for vcvtps2ph when dest operand is memory.liuhongt4-4/+70
When dest is memory, zero-masking is not valid, only merging-masking is available, 2020-06-24 Hongtao Liu <hongtao.liu@inte.com> gcc/ChangeLog: PR target/95254 * config/i386/sse.md (*vcvtps2ph_store<merge_mask_name>): Refine from *vcvtps2ph_store<mask_name>. (vcvtps2ph256<mask_name>): Refine constraint from vm to v. (<mask_codefor>avx512f_vcvtps2ph512<mask_name>): Ditto. (*vcvtps2ph256<merge_mask_name>): New define_insn. (*avx512f_vcvtps2ph512<merge_mask_name>): Ditto. * config/i386/subst.md (merge_mask): New define_subst. (merge_mask_name): New define_subst_attr. (merge_mask_operand3): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512f-vcvtps2ph-pr95254.c: New test. * gcc.target/i386/avx512vl-vcvtps2ph-pr95254.c: Ditto.
2020-06-04[Ada] AI12-0184: Long Long C Data typesArnaud Charlet1-3/+5
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/i-c.ads (long_long, unsigned_long_long): New definitions.
2020-06-04[Ada] New package Ada.Task_InitializationArnaud Charlet6-0/+104
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * Makefile.rtl: add a-tasini object * impunit.adb (Non_Imp_File_Names_95): Add s-tasini. * libgnarl/a-tasini.ads, libgnarl/a-tasini.adb: New files. * libgnarl/s-taskin.ads (Global_Initialization_Handler): New. * libgnarl/s-tassta.adb (Task_Wrapper): Call Global_Initialization_Handler if non null.
2020-06-04[Ada] Ada_2020: contracts for formal subprogramsEd Schonberg2-3/+224
2020-06-04 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Build_Suprogram_Body_Wrapper, Build_Subprogram_Decl_Wrapper): New suprograms, to create the wrappers needed to implement contracts on formsl subprograms at the point of instantiation. (Build_Subprogram_Wrappers): New subprogram within Analyze_Associations, calls the above when the formal subprogram has contracts, and expansion is enabled. (Instantiate_Formal_Subprogram): If the actual is not an entity, such as a function attribute, or a synchronized operation, create a function with an internal name and call it within the wrapper. (Analyze_Generic_Formal_Part): Analyze contracts at the end of the list of formal declarations. * sem_prag.adb (Analyze_Pre_Post_Condtion): In Ada_2020 the aspect and corresponding pragma can appear on a formal subprogram declaration. (Find_Related_Declaration_Or_Body): Ditto.
2020-06-04[Ada] Add missing conversion in call to Finalize primitiveEric Botcazou1-0/+9
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch7.adb (Make_Final_Call): Set the type of the object, if it is unanalyzed, before calling Convert_View on it.
2020-06-04[Ada] Get rid of Disable_FE_Inline_AlwaysArnaud Charlet4-8/+4
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * adabkend.adb, back_end.ads, opt.ads, sem_ch6.adb: Get rid of Disable_FE_Inline_Always.
2020-06-04[Ada] Fix a couple of oversights in previous changeEric Botcazou2-4/+17
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_ch7.adb (Make_Final_Call): Add missing guard. * sem_ch3.adb (Copy_And_Build): Adjust recursive call for private types. (Build_Derived_Private_Type): Deal with underlying full views.
2020-06-04[Ada] Put_Image attributeBob Duff43-224/+3612
2020-06-04 Bob Duff <duff@adacore.com> gcc/ada/ * libgnat/a-stobbu.adb, libgnat/a-stobbu.ads, libgnat/a-stobfi.adb, libgnat/a-stobfi.ads, libgnat/a-stoubu.adb, libgnat/a-stoubu.ads, libgnat/a-stoufi.adb, libgnat/a-stoufi.ads, libgnat/a-stoufo.adb, libgnat/a-stoufo.ads, libgnat/a-stouut.adb, libgnat/a-stouut.ads, libgnat/a-stteou.ads, libgnat/s-putaim.adb, libgnat/s-putaim.ads, libgnat/s-putima.adb, libgnat/s-putima.ads (Ada.Strings.Text_Output and children, System.Put_Images): New runtime support for Put_Image. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS): Add exp_put_image.o. * exp_put_image.adb, exp_put_image.ads: New compiler package that generates calls to runtime routines that implement Put_Image. * Makefile.rtl: Add object files for Ada.Strings.Text_Output and children and System.Put_Images. * aspects.adb: Simplify initialization of Canonical_Aspect. * aspects.ads: Improve documentation. Add Aspect_Put_Image. * exp_attr.adb: Add support for Put_Image, by calling routines in Exp_Put_Image. * sem_util.adb (Is_Predefined_Dispatching_Operation): Return True for new TSS_Put_Image operation. * exp_ch3.adb: For tagged types, build a dispatching TSS_Put_Image operation by calling routines in Exp_Put_Image. * exp_disp.adb, exp_disp.ads: Make TSS_Put_Image be number 10, adjusting other operations' numbers after 10. We choose 10 because that's the last number shared by all runtimes. * exp_strm.adb: Use named notation as appropriate. * exp_cg.adb, exp_tss.ads: Add TSS_Put_Image. * libgnat/a-tags.ads: Modify Max_Predef_Prims for the new TSS_Put_Image. * impunit.adb: Add new runtime packages. * rtsfind.adb, rtsfind.ads: Add support for Ada.Strings.Text_Output, Ada.Strings.Text_Output.Utils, and System.Put_Images. * sem_attr.adb: Error checking for Put_Image calls. * sem_ch12.adb (Valid_Default_Attribute): Support for passing Put_Image as a generic formal parameter. * sem_ch13.adb: Analysis of Put_Image aspect. Turn it into a Put_Image attribute definition clause. * sem_ch8.adb (Analyze_Subprogram_Renaming): Support for renaming of the Put_Image attribute. * snames.adb-tmpl: Fix comments. * snames.ads-tmpl (Name_Put_Image): New Name_Id. (Attribute_Put_Image): New Attribute_Id. * tbuild.adb, tbuild.ads (Make_Increment): New utility.
2020-06-04[Ada] Alignment clause ignored on completion derived from private typeEric Botcazou7-81/+70
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * exp_attr.adb (xpand_N_Attribute_Reference) <Input>: Call Find_Inherited_TSS to look up the Stream_Read TSS. <Output>: Likewise for the Stream_Write TSS. * exp_ch7.adb (Make_Final_Call): Call Underlying_Type on private types to account for underlying full views. * exp_strm.ads (Build_Record_Or_Elementary_Input_Function): Remove Use_Underlying parameter. * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Likewise and adjust accordingly. * exp_tss.adb (Find_Inherited_TSS): Deal with full views. Call Find_Inherited_TSS recursively on the parent type if the base type is a derived type. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Take into account underlying full views for derived types. * sem_ch3.adb (Copy_And_Build): Look up the underlying full view only for a completion. Be prepared for private types. (Build_Derived_Private_Type): Build an underlying full view for a completion in the general case too.
2020-06-04[Ada] Remove OpenACC supportArnaud Charlet14-2678/+837
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * back_end.adb, opt.ads, par-prag.adb, sem_ch5.adb, sem_prag.adb, sinfo.adb, sinfo.ads, snames.ads-tmpl, doc/gnat_rm/implementation_defined_pragmas.rst: Remove experimental support for OpenACC. * gcc-interface/misc.c, gcc-interface/trans.c, gcc-interface/lang.opt: Ditto. * gnat_rm.texi: Regenerate. gcc/testsuite/ * gnat.dg/openacc1.adb: Remove testcase.
2020-06-04[Ada] Remove obsolete reference to gigi in commentEric Botcazou1-3/+0
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.adb (Generate_Discriminant_Check): Remove obsolete comment.
2020-06-04[Ada] Implement AI12-0275 (Make subtype_mark optional in object renamings)Gary Dismukes4-7/+145
2020-06-04 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * par-ch3.adb (P_Identifier_Declarations): Add parsing of object renamings that have neither a subtype_mark nor an access_definition. Issue an error if the version is earlier than Ada_2020, and suggest using -gnatX. * sem_ch8.adb (Analyze_Object_Renaming): Handle object_renaming_declarations that don't have an explicit subtype. Errors are issued when the name is inappropriate or ambiguous, and otherwise the Etype of the renaming entity is set from the Etype of the renamed object. * sem_util.adb (Has_Null_Exclusion): Allow for the case of no subtype given in an N_Object_Renaming_Declaration. * sprint.adb (Sprint_Node_Actual): Handle printing of N_Object_Renaming_Declarations that are specified without an explicit subtype.
2020-06-04[Ada] Fix glitch for N_Delta_Aggregate/N_Case_Expression/N_Quantified_ExpressionEric Botcazou1-2/+4
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sinfo.ads (N_Delta_Aggregate): Document Etype field. (N_Case_Expression): Likewise. (Is_Syntactic_Field) <N_Quantified_Expression>: Adjust. <N_Case_Expression>: Likewise.
2020-06-04[Ada] Avoid redefining IS_DIR_SEPARATOR macroArnaud Charlet1-6/+6
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * adaint.c: Avoid redefining IS_DIR_SEPARATOR macro.
2020-06-04[Ada] Wrong walk order in Walk_Library_ItemsArnaud Charlet1-13/+30
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem.adb (Walk_Library_Items): Defer processing of main spec after all other specs and before processing bodies.
2020-06-04[Ada] Import Adafinal as convention AdaArnaud Charlet1-1/+1
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * bindgen.adb (Gen_Adafinal): Adafinal is convention Ada, not C.
2020-06-04[Ada] Incorrect source line range on subprogram body with contractEd Schonberg1-0/+10
2020-06-04 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sinput.adb (Sloc_Range): Ignore node in the tree if it appears in a unit different from that of the node whose Sloc range we are computing. This is necessary when computing the source range of a subprogram body whose declaration includes a pre- or postcondition, because declaration and body may appear in different units, and the expanded code for the body includes copies of the contract code.
2020-06-04[Ada] Revamp dump and aux output namesAlexandre Oliva1-1/+4
2020-06-04 Alexandre Oliva <oliva@adacore.com> gcc/ada/ * switch.adb (Is_Internal_GCC_Switch): Recognize dumpdir and dumpbase-ext. Mark auxbase and auxbase-strip for removal.
2020-06-04[Ada] Set convention and inlined flag on default null procedureEric Botcazou2-1/+8
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_attr.adb (Resolve_Attribute) <Access>: Do not generate the secondary message about a missing pragma if the convention of the prefix is Intrinsic. * sem_ch12.adb (Instantiate_Formal_Subprogram): Only set the Convention and the Is_Inlined flag on a null procedure.
2020-06-04[Ada] Missing accessibility check on access discriminant in extended returnJustin Squirek1-22/+39
2020-06-04 Justin Squirek <squirek@adacore.com> gcc/ada/ * sem_ch6.adb (Check_Return_Obj_Accessibility): Change to Check_Return_Construct_Accessibility to better reflect its purpose. Add loop to properly obtain the object declaration from an expanded extended return statement and add calls to get the original node for associated values. Also, avoid checks when the return statement being examined comes from an internally generated function.
2020-06-04[Ada] Fix Is_Absolute_Path on WindowsDmitriy Anisimkov1-4/+8
2020-06-04 Dmitriy Anisimkov <anisimko@adacore.com> gcc/ada/ * adaint.c (__gnat_is_absolute_path): Check for directory separator after drive and colon. (IS_DIR_SEPARATOR): Define new inline substitution.
2020-06-04[Ada] Update the documentation in checks.ads about range checksEric Botcazou1-25/+17
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.ads: Update documentation about range checks and fix minor other things.
2020-06-04[Ada] Small tweak to special handling of private index typesEric Botcazou1-3/+6
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch3.adb (Array_Type_Declaration): Apply special handling of private index types to generic packages and restrict it to index types defined in the current scope.
2020-06-04[Ada] New procedure Register_Global_Unhandled_ActionArnaud Charlet5-10/+52
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/a-exextr.adb (Global_Unhandled_Action): New global variable. (Notify_Exception): Take into account Global_Unhandled_Action and fix latent race condition. (Exception_Action): Mark Favor_Top_Level so that variables can be atomic. (Global_Action): Mark atomic to remove the need for a lock. * libgnat/g-excact.ads, libgnat/g-excact.adb (Register_Global_Unhandled_Action): New procedure. (Register_Global_Action): Remove lock. * libgnat/s-stalib.ads (Raise_Action): Mark Favor_Top_Level to be compatible with Exception_Action. * sem_warn.adb (Warn_On_Unreferenced_Entity): Fix logic wrt Volatile entities and entities with an address clause: the code did not match the comment/intent.
2020-06-04[Ada] Update URL and bug report instructionsArnaud Charlet1-4/+4
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * comperr.adb (Compiler_Abort): Update URL and bug report instructions.
2020-06-04[Ada] Avoid buffer overflow in Long_Long_Float_Text_IOSteve Baird3-10/+10
2020-06-04 Steve Baird <baird@adacore.com> gcc/ada/ * libgnat/s-imgrea.ads: Declare a named number Max_Real_Image_Length with value 5200. Provide a comment explaining why this value was chosen. * libgnat/s-imgrea.adb (Set_Image_Real): Increase the upper bound of the local String variable Digs to Max_Real_Image_Length. * libgnat/a-tiflau.adb (Put): Increase the upper bound of the local String variable Buf to Max_Real_Image_Length. (Puts): Increase the upper bound of the local String variable Buf to Max_Real_Image_Length.
2020-06-04[Ada] Remove System.Parameters.Single_LockArnaud Charlet33-1375/+283
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnarl/a-dynpri.adb, libgnarl/a-taside.adb, libgnarl/a-taster.adb, libgnarl/s-interr.adb, libgnarl/s-interr__sigaction.adb, libgnarl/s-taasde.adb, libgnarl/s-taenca.adb, libgnarl/s-taenca.ads, libgnarl/s-taprop.ads, libgnarl/s-taprop__hpux-dce.adb, libgnarl/s-taprop__linux.adb, libgnarl/s-taprop__mingw.adb, libgnarl/s-taprop__posix.adb, libgnarl/s-taprop__qnx.adb, libgnarl/s-taprop__solaris.adb, libgnarl/s-taprop__vxworks.adb, libgnarl/s-tarest.adb, libgnarl/s-tasini.adb, libgnarl/s-tasque.adb, libgnarl/s-tasque.ads, libgnarl/s-tasren.adb, libgnarl/s-tasren.ads, libgnarl/s-tassta.adb, libgnarl/s-tasuti.adb, libgnarl/s-tasuti.ads, libgnarl/s-tpoben.adb, libgnarl/s-tpobop.adb, libgnarl/s-tpopmo.adb, libgnarl/s-tposen.adb, libgnat/s-parame.ads, libgnat/s-parame__ae653.ads, libgnat/s-parame__hpux.ads, libgnat/s-parame__vxworks.ads: Remove references to Single_Lock and Global_Lock.
2020-06-04[Ada] Continuation of "Get rid of more references to Universal_Integer"Arnaud Charlet2-6/+6
2020-06-04 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-atopar.adb, libgnat/s-atopex.adb: Use Object_Size instead of Size, otherwise many derived types will be rejected (e.g. a type with a 14 bits 'Size and a 16 bits 'Object_Size).
2020-06-04[Ada] Add another ad-hoc case to the Has_Private_View mechanismEric Botcazou1-0/+31
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch12.adb (Copy_Generic_Node): Add special handling for a conversion between access types.
2020-06-04[Ada] Fix fallout of cleanup to Has_Private_View mechanismEric Botcazou1-0/+31
2020-06-04 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch12.adb (Check_Generic_Actuals): Also restore the proper views of the actuals of the parent instances if the formals are used as actuals of the children. (Instantiate_Type): Add comment.
2020-06-04[Ada] Minor editorial fixesGary Dismukes1-2/+2
2020-06-04 Gary Dismukes <dismukes@adacore.com> gcc/ada/ * sem_ch12.adb: Minor editorial fixes.
2020-06-04cselim: Extend to check non-trapping for more references [PR89430]Hao Liu8-63/+106
If there is a dominating store, a store to the same reference can not be trapped. But previously, it only supports such check on MEM_REFs. So this patch extends it to support ARRAY_REFs and COMPONENT_REFs. This patch also supports a special case: if there is a dominating load of local variable without address escape, a store is not trapped, as local stack is always writable. Other loads are ignored for simplicity, as they don't help to check if a store can be trapped (the memory may be read-only). gcc/ChangeLog: PR tree-optimization/89430 * tree-ssa-phiopt.c (struct name_to_bb): Rename to ref_to_bb; add a new field exp; remove ssa_name_ver, store, offset fields. (struct ssa_names_hasher): Rename to refs_hasher; update functions. (class nontrapping_dom_walker): Rename m_seen_ssa_names to m_seen_refs. (nontrapping_dom_walker::add_or_mark_expr): Extend to support ARRAY_REFs and COMPONENT_REFs. gcc/testsuite/ChangeLog: PR tree-optimization/89430 * gcc.dg/tree-ssa/pr89430-1.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-2.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-5.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-6.c: Remove xfail. * gcc.dg/tree-ssa/pr89430-7-comp-ref.c: New test. * gcc.dg/tree-ssa/pr89430-8-mem-ref-size.c: New test. * gcc.dg/tree-ssa/ssa-pre-17.c: Add -fno-tree-cselim.
2020-06-04Fix missing assemble_external in ASM_OUTPUT_FDESCAndreas Schwab1-0/+1
When TARGET_VTABLE_USES_DESCRIPTORS is defined then function pointers in the vtable are output by ASM_OUTPUT_FDESC. The only current user of this is ia64, but its implementation of ASM_OUTPUT_FDESC lacks a call to assemble_external. Thus if there is no other reference to the function the weak declaration for it will be missing. PR target/95154 * config/ia64/ia64.h (ASM_OUTPUT_FDESC): Call assemble_external.
2020-06-04Missing __divtf3@@GCC_4.4.0 on ia64Andreas Schwab1-3/+0
gcc/testsuite/ PR libfortran/59227 * gfortran.dg/erf_3.F90: Remove XFAIL on ia64-*-linux*. libgcc/ PR target/59230 PR libfortran/59227 * config/ia64/t-softfp-compat (softfp_file_list): Filter out soft-fp/divtf3.c. (LIB2ADD): Add config/ia64/divtf3.c. * config/ia64/divtf3.c: New file.
2020-06-04Fix uppercase in trunc<mode><pmov_dst_3>2.liuhongt2-3/+4
2020-06-04 Hongtao.liu <hongtao.liu@intel.com> gcc/ChangeLog: * config/i386/sse.md (pmov_dst_3_lower): New mode attribute. (trunc<mode><pmov_dst_3_lower>2): Refine from trunc<mode><pmov_dst_3>2. gcc/testsuite * gcc.target/i386/pr92658-avx512bw-trunc.c: Adjust testcase.
2020-06-04c++: Reject some further reinterpret casts in constexpr [PR82304, PR95307]Jakub Jelinek5-20/+38
cxx_eval_outermost_constant_expr had a check for reinterpret_casts from pointers (well, it checked from ADDR_EXPRs) to integral type, but that only caught such cases at the toplevel of expressions. As the comment said, it should be done even inside of the expressions, but at the point of the writing e.g. pointer differences used to be a problem. We now have POINTER_DIFF_EXPR, so this is no longer an issue. Had to do it just for CONVERT_EXPR, because the FE emits NOP_EXPR casts from pointers to integrals in various spots, e.g. for the PMR & 1 tests, though on NOP_EXPR we have the REINTERPRET_CAST_P bit that we do check, while on CONVERT_EXPR we don't. 2020-06-04 Jakub Jelinek <jakub@redhat.com> PR c++/82304 PR c++/95307 * constexpr.c (cxx_eval_constant_expression): Diagnose CONVERT_EXPR conversions from pointer types to arithmetic types here... (cxx_eval_outermost_constant_expr): ... instead of here. * g++.dg/template/pr79650.C: Expect different diagnostics and expect it on all lines that do pointer to integer casts. * g++.dg/cpp1y/constexpr-shift1.C: Expect different diagnostics. * g++.dg/cpp1y/constexpr-82304.C: New test. * g++.dg/cpp0x/constexpr-95307.C: New test.
2020-06-04Daily bump.GCC Administrator11-1/+523
2020-06-04Provide diagnostic hints for missing C++ cinttypes string constants.Mark Wielaard4-0/+84
When reporting an error in cp_parser and we notice a string literal followed by an unknown name check whether there is a known standard header containing a string macro with the same name, then add a hint to the error message to include that header. gcc/c-family/ChangeLog: * known-headers.cc (get_cp_stdlib_header_for_string_macro_name): New function. * known-headers.h (get_cp_stdlib_header_for_string_macro_name): New function declaration. gcc/cp/ChangeLog: * parser.c (cp_lexer_safe_previous_token): New function. (cp_parser_error_1): Add name_hint if the previous token is a string literal and next token is a CPP_NAME and we have a missing header suggestion for the name. gcc/testsuite/ChangeLog: * g++.dg/spellcheck-inttypes.C: Add string-literal testcases.
2020-06-04Provide diagnostic hints for missing C inttypes.h string constants.Mark Wielaard5-1/+202
This adds a flag to c_parser so we know when we were trying to construct a string literal. If there is a parse error and we were constructing a string literal, and the next token is an unknown identifier name, and we know there is a standard header that defines that name as a string literal, then add a missing header hint to the error messsage. The list of macro names are also used when providing a hint for missing identifiers. gcc/c-family/ChangeLog: * known-headers.cc (get_string_macro_hint): New function. (get_stdlib_header_for_name): Use get_string_macro_hint. (get_c_stdlib_header_for_string_macro_name): New function. * known-headers.h (get_c_stdlib_header_for_string_macro_name): New function declaration. gcc/c/ChangeLog: * c-parser.c (struct c_parser): Add seen_string_literal bitfield. (c_parser_consume_token): Reset seen_string_literal. (c_parser_error_richloc): Add name_hint if seen_string_literal and next token is a CPP_NAME and we have a missing header suggestion for the name. (c_parser_string_literal): Set seen_string_literal. gcc/testsuite/ChangeLog: * gcc.dg/spellcheck-inttypes.c: New test. * g++.dg/spellcheck-inttypes.C: Likewise.
2020-06-04diagnostics: Add function call parens matching to c_parser.Mark Wielaard2-15/+57
The C++ parser already tracks function call parens matching, but the C parser doesn't. This adds the same functionality to the C parser and adds a testcase showing the C++ and C parser matching function call parens in an error message. gcc/c/ChangeLog: * c-parser.c (c_parser_postfix_expression_after_primary): Add scope with matching_parens after CPP_OPEN_PAREN. gcc/testsuite/ChangeLog: * c-c++-common/missing-close-func-paren.c: New test.
2020-06-03optimize tanh(x) / sinh (x) to 1/ cosh (x)Vitor Guidi2-0/+45
gcc/ * match.pd (tanh/sinh -> 1/cosh): New simplification. gcc/testsuite * gcc.dg/tanhbysinh.c: New testcase.
2020-06-03Update gcc sv.po.Joseph Myers1-234/+153
* sv.po: Update.
2020-06-03identify lfs prefixed case PR95347Aaron Sawdey1-12/+25
The same problem also arises for plfs where prefixed_load_p() doesn't recognize it so we get just lfs in the asm output with an @pcrel address. PR target/95347 * config/rs6000/rs6000.c (is_stfs_insn): Rename to is_lfs_stfs_insn and make it recognize lfs as well. (prefixed_store_p): Use is_lfs_stfs_insn(). (prefixed_load_p): Use is_lfs_stfs_insn() to recognize lfs.
2020-06-03c++: more constrained nested partial specializationPatrick Palka2-1/+15
When checking that a constrained partial specialization is more constrained than the primary template, we pass only the innermost level of generic template arguments to strictly_subsumes. This leads to us doing a nonsensical substitution from normalize_concept_check if the full set of template arguments has multiple levels, and it ultimately causes strictly_subsumes to sometimes erroneously return false as in the testcase below. gcc/cp/ChangeLog: * pt.c (process_partial_specialization): Pass the full set of generic template arguments to strictly_subsumes. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-partial-spec8.C: New test.