aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-30Fortran's dump-parse-tree.c: Use '==' not '=' for '.eq.'.Tobias Burnus1-1/+1
gcc/fortran/ * dump-parse-tree.c (show_expr): Use '==' not '=' for '.eq.'.
2020-11-30[Ada] s-trasym.ads: update the list of supported platformsPierre-Marie de Rodat1-1/+2
gcc/ada/ * libgnat/s-trasym.ads: Update the list of supported platforms.
2020-11-30[Ada] Remove all ^L charactersArnaud Charlet2-3/+3
gcc/ada/ * gcc-interface/Makefile.in, gcc-interface/trans.c: Remove ^L characters.
2020-11-30[Ada] Enable checks on runtime by defaultArnaud Charlet4-7/+17
gcc/ada/ * gcc-interface/Makefile.in (GNATLIBFLAGS): Enable checks by default. * libgnat/s-bitfie.ads: Suppress alignment checks. * libgnat/s-bituti.adb: Minor reformatting. * libgnat/s-secsta.adb (SS_Allocate): Support Size = 0.
2020-11-30[Ada] Wrong replacement of Component.DiscriminantArnaud Charlet1-57/+0
gcc/ada/ * exp_ch3.adb (Replace_Discr_Ref): Removed, no longer needed.
2020-11-30[Ada] Minor reuse Is_AssignablePiotr Trojanek1-2/+1
gcc/ada/ * sem_ch5.adb (Process_Statements): Replace low-level membership test with a high-level wrapper.
2020-11-30[Ada] Simplify analysis of assignment statementsPiotr Trojanek1-32/+26
gcc/ada/ * sem_ch5.adb (Set_Assignment_Type): Combine calls to Ekind using membership test. (Should_Transform_BIP_Assignment): Replace assignment to a "Result" variable with simple return statements; avoid repeated calls to Unqual_Conv by declaring a local constant.
2020-11-30[Ada] Minor reuse Is_Protected_ComponentPiotr Trojanek2-4/+2
gcc/ada/ * lib-xref.adb (Generate_Reference): Fix reference to Analyze_Assignment. * sem_ch5.adb (Diagnose_Non_Variable_Lhs): Reuse existing utility function.
2020-11-30[Ada] Fix internal error on extended return and fixed-point resultEric Botcazou2-15/+15
gcc/ada/ * contracts.adb (Check_Type_Or_Object_External_Properties): Make sure to exclude all return objects from the SPARK legality rule on effectively volatile variables. * exp_ch6.adb (Expand_N_Extended_Return_Statement): Use the fast track only when the declaration of the return object can be dropped.
2020-11-30[Ada] Implement inheritance for Default_Initial_Condition and address other gapsGary Dismukes15-268/+900
gcc/ada/ * einfo.ads (Is_Partial_DIC_Procedure): New function. (Partial_DIC_Procedure): New procedure. * einfo.adb (Is_Partial_DIC_Procedure): New function to return whether a subprogram is a partial Default_Initial_Condition procedure by checking the name (to avoid adding a new field). (DIC_Procedure): Add a test that excludes partial DIC procedures from being returned. (Partial_DIC_Procedure): New procedure to return the partial DIC procedure of a type, if it has one (otherwise returns Empty). (Set_DIC_Procedure): Remove check for duplicate DIC procedures. * exp_aggr.adb (Gen_Assign): Generate a call to the type's DIC procedure in the case where an array component is default initialized (due to an association with a box). (Build_Record_Aggr_Code): For an extension aggregate, generate a call to the ancestor type's DIC procedure (if any) when the ancestor part is a subtype mark. For a record component association that was specified with a box (tested for by checking the new flag Was_Default_Init_Box_Association), generate a call to the component type's DIC procedure (if it has one). * exp_ch4.adb (Expand_N_Allocator): When the allocated object is default initialized and the designated type has a DIC aspect, generate a call to the DIC procedure. * exp_util.ads (Build_DIC_Call): Change the formal Obj_Id to name Obj_Name, and change its type from Entity_Id to Node_Id (and update comment). (Build_DIC_Procedure_Body): Add formal Partial_DIC, remove formal For_Freeze, and update comment accordingly. (Build_DIC_Procedure_Declaration): Add formal Partial_DIC and update comment. * exp_util.adb (Build_DIC_Call): Revised to use its Obj_Name (formerly Obj_Id) formal directly rather than calling New_Occurrence_Of on it, to allow arbitrary names to be passed rather than being limited to Entity_Ids. (Build_DIC_Procedure_Body): Call Add_Parent_DICs to generate checks for DICs associated with any parent types, implementing the required "additive" semantics for DICs. When building a DIC procedure body for a partial view (when Partial_DIC is True), call Add_Own_DIC when the type has its own DIC. In the case of "full" DIC procedures, a call is generated to any partial DIC procedure of the type (unless the procedure has a null body), along with checks for any DICs inherited by the full view. (Build_DIC_Procedure_Declaration): Add handling for partial DIC procedures. For the suffix of a regular DIC procedure's name, use "DIC" (instead of "Default_Initial_Condition"), and for the suffix of a partial DIC procedure's name, use "Partial_DIC". (Add_DIC_Check): Add the DIC pragma to the list of seen pragmas (Pragmas_Seen). (Add_Inherited_Tagged_DIC): Remove the formals Par_Typ, Deriv_Typ, and Obj_Id, and add formal Expr, which denotes DIC's expression. Remove the call to Replace_References (which is now done in Add_Inherited_DICs). (Add_Inherited_DICs): New procedure to locate a DIC pragma associated with a parent type, replace its references appropriately (such as any current instance references), and add a check for the DIC. (Add_Own_DIC): Add an Obj_Id formal to allow caller to pass the _init formal of the generated DIC procedure. (Add_Parent_DICs): New procedure to traverse a type's parents, looking for DICs associated with those and calling Add_Inherited_DICs to apply the appropriate DIC checks. (Is_Verifiable_DIC_Pragma): Treat pragmas that have an Empty first argument the same as a pragma without any arguments (returning False for that case). * exp_ch3.adb (Init_One_Dimension): Generate calls to the component's DIC procedure when needed. (Possible_DIC_Call): New function nested in Init_One_Dimension to build a call to the array component type's DIC-checking function when appropriate. (Build_Array_Init_Proc): The presence of a DIC on the component type is an additional condition for generating an init proc for an array type. (Build_Init_Statements): When the record component's type has a DIC, and the component declaration does not have an initialization expression, generate a call to the component type's DIC procedure. (Expand_N_Object_Declaration): Modify the call to Build_DIC_Call to pass a new occurrence of the object's defining id rather than the id itself. (Freeze_Type): Only build a type's DIC procedure (if it has one) for types that are not interfaces. * exp_spark.adb (Expand_SPARK_N_Freeze_Type): Remove From_Freeze actual and add a ??? comment. (Expand_SPARK_N_Object_Declaration): Modify call to Build_DIC_Call to pass a new occurrence of the object id rather than the object id itself. * sem_aggr.adb (Resolve_Record_Aggregate): Declare local flag Is_Box_Init_By_Default and set it in cases where the component association has a box and the component is being initialized by default (as opposed to initialized by an initialization expression associated with the component's declaration). (Add_Association): If the association has a box for a component initialized by default, the flag Was_Default_Init_Box_Association is set on the new component association (for later testing during expansion). (Get_Value): Reset Is_Box_Init_By_Default to False. * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Rearrange code to build DIC procedure bodies for a (noninterface) type that Has_Own_DIC (for partial type views) or Has_DIC (for full type views) as appropriate. * sem_ch13.adb (Analyze_Aspect_Specifications, Aspect_Default_Initial_Condition): Add an extra argument to the DIC pragma to denote the type associated with the pragma (for use in Build_DIC_Procedure_Body). * sem_prag.adb (Analyze_Pragma): Allow two arguments for pragma Default_Initial_Condition. If not already present, add an extra argument denoting the type that the pragma is associated with. * sem_util.adb (Propagate_DIC_Attributes): Retrieve any partial DIC procedure associated with the type and add it to the type's list of subprograms (Subprograms_For_Type). * sinfo.ads (Was_Default_Init_Box_Association): New flag on N_Component_Association nodes. Add subprograms to get and set flag, as well as updating the documentation. * sinfo.adb (Was_Default_Init_Box_Association): New function to retrieve the corresponding flag (Flag14). (Set_Was_Default_Init_Box_Association): New procedure to set the corresponding flag (Flag14).
2020-11-30[Ada] Improve error recoveryArnaud Charlet2-2/+0
gcc/ada/ * par-ch6.adb (P_Formal_Part): Remove extra call to Scan. * par-tchk.adb: Minor reformatting.
2020-11-30[Ada] Reimplement Ada.Numerics.Big_Numbers.Big_Reals.Fixed_ConversionsEric Botcazou1-8/+61
gcc/ada/ * libgnat/a-nbnbre.adb (Float_Conversions): Instantiate Conv package only once in the body. (Fixed_Conversions.Float_Aux): New instance. (Fixed_Conversions.Conv_I): Likewise. (Fixed_Conversions.Conv_U): Likewise. (Fixed_Conversions.LLLI): New subtype. (Fixed_Conversions.LLLU): Likewise. (Fixed_Conversions.Too_Large): New constant. (Fixed_Conversions.To_Big_Real): Reimplement. (Fixed_Conversions.From_Big_Real): Likewise.
2020-11-30[Ada] Compiler crash on limited conditional expressionsBob Duff1-5/+5
gcc/ada/ * exp_ch3.adb (Expand_N_Object_Declaration): Avoid crash in case of conditional expression.
2020-11-30[Ada] Expand integer-only implementation of ordinary fixed-point typesEric Botcazou24-993/+1543
gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Pool_Address): Fix pasto. (Small_Denominator): New entry. (Small_Numerator): Likewise. * doc/gnat_rm/implementation_defined_characteristics.rst (3.5.9): Relax conditions on 128-bit smalls and integer-only implementation. * gnat_rm.texi: Regenerate. * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Fore>: Relax conditions on integer implementation for ordinary fixed-point types and pass a third parameter to the routine. <Attribute_Small_Denominator>: Raise Program_Error. <Attribute_Small_Numerator>: Likewise. * exp_fixd.adb (Expand_Convert_Fixed_To_Fixed): Use a scaled divide if the numerator and denominator of the small ratio are sufficiently small integers. (Expand_Convert_Fixed_To_Integer): Use a scaled divide if numerator and denominator of the small value are sufficiently small integers. (Expand_Convert_Integer_To_Fixed): Likewise. * exp_imgv.adb (Expand_Image_Attribute): Relax the conditions on the integer implementation for ordinary fixed-point types. (Expand_Value_Attribute): Likewise. * freeze.adb (Freeze_Fixed_Point_Type): Relax conditions on 128-bit smalls. * sem_attr.adb (Analyze_Attribute) <Attribute_Small_Denominator>: Check no arguments, fixed-point and set type to Universal_Integer. <Attribute_Small_Numerator>: Likewise. (Eval_Attribute) <Attribute_Small_Denominator>: Fold statically. <Attribute_Small_Numerator>: Likewise. * snames.ads-tmpl (Name_Small_Denominator): New attribute name. (Name_Small_Numerator): Likewise. (Attribute_Id): Add Attribute_Small_{Denominator,Numerator}. * libgnat/a-tifiio.adb (Exact): Delete. (Need_64): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-tifiio__128.adb (Exact): Delete. (Need_64): Likewise. (Need_128): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (OK_Get_128): Likewise. (OK_Put_128): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-wtfiio.adb (Exact): Delete. (Need_64): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-wtfiio__128.adb (Exact): Delete. (Need_64): Likewise. (Need_128): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (OK_Get_128): Likewise. (OK_Put_128): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-ztfiio.adb (Exact): Delete. (Need_64): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/a-ztfiio__128.adb (Exact): Delete. (Need_64): Likewise. (Need_128): Likewise. (OK_Get_32): New boolean constant. (OK_Put_32): Likewise. (OK_Get_64): Likewise. (OK_Put_64): Likewise. (OK_Get_128): Likewise. (OK_Put_128): Likewise. (E): Adjust. (Get procedures): Likewise. (Put procedures): Likewise. * libgnat/s-fore_f.ads (Fore_Fixed): Adjust signature. * libgnat/s-fore_f.adb (Fore_Fixed): Reimplement. * libgnat/s-fofi32.ads (Fore_Fixed32): Adjust signature. * libgnat/s-fofi64.ads (Fore_Fixed64): Likewise. * libgnat/s-fofi128.ads (Fore_Fixed128): Likewise. * libgnat/s-imagef.ads: Adjust description. * libgnat/s-imagef.adb (Maxdigs): Move around. (Set_Image_Integer): Remove assertion. * libgnat/s-valuef.ads: Adjust description. * libgnat/s-valuef.adb (Integer_To_Fixed): Minor tweak.
2020-11-30[Ada] Implement -gnateb switchGhjuvan Lacambre7-4/+44
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Describe -gnateb switch. * doc/gnat_ugn/the_gnat_compilation_model.rst: Mention -gnateb switch in configuration pragma files section. * gnat_ugn.texi: Regenerate. * lib-writ.adb (Write_ALI): Strip directories from configuration files path if needed. * opt.ads: Declare Config_Files_Store_Basename option. * par.adb (Par): Save configuration file checksum. * switch-c.adb (Scan_Front_End_Switches): Set Config_Files_Store_Basename true if -gnateb is present.
2020-11-30[Ada] Potential read of uninitialized variable in exp_dist.adbArnaud Charlet1-1/+1
gcc/ada/ * exp_dist.adb (RCI_Cache): Initialize.
2020-11-30[Ada] Address warning compiling terminals.cArnaud Charlet1-1/+1
gcc/ada/ * terminals.c (allocate_pty_desc): Copy one less byte since the last byte will always be set to 0.
2020-11-30[Ada] Add stream-oriented attributes support for 128-bit integer typesEric Botcazou6-115/+248
gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (-xdr): Document that XDR is not supported for 128-bit integer types. * gnat_ugn.texi: Regenerate. * exp_strm.adb (Build_Elementary_Input_Call): Deal with types larger than Long_Long_Integer. (Build_Elementary_Write_Call): Likewise. * rtsfind.ads (RE_Id): Add RE_I_LLL{I,U] and RE_W_LLL{I,U}. (RE_Unit_Table): Add entries for them. * libgnat/s-stratt.ads (I_LLLI): New inline function. (I_LLLU): Likewise. (W_LLLI): New inline procedure. (W_LLLU): Likewise. * libgnat/s-stratt.adb (S_LLLI): New subtype of SEA. (S_LLLU): Likewise. (From_LLLI): New instance of Unchecked_Conversion. (From_LLLU): Likewise. (To_LLLI): Likewise. (To_LLLU): Likewise. (I_LLLI): Implement. (I_LLLU): Likewise. (W_LLLI): Likewise. (W_LLLU): Likewise.
2020-11-30[Ada] Spurious error on iterator over container with modified private partEd Schonberg1-1/+12
gcc/ada/ * exp_ch5.adb (Expand_Iterator_Loop_Over_Container): Check the signature of the private operation Get_Element_Access to prevent accidental use of a user-defined homonym subprogram.
2020-11-30[Ada] Add comment on special Heap variable used in GNATproveYannick Moy1-1/+2
gcc/ada/ * spark_xrefs.ads: Add comment for Heap that it may remain Empty.
2020-11-30[Ada] Fix serial port control setting on GNU/LinuxPascal Obry1-30/+1
gcc/ada/ * libgnat/g-sercom__linux.adb (Set): Fix control flags of the serial port setting.
2020-11-30[Ada] Minor style fixesPascal Obry1-3/+2
gcc/ada/ * libgnat/g-sercom__linux.adb: Minor style fixes.
2020-11-30[Ada] Fix folding of comparison operators in GNATprove modePiotr Trojanek2-18/+12
gcc/ada/ * exp_util.adb (Get_Current_Value_Condition): Don't use current value tracking in GNATprove mode. * sem_res.adb (Resolve_Comparison_Op): Remove incomplete special-casing for folding in GNATprove mode.
2020-11-30[Ada] Crash on ghost assignment check for illegal codeBob Duff3-10/+9
gcc/ada/ * errout.adb (Error_Msg_NEL): Do not call Set_Posted if errors are being ignored. (Error_Msg): Change Errors_Must_Be_Ignored to use the getter. * sem_ch8.adb (Find_Direct_Name): Do not skip all the error checks when ignoring errors, but instead do not add an entry to the Urefs table if errors are being ignored. * exp_ch5.adb: Minor comment fix.
2020-11-30[Ada] Add continuation message when others choice not allowedYannick Moy1-4/+9
gcc/ada/ * sem_aggr.adb (Resolve_Array_Aggregate): Improve error message.
2020-11-30[Ada] Small cleanup in System.Value_FEric Botcazou1-30/+16
gcc/ada/ * libgnat/s-valuef.adb (Integer_To_Fixed): Do not modify numerator or denominator in order to reduce the exponent.
2020-11-30[Ada] Confusion in Transform_Function_Array and internal subprogramsArnaud Charlet6-245/+206
gcc/ada/ * ali-util.adb (Get_File_Checksum): Remove dead code. * exp_ch4.adb (Expand_Boolean_Operator, Expand_N_Op_Not, Make_Boolean_Array_Op): Take Transform_Function_Array into account. * exp_ch6.adb (Expand_Call_Helper): Update comment. Code cleanup. * exp_util.adb (Build_Procedure_Form): Use new predefined name Name_UP_RESULT. * snames.ads-tmpl (Name_UP_RESULT): New predefined name. Code cleanup: remove unused names from the project parser, moved to gprbuild sources. * xsnamest.adb: Add support for uppercase names.
2020-11-30[Ada] Spurious visibility error in subprogram body in with_clauseEd Schonberg1-0/+7
gcc/ada/ * sem_util.adb (Enter_Name): When an inherited operation for a local derived type is hidden by an explicit declaration of a non-overloadable entity in the same scope, make the inherited operation non-visible to prevent its accidental use elsewhere.
2020-11-30tree-optimization/98064 - fix BB SLP live lane extract wrt LC SSARichard Biener2-0/+43
This avoids breaking LC SSA when SLP codegen pulled an out-of-loop def into a loop when merging with in-loop defs for an external def. 2020-11-30 Richard Biener <rguenther@suse.de> PR tree-optimization/98064 * tree-vect-loop.c (vectorizable_live_operation): Avoid breaking LC SSA for BB vectorization. * g++.dg/vect/pr98064.cc: New testcase.
2020-11-30changelog: allow subdir wildcard entryMartin Liska3-3/+34
contrib/ChangeLog: * gcc-changelog/git_commit.py: Allow sub-directory wildcard changelog entry. Fix a typo caused by apostrophe escaping. * gcc-changelog/test_email.py: Test it. * gcc-changelog/test_patches.txt: Likewise.
2020-11-30doc: Fix description of dg-require-effective-targetJonathan Wakely1-1/+1
The optional target selector for the dg-require-effective-target directive needs to be { target selector } not just { selector } as currently documented. gcc/ChangeLog: * doc/sourcebuild.texi (Directives): Fix description of dg-require-effective-target to include "target" in selector.
2020-11-30tree-optimization/98048 - fix vector lowering of ABSU_EXPRRichard Biener2-1/+15
This makes sure to use the correct type for the LHS of the scalar replacement statement. 20220-11-30 Richard Biener <rguenther@suse.de> PR tree-optimization/98048 * tree-vect-generic.c (expand_vector_operations_1): Use the correct type for the scalar LHS replacement. * gcc.dg/vect/pr98048.c: New testcase.
2020-11-30gimple ISEL: fix BB stmt iterationMartin Liska1-0/+2
gcc/ChangeLog: PR tree-optimization/98066 * gimple-isel.cc (gimple_expand_vec_exprs): Return when gimple_expand_vec_exprs replaces last stmt.
2020-11-30gcc-changelog: Add libstdc++-v3/testsuite to wildcard prefixesJonathan Wakely1-1/+2
This allows using "testsuite/*" in libstdc++-v3/ChangeLog entries, which was one of the original motivations for adding wildcard support in the first place: https://gcc.gnu.org/pipermail/gcc/2020-June/232719.html contrib/ChangeLog: * gcc-changelog/git_commit.py (wildcard_prefixes): Add libstdc++ testsuite directory.
2020-11-30rtl_dump_bb: fix segfault when reporting internal errorIlya Leoshkevich1-1/+9
During ICE reporting, sometimes rtl_dump_bb is called on partially initialized basic blocks. This produces another ICE, obscuring the original problem. Fix by checking that that basic blocks are initialized before touching their bb_infos. gcc/ChangeLog: 2020-11-25 Ilya Leoshkevich <iii@linux.ibm.com> * cfgrtl.c (rtl_bb_info_initialized_p): New function. (rtl_dump_bb): Use rtl_bb_info_initialized_p before accessing bb insns.
2020-11-30d: Add freebsd support for D compiler and runtimeIain Buclaw4-0/+69
gcc/ChangeLog: PR d/87818 * config.gcc (*-*-freebsd*): Add freebsd-d.o and t-freebsd. * config/freebsd-d.c: New file. * config/t-freebsd: New file. libphobos/ChangeLog: PR d/87818 * configure.tgt: Add x86_64-*-freebsd* and i?86-*-freebsd* as supported targets.
2020-11-30[Obvious] arm: Fix test from failing on some targets [PR91816]Stam Markianos-Wright1-2/+3
This recently submitted test was found to fail on some Cortex-M targets. This was because codegen on these CPUs would emit a ldr instead of a movw/movt pair, resulting in an overall smaller test (i.e. the branch wasn't as far) and the behaviour being tested for not being triggered. This commit doubles the size of the test to account for this. gcc/testsuite/ChangeLog: * gcc.target/arm/pr91816.c: New test.
2020-11-30expansion: Improve double-word modulo by certain constant divisors [PR97459]Jakub Jelinek5-1/+337
As discussed in the PR, e.g. on x86_64 (both -m32 and -m64) there is no double-word modulo and so we expand it to a __{,u}mod[dt]i3 call. For certain constant divisors we can do better. E.g. consider 32-bit word-size, 0x100000000ULL % 3 == 1, so we can use partly the Hacker's delight modulo by summing digits approach and optimize unsigned long long foo (unsigned long long x) { return x % 3; } as unsigned long long foo (unsigned long long x) { unsigned int sum, carry; carry = __builtin_add_overflow ((unsigned int) x, (unsigned int) (x >> 32), &sum); sum += carry; return sum % 3; } Similarly, 0x10000000ULL % 5 == 1 (note, 1 << 28), so unsigned long long bar (unsigned long long x) { return x % 5; } as unsigned long long bar (unsigned long long x) { unsigned int sum = x & ((1 << 28) - 1); sum += (x >> 28) & ((1 << 28) - 1); sum += (x >> 56); return sum % 5; } etc. And we can do also signed modulo, long long baz (long long x) { return x % 5; } as long long baz (long long x) { unsigned int sum = x & ((1 << 28) - 1); sum += ((unsigned long long) x >> 28) & ((1 << 28) - 1); sum += ((unsigned long long) x >> 56); /* Sum adjustment for negative x. */ sum += (x >> 63) & 3; unsigned int rem = sum % 5; /* And finally adjust it to the right interval for negative values. */ return (int) (rem + ((x >> 63) & -4)); } 2020-11-30 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/97459 * internal-fn.h (expand_addsub_overflow): Declare. * internal-fn.c (expand_addsub_overflow): No longer static. * optabs.c (expand_doubleword_mod): New function. (expand_binop): Optimize double-word mod with constant divisor. * gcc.dg/pr97459-1.c: New test. * gcc.dg/pr97459-2.c: New test.
2020-11-30changelog: Allow wildcard pattern only.Martin Liska1-1/+1
contrib/ChangeLog: * gcc-changelog/git_commit.py: Allow wildcard pattern only.
2020-11-30RISC-V: Always define MULTILIB_DEFAULTSKito Cheng3-88/+12
- Define MULTILIB_DEFAULTS can reduce the total number of multilib if the default arch and ABI are listed in the multilib config. - This also simplify the implementation of --with-multilib-list. gcc/ChangeLog: * config.gcc (riscv*-*-*): Add TARGET_RISCV_DEFAULT_ABI and TARGET_RISCV_DEFAULT_ARCH to tm_defines. Remove including riscv/withmultilib.h for --with-multilib-list. * config/riscv/riscv.h (STRINGIZING): New. (__STRINGIZING): Ditto. (MULTILIB_DEFAULTS): Ditto. * config/riscv/withmultilib.h: Remove.
2020-11-30Fix print_multilib_info when default arguments appear in the option list ↵Kito Cheng1-6/+17
with '!' This issue is found when we try to always define MULTILIB_DEFAULTS for -march and -mabi for RISC-V back-end, however `-print-multi-lib` will skip multi-lib setting if match any one of flag in MULTILIB_DEFAULTS, even some options are specified in the option list with '!'. e.g. We have default march=rv32i and mabi=ilp32. And we have following multi-lib set: ". !march=rv32i !march=rv32im !march=rv32imafc !mabi=ilp32 !mabi=ilp32f;" "rv32i/ilp32 march=rv32i !march=rv32im !march=rv32imafc mabi=ilp32 !mabi=ilp32f;" "rv32im/ilp32 !march=rv32i march=rv32im !march=rv32imafc mabi=ilp32 !mabi=ilp32f;" "rv32imafc/ilp32f !march=rv32i !march=rv32ic !march=rv32im march=rv32imafc !mabi=ilp32 mabi=ilp32f;" `-print-multi-lib` willl show `.` and `rv32imafc/ilp32f` only, because the mabi=ilp32 is matched, however there is `!march=rv32i` in `rv32im/ilp32`, so `rv32im/ilp32` should keep, because it reject march=rv32i. Note: This can be reproduced via following configure options with patch [1]: gcc/configure --target=riscv64-elf --with-arch=rv32i --with-abi=ilp32 \ --with-multilib-generator="rv32i-ilp32--;rv32im-ilp32--;rv32imafc-ilp32f--" [1] https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559707.html gcc/ChangeLog: * gcc.c (print_multilib_info): Check default arguments not appeared in multi-lib option list with '!'
2020-11-29fixed _bswapsi2 functionStefan Kanthak1-4/+4
libgcc * libgcc2.c (bswapsi2): Make constants unsigned.
2020-11-29Fix minor bug in ft32 widening multiplyJeff Law1-3/+3
gcc/ * config/ft32/ft32.md (umulsidi3): Do not allow constants as arguments.
2020-11-30Daily bump.GCC Administrator24-1/+201
2020-11-29PR fortran/98017 - Suspected regression using PACKHarald Anlauf2-0/+17
When substituting a parameter variable of type character, the character length was reset to 1. Fix this by copying the length. gcc/fortran/ChangeLog: * expr.c (simplify_parameter_variable): Fix up character length after copying an array-valued expression. gcc/testsuite/ChangeLog: * gfortran.dg/pr98017.f90: New test.
2020-11-29Fix handling of ignore_stores in ipa_merge_modref_summary_after_inliningJan Hubicka1-2/+2
* ipa-modref.c (ipa_merge_modref_summary_after_inlining): Fix handling of ignore_stores.
2020-11-29Fix freeing of thunk-infoJan Hubicka1-1/+1
PR jit/97867 * symtab-thunks.h (thunk_info::release): Use ggc_delete.
2020-11-29Handle PHIs in compute_objsize.Martin Sebor26-651/+2190
PR middle-end/92936 - missing warning on a past-the-end store to a PHI PR middle-end/92940 - incorrect offset and size in -Wstringop-overflow for out-of-bounds store into VLA and two offset ranges PR middle-end/89428 - missing -Wstringop-overflow on a PHI with variable offset gcc/ChangeLog: PR middle-end/92936 PR middle-end/92940 PR middle-end/89428 * builtins.c (access_ref::access_ref): Initialize member. (access_ref::phi): New function. (access_ref::get_ref): New function. (access_ref::add_offset): Remove duplicate assignment. (maybe_warn_for_bound): Add "maybe" kind of warning messages. (warn_for_access): Same. (inform_access): Rename... (access_ref::inform_access): ...to this. Print PHI arguments. Format offset the same as size and simplify. Improve printing of allocation functions and VLAs. (check_access): Adjust to the above. (gimple_parm_array_size): Change argument. (handle_min_max_size): New function. * builtins.h (class ssa_name_limit_t): Move class here from tree-ssa-strlen.c. (struct access_ref): Declare new members. (gimple_parm_array_size): Change argument. * tree-ssa-strlen.c (maybe_warn_overflow): Use access_ref and simplify. (handle_builtin_memcpy): Correct argument passed to maybe_warn_overflow. (handle_builtin_memset): Same. (class ssa_name_limit_t): Move class to builtins.{h,c}. gcc/testsuite/ChangeLog: PR middle-end/92936 PR middle-end/92940 PR middle-end/89428 * c-c++-common/Wstringop-overflow-2.c: Adjust text of expected informational notes. * g++.dg/warn/Wstringop-overflow-3.C: Same. * g++.dg/warn/Wplacement-new-size.C: Remove a test for a no longer issued warning. * gcc.dg/Warray-bounds-43.c: Removed unused declarations. * gcc.dg/Wstringop-overflow-11.c: Remove xfails. * gcc.dg/Wstringop-overflow-12.c: Same. * gcc.dg/Wstringop-overflow-17.c: Adjust text of expected messages. * gcc.dg/Wstringop-overflow-27.c: Same. Remove xfails. * gcc.dg/Wstringop-overflow-28.c: Adjust text of expected messages. * gcc.dg/Wstringop-overflow-29.c: Same. * gcc.dg/Wstringop-overflow-37.c: Same. * gcc.dg/Wstringop-overflow-46.c: Same. * gcc.dg/Wstringop-overflow-47.c: Same. * gcc.dg/Wstringop-overflow-54.c: Same. * gcc.dg/warn-strnlen-no-nul.c: Add expected warning. * gcc.dg/Wstringop-overflow-7.c: New test. * gcc.dg/Wstringop-overflow-58.c: New test. * gcc.dg/Wstringop-overflow-59.c: New test. * gcc.dg/Wstringop-overflow-60.c: New test. * gcc.dg/Wstringop-overflow-61.c: New test. * gcc.dg/Wstringop-overflow-62.c: New test. * gcc.dg/Wstringop-overflow-63.c: New test. * gcc.dg/Wstringop-overflow-64.c: New test.
2020-11-29d: Add darwin support for D language front-endIain Buclaw8-3/+122
gcc/ChangeLog: * config.gcc (*-*-darwin*): Set d_target_objs and target_has_targetdm. * config/elfos.h (TARGET_D_MINFO_SECTION): New macro. (TARGET_D_MINFO_START_NAME): New macro. (TARGET_D_MINFO_END_NAME): New macro. * config/t-darwin: Add darwin-d.o. * doc/tm.texi: Regenerate. * doc/tm.texi.in (D language and ABI): Add @hook for TARGET_D_MINFO_SECTION, TARGET_D_MINFO_START_NAME, and TARGET_D_MINFO_END_NAME. * config/darwin-d.c: New file. gcc/d/ChangeLog: * d-target.def (d_minfo_section): New hook. (d_minfo_start_name): New hook. (d_minfo_end_name): New hook. * modules.cc: Include d-target.h. (register_moduleinfo): Update to use new targetdm hooks.
2020-11-29configure: Support building D front-end on *-*-darwin*Iain Buclaw2-6/+0
The bootstrap has been confirmed to be succeeding, there's no need to set it as an unsupported language. ChangeLog: PR d/87788 * configure.ac: Don't disable D for *-*-darwin*. * configure: Regenerate.