aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-09[Ada] Fix wrong type being used for range check generationGhjuvan Lacambre1-2/+4
2020-06-09 Ghjuvan Lacambre <lacambre@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Qualified_Expression): Use Subtype_Mark type.
2020-06-09[Ada] Expand more others aggregates staticallyArnaud Charlet1-58/+57
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_aggr.adb (Max_Aggregate_Size): New function to factorize code. (Convert_To_Positional, Aggr_Size_OK): Use Max_Aggregate_Size.
2020-06-09[Ada] Code refactoring on calls to Set_Debug_Info_NeededArnaud Charlet4-7/+17
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_util.ads, sem_util.adb (Set_Debug_Info_Defining_Id): New. * exp_ch3.adb, exp_ch8.adb: Call Set_Debug_Info_Defining_Id when relevant.
2020-06-09[Ada] Missing documentation for Returns_By_RefJustin Squirek1-3/+5
2020-06-09 Justin Squirek <squirek@adacore.com> gcc/ada/ * einfo.ads (Returns_By_Ref): Modify documentation to reflect that Returns_By_Ref can be applied to E_Subprogram_Type entities.
2020-06-09[Ada] Spurious overlap error on zero-sized arrays with -gnateVJustin Squirek1-27/+64
2020-06-09 Justin Squirek <squirek@adacore.com> gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Modify expansion of 'Overlaps_Storage to take into account zero sized arrays.
2020-06-09[Ada] Write_Invocation_Graph_Vertex: include lib item nameBob Duff9-1420/+1415
2020-06-09 Bob Duff <duff@adacore.com> gcc/ada/ * bindo-graphs.adb, bindo-graphs.ads: For each invocation graph, record the corresponding library graph. * bindo-writers.adb (Write_Invocation_Graph_Vertex): Print the lib item name. Remove library graph parameters. * bindo-augmentors.adb, bindo-augmentors.ads, bindo-builders.adb, bindo-diagnostics.adb, bindo-diagnostics.ads, bindo-elaborators.adb: Remove library graph parameters.
2020-06-09[Ada] Propagate DIC, Invariant and Predicate attributes to viewsEric Botcazou9-120/+230
2020-06-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.adb (Apply_Predicate_Check): Extend trick used for aggregates to qualified aggregates and object declarations * einfo.ads (Has_Own_DIC): Mention the underlying full view. (Has_Own_Invariants): Likewise. (Has_Predicates): Likewise. * exp_util.adb (Build_DIC_Procedure_Declaration): Do not deal with base types explicitly but with underlying full views. (Build_Invariant_Procedure_Declaration): Likewise. * sem_ch13.adb (Build_Predicate_Functions): Do not deal with the full view manually but call Propagate_Predicate_Attributes to propagate attributes to views. (Build_Predicate_Function_Declaration): Likewise. * sem_ch3.adb (Build_Assertion_Bodies_For_Type): Build bodies for private full views with an underlying full view. (Build_Derived_Private_Type): Small comment tweak. (Complete_Private_Subtype): Call Propagate_Predicate_Attributes. (Process_Full_View): Do not deal with base types explicitly for DIC and Invariant attributes. Deal with underlying full views for them. Call Propagate_Predicate_Attributes and deal with underlying full views for them. * sem_ch7.adb (Preserve_Full_Attributes): Do not cross propagate DIC and Invariant attributes between full type and its base type. Propagate Predicate attributes from the full to the private view. * sem_ch9.adb (Analyze_Protected_Type_Declaration): Likewise. (Analyze_Task_Type_Declaration): Likewise. * sem_util.ads (Get_Views): Remove Full_Base parameter and add UFull_Typ parameter. (Propagate_Predicate_Attributes): New procedure. * sem_util.adb (Get_Views): Remove Full_Base parameter and add UFull_Typ parameter. Retrieve the Corresponding_Record_Type from the underlying full view, if any. (Propagate_DIC_Attributes): Remove useless tests. (Propagate_Invariant_Attributes): Likewise. (Propagate_Predicate_Attributes): New procedure.
2020-06-09[Ada] Crash on exit statement within predicated loopJustin Squirek1-8/+16
2020-06-09 Justin Squirek <squirek@adacore.com> gcc/ada/ * exp_ch5.adb (Expand_Predicated_Loop): Perserve the original loop identifier within the expansion.
2020-06-09[Ada] gnatbind: Correct assertions in Add_Edge_Kind_CheckBob Duff2-42/+41
2020-06-09 Bob Duff <duff@adacore.com> gcc/ada/ * bindo-graphs.ads (Library_Graph_Edge_Kind): Reorder enumerals to reflect the order of adding edges. Clarify comments. * bindo-graphs.adb (Add_Edge_Kind_Check): Correct the assertions. Reorder the "when"s to match the order of adding edges, and therefore the order of enumerals in type Library_Graph_Edge_Kind. Change names to "Old_" and "New_" to clarify what's what. Combine Invocation_Edge into the "<=" test. Fix the "raise Program_Error" message, which was backwards.
2020-06-09[Ada] Add debugging messageBob Duff1-1/+1
2020-06-09 Bob Duff <duff@adacore.com> gcc/ada/ * bindo-graphs.adb (Add_Edge_Kind_Check): Add the Image of the old and new Kinds to the raise Program_Error message.
2020-06-09[Ada] Remove bypass for instance bodies from Is_Visible_ComponentEric Botcazou1-33/+0
2020-06-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch3.adb (Is_Visible_Component): Do not special-case bodies of instances.
2020-06-09[Ada] Membership test against a non-excluding subtypeArnaud Charlet1-33/+36
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * exp_ch4.adb (Expand_N_In): Fix handling of null exclusion.
2020-06-09[Ada] Ada2020 AI12-0282: Shared variable control aspects in genericsEd Schonberg1-37/+39
2020-06-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Check_Shared_Variable_Control_Aspects): Require exact match between formal and actual for aspects Atomic, Atomic_Component, Volatile, and Volatile_Components.
2020-06-09[Ada] gnatpp: documentation for --no-separate-return switchBob Duff1-0/+8
2020-06-09 Bob Duff <duff@adacore.com> gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst: Add documentation for the --no-separate-return switch of gnatpp.
2020-06-09[Ada] Add missing tag with -gnatw.dArnaud Charlet1-2/+2
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_warn.adb (Warn_On_Constant_Valid_Condition): Add proper warning tag.
2020-06-09[Ada] Refine implementation of AI05-0149 missing conversion checksArnaud Charlet2-6/+8
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_type.adb (Covers): Fix implementation of AI05-0149. * sem_res.adb: Fix typo.
2020-06-09[Ada] Spurious error on instantiations with Taft_Amendment types and tasksEd Schonberg1-1/+4
2020-06-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * exp_ch9.adb (Build_Master_Renaming): Make name in renaming declaration unique by adding a numeric suffix, to prevent accidental name conflict when several instantiations of a package containing an access_to_incomplete type that designate tasks appear in the same scope.
2020-06-09[Ada] Annotate Ada.Synchronous_Barriers with SPARK_Mode => OffPiotr Trojanek4-4/+4
2020-06-09 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * libgnarl/a-synbar.ads, libgnarl/a-synbar.adb, libgnarl/a-synbar__posix.ads, libgnarl/a-synbar__posix.adb (Ada.Synchronous_Barriers): Annotate with SPARK_Mode => Off.
2020-06-09[Ada] AI1-0201 Relational operators of static string types are now staticArnaud Charlet1-15/+37
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_eval.adb (Eval_Relational_Op, Eval_String_Literal, Eval_Type_Conversion): Relax rules on relational operators and type conversions of static string types.
2020-06-09[Ada] Ada2020: AI12-0301 Predicates and Default_ValueArnaud Charlet3-6/+10
2020-06-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_util.ads, sem_util.adb (Is_Partially_Initialized_Type): Take Default_Value and Default_Component_Value into account. * sem_ch3.adb (Analyze_Object_Declaration): Update comment.
2020-06-09[Ada] Disable assertion regarding Body_Before_Spec_EdgeBob Duff1-1/+6
2020-06-09 Bob Duff <duff@adacore.com> gcc/ada/ * bindo-graphs.adb (Add_Edge_Kind_Check): Disable failing part of the assertion.
2020-06-09c-family: Fix up MEM_REF printing [PR95580]Jakub Jelinek2-2/+19
The C FE in the MEM_REF printing ICEs if the type of the first argument (which due to useless pointer conversions can be an arbitrary type) is a pointer to an incomplete type. The code just wants to avoid printing a cast if it is a pointer to single byte elements. 2020-06-09 Jakub Jelinek <jakub@redhat.com> PR c/95580 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the case when MEM_REF's first argument has type pointer to incomplete type. * gcc.dg/pr95580.c: New test.
2020-06-09match.pd: Optimize ffs comparisons against constants [PR95527]Jakub Jelinek2-0/+220
The following patch implements various optimizations of __builtin_ffs* against constants. 2020-06-09 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/95527 * match.pd (__builtin_ffs (X) cmp CST): New optimizations. * gcc.dg/tree-ssa/pr95527.c: New test.
2020-06-09testsuite: Fix g++.dg/torture/pr95493.C FAIL on i686-linux with -O0.Jakub Jelinek1-1/+1
2020-06-09 Jakub Jelinek <jakub@redhat.com> * g++.dg/torture/pr95493.C: Add -Wno-psabi -w to dg-additional-options.
2020-06-09Fix operator_rshift::op1_range to work better with signed types.Aldy Hernandez1-2/+49
We do this by discarding impossible ranges from the incoming LHS.
2020-06-08xtensa: libgcc: fix PR target/95571Max Filippov2-0/+86
Rewrite uw_install_context without function calls to avoid register spilling in _Unwind_RaiseException during return context installation. 2020-06-08 Max Filippov <jcmvbkbc@gmail.com> gcc/testsuite/ * g++.target/xtensa/pr95571.C: New test. * g++.target/xtensa/xtensa.exp: New testsuite. libgcc/ * config/xtensa/unwind-dw2-xtensa.c (uw_install_context): Merge with uw_install_context_1.
2020-06-09rs6000/testsuite: Allow xxperm* instead of only vperm*Segher Boessenkool10-10/+10
Some testcases failed (esp. with --with-cpu=power9) after my change to prefer xxperm over vperm when all else is equal. Fix that. (This also tightens the relevant REs somewhat). 2020-06-09 Segher Boessenkool <segher@kernel.crashing.org> gcc/testsuite/ * gcc.target/powerpc/fold-vec-perm-char.c: Allow both vperm/vpermr and xxperm/xxpermr. * gcc.target/powerpc/fold-vec-perm-double.c: Ditto. * gcc.target/powerpc/fold-vec-perm-float.c: Ditto. * gcc.target/powerpc/fold-vec-perm-int.c: Ditto. * gcc.target/powerpc/fold-vec-perm-longlong.c: Ditto. * gcc.target/powerpc/fold-vec-perm-pixel.c: Ditto. * gcc.target/powerpc/fold-vec-perm-short.c: Ditto. * gcc.target/powerpc/lvsl-lvsr.c: Ditto. * gcc.target/powerpc/vec-mult-char-2.c: Ditto. * gcc.target/powerpc/vsx-vector-6.p9.c: Also allow xxpermr.
2020-06-09Daily bump.GCC Administrator5-1/+385
2020-06-08openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)Tobias Burnus2-1/+19
gcc/ChangeLog: PR lto/94848 PR middle-end/95551 * omp-offload.c (add_decls_addresses_to_decl_constructor, omp_finish_file): Skip removed items. * lto-cgraph.c (output_offload_tables): Likewise; set force_output to this node for variables and functions. libgomp/ChangeLog: PR lto/94848 PR middle-end/95551 * testsuite/libgomp.fortran/target-var.f90: New test.
2020-06-08bootstrap: Fix --disable-bootstrap with older g++.Jason Merrill3-998/+2
Previously I had AX_CXX_COMPILE_STDCXX in the gcc directory configure, which added -std=c++11 to CXX if needed, but then CXX is overridden from the toplevel directory, so it didn't have the desired effect. Fixed by moving the check to the toplevel. Currently it is only used when building GCC without bootstrapping; other packages that share the toplevel directory can adjust the condition if they also want to require C++11 support. /ChangeLog: * configure.ac: Check AX_CXX_COMPILE_STDCXX if not bootstrapping. * configure: Regenerate. gcc/ChangeLog: * aclocal.m4: Remove ax_cxx_compile_stdcxx.m4. * configure.ac: Remove AX_CXX_COMPILE_STDCXX. * configure: Regenerate.
2020-06-08Add missing ChangeLog entriesJason Merrill1-0/+32
2020-06-08d: Fix regression caused by recent refactoringIain Buclaw2-2/+2
gcc/d/ChangeLog: PR d/95573 * dmd/MERGE: Merge upstream dmd 5041e56f1.
2020-06-08d: Merge upstream dmd 955b8b36f.Iain Buclaw12-280/+60
Merges AndAndExp and OrOrExp into a LogicalExp AST node. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 955b8b36f. * expr.cc (ExprVisitor::visit (AndAndExp *)): Rename type to ... (ExprVisitor::visit (LogicalExp *)): ... this. Handle both 'and if' and 'or if' expression nodes. (ExprVisitor::visit (OrOrExp *)): Remove.
2020-06-08PR fortran/95195 - Fortran testcase should clean up afterwardsHarald Anlauf1-4/+6
Change testcase to check error message (iomsg) at runtime, rather than to crash. libgfortran/ PR fortran/95091 * io/transfer.c (finalize_transfer): Fix type in error message. gcc/testsuite/ PR fortran/95195 * gfortran.dg/namelist_97.f90: Adjust testcase.
2020-06-08PR bootstrap/95555 - powepc64 bootstrap failure due to -Wmaybe-uninitialized ↵Martin Sebor1-0/+7
in reload_cse_simplify_operands gcc/ChangeLog: * postreload.c (reload_cse_simplify_operands): Clear first array element before using it. Assert a precondition.
2020-06-08Fortran : ICE in maybe_canonicalize_comparison_1 PR92993Mark Eggleston1-0/+21
This issue has been fixed by PR94090. Add test case to ensure that this does not re-occur. 2020-06-08 Mark Eggleston <markeggleston@gcc.gnu.org> gcc/testsuite/ PR fortran/92993 * gfortran.dg/pr92993.f90: New test.
2020-06-08forwprop: Ignore scalar mode vectors in simplify_vector_constructor [PR95528]Jakub Jelinek2-0/+38
As mentioned in the PR, the problem is that at least the x86 backend asumes that the vec_unpack* and vec_pack* optabs with integral modes are for the AVX512-ish vector masks rather than for very small vectors done in GPRs. The only other target that seems to have a scalar mode vec_{,un}pack* optab is aarch64 as discussed in the PR, so there is also a condition for that. All other targets have just vector mode optabs. 2020-06-08 Jakub Jelinek <jakub@redhat.com> PR target/95528 * tree-ssa-forwprop.c (simplify_vector_constructor): Don't use VEC_UNPACK*_EXPR or VEC_PACK_TRUNC_EXPR with scalar modes unless the type is vector boolean. * g++.dg/opt/pr95528.C: New test.
2020-06-08testsuite: Fix up pr95548.C testcase.Jakub Jelinek1-4/+6
2020-06-08 Jakub Jelinek <jakub@redhat.com> PR lto/95548 * g++.dg/torture/pr95548.C: Change from dg-do compile to dg-do link, add return type for main, for __SIZEOF_INT128__ test with __uint128_t enumerator constants and add a test with unsigned long long enumerators for all targets.
2020-06-08AArch64: Expand on comment of stack-clash and implicit probing through LR.Tamar Christina1-1/+3
This expands the comment on an assert we have in aarch64_layout_frame and points to an existing comment somewhere else that has a much longer explanation of what's going on. Committed under the GCC Obvious rule. gcc/ChangeLog: * config/aarch64/aarch64.c (aarch64_layout_frame): Expand comments.
2020-06-08[arm] Fix vfp_operand_register for VFP HI regsChristophe Lyon1-1/+1
While looking at PR target/94743 I noticed an ICE when I tried to save all the FP registers: this was because all HI registers wouldn't match vfp_register_operand. gcc/ChangeLog: * config/arm/predicates.md (vfp_register_operand): Use VFP_HI_REGS instead of VFP_REGS.
2020-06-08rs6000: Replace FAIL with gcc_unreachableMartin Liska1-9/+9
gcc/ChangeLog: * config/rs6000/vector.md: Replace FAIL with gcc_unreachable in all vcond* patterns.
2020-06-08[arm] (header usage fix) include c++ algorithm header via system.hChristophe Lyon1-1/+1
After the recent commit that forces uses of c++11, the arm part failed to build because it does not include <algorithm> via system.h as should be done. This results in: from /gcc/common/config/arm/arm-common.c:34: /usr/lib/gcc/x86_64-linux-gnu/5/include/mm_malloc.h:42:12: error: attempt to use poisoned "malloc" return malloc (size); This patch fixes the problem by defining INCLUDE_ALGORITHM before including system.h and no longer includes <algorithm> directly. gcc/ChangeLog: * common/config/arm/arm-common.c (INCLUDE_ALGORITHM): Define. No longer include <algorithm>.
2020-06-08[Ada] Implement AI12-0073 (Ravenscar disallows Synchronous_Barriers)Steve Baird1-5/+26
2020-06-08 Steve Baird <baird@adacore.com> gcc/ada/ * sem_prag.adb (Analyze_Pragma.Set_Ravenscar_Profile): Add appropriate call to Set_Restriction_No_Dependence if Ada_Version >= Ada2012 and Profile is either Ravenscar or a GNAT-defined Ravenscar variant (i.e., not Jorvik).
2020-06-08[Ada] AI12-0204 Renaming of a prefixed viewArnaud Charlet2-2/+18
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_ch5.adb: Fix typo. * sem_ch8.adb (Analyze_Renamed_Primitive_Operation): Check that the prefix of a prefixed view must be renamable as an object.
2020-06-08[Ada] AI12-0085 Missing aspect cases for Remote_TypesArnaud Charlet5-8/+31
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_cat.ads: Fix typo. * sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type): Add handling of N_Attribute_Definition_Clause. * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Call Validate_Remote_Access_To_Class_Wide_Type for Storage_Size and Storage_Pool. * sem_attr.adb, exp_ch4.adb: Update comments.
2020-06-08[Ada] Spurious error on call to controlled primitiveJustin Squirek1-3/+4
2020-06-08 Justin Squirek <squirek@adacore.com> gcc/ada/ * sem_ch4.adb (Analyze_One_Call): Add extra condition to the predicate for deciding when a given controlled call is visible.
2020-06-08[Ada] Port a modified expansion of Enum_Rep from GNAT to GNATprovePiotr Trojanek1-10/+3
2020-06-08 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Port changes in frontend expander.
2020-06-08[Ada] Style cleanups in new code for Pure_BarriersPiotr Trojanek1-3/+5
2020-06-08 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * sem_ch13.adb (All_Membership_Choices_Static): Fix style.
2020-06-08[Ada] Implement AI12-0291 (Jorvik profile)Steve Baird4-4/+82
2020-06-08 Steve Baird <baird@adacore.com> gcc/ada/ * libgnat/s-rident.ads: Add Jorvik to the Profile_Name enumeration type. Add an element for Jorvik to the array aggregate that is the initial value of the constant Profile_Info. * targparm.adb (Get_Target_Parameters): Handle "pragma Profile (Jorvik);" similarly to "pragma Profile (Ravenscar);". * snames.ads-tmpl: Declare Name_Jorvik Name_Id. Unlike Ravenscar, Jorvik is not a pragma name and has no corresponding element in the Pragma_Id enumeration type; this means that its declaration must not occur between those of First_Pragma_Name and Last_Pragma_Name. * sem_prag.adb (Analyze_Pragma): Add call to Set_Ravenscar_Profile for Jorvik, similar to the existing calls for Ravenscar and the GNAT Ravenscar variants.
2020-06-08[Ada] AI12-0228 Properties of qualified expressions used as namesArnaud Charlet2-16/+32
2020-06-08 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * sem_ch8.adb (Analyze_Object_Renaming): Update Get_Object_Name to go through N_Qualified_Expression and N_Type_Conversion. Fix another case of wrong usage of E_Anonymous_Access_Type instead of Anonymous_Access_Kind. * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object): Work on the original node. (Is_Aliased_View): Take into account N_Qualified_Expression.