- 09 Jul, 2019 25 commits
-
-
2019-07-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * libgnat/s-memory.adb: Disable calls to Abort defer/undefer when ZCX_By_Default. From-SVN: r273284
Arnaud Charlet committed -
The compiler does not report an error on a generic type that has a representation clause when its ultimate parent is not a generic formal. 2019-07-09 Javier Miranda <miranda@adacore.com> gcc/ada/ * sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are not allowed for a derivation of a generic type. Extend the current test to check that none of the parents is a generic type. gcc/testsuite/ * gnat.dg/rep_clause8.adb: New testcase. From-SVN: r273283
Javier Miranda committed -
2019-07-09 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * exp_ch9.adb, exp_util.adb, repinfo.adb, sem_ch12.adb, sem_prag.adb, sem_res.adb, sem_spark.adb, sem_util.adb: Minor reformatting. From-SVN: r273282
Hristian Kirtchev committed -
This patch fixes a code generation error on an equality operation one of whose operands is an overloaded call, and several equality operators are visible. The resolution would succes but in some cases the wrong entity was lwfton the equality node, leading to expansion with the wrong interpretation. If the equality operation is the operand of a negation, the resolution of the negation must make direct use of the equality resolution, 2019-07-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Equality_Op): If the node was overloaded, set properly the entity to which the node has been resolved. The original entity is the first one found during analysis, and is not necessarily the resolved one. (Resolve_Op_Not): If the argument of negation is an overloaded equality operation, call its resolution directly given that the context type does not participate in overload resolution. gcc/testsuite/ * gnat.dg/equal7.adb, gnat.dg/equal7_pkg.adb, gnat.dg/equal7_pkg.ads: New testcase. From-SVN: r273281
Ed Schonberg committed -
This patch enables the elaboration order v4.0 as the default elaboration order in GNATbind. The previous v3.0 elaboration order is now referred to as the "legacy elaboration order mechanism" and is available using binder switch -H. 2019-07-09 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * bindo.adb: Remove with and use clauses for Debug. Add with and use clauses for Opt. (Find_Elaboration_Order): Enable the v4.0 elaboration order. The v3.0 mechanism is now available under binder switch -H. * bindusg.adb (Display): Enable switch -H. * debug.adb: Free compiler switch -gnatd_G. Free binder switch -d_N. * sem_elab.adb: Update the section on switches to remove -gnatd_G. (Invocation_Graph_Recording_OK): The invocation graph is now unconditionally recorded in ALI files. * switch-b.adb (Scan_Binder_Switches): Scan switch -H. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update the documentation on compiler switches related to elaboration. Update the documentation on binder switches to include switch -H. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Update the documentation on elaboration order handling in GNAT. * gnat_ugn.texi: Regenerate. From-SVN: r273280
Hristian Kirtchev committed -
In Ada, the name of operators contains a pair of double quotes, which need to be properly escaped when the name appears in the JSON output of -gnatR. The change also ensures that formal parameters are not listed in the layout information, since this information is not back-annotated for them. 2019-07-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * repinfo.adb (List_Entities): Disregard formals altogether. (List_Name): Properly escape the double quote in the JSON output. From-SVN: r273279
Eric Botcazou committed -
Under validity checking mode the compiler may silently skip generating code to perform runtime range checks. 2019-07-09 Javier Miranda <miranda@adacore.com> gcc/ada/ * exp_util.adb (Remove_Side_Effects): Preserve the Do_Range_Check flag. gcc/testsuite/ * gnat.dg/range_check3.adb, gnat.dg/range_check3_pkg.adb, gnat.dg/range_check3_pkg.ads: New testcase. From-SVN: r273278
Javier Miranda committed -
2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * sinfo.ads: Refine comment for Do_Range_Check. From-SVN: r273277
Yannick Moy committed -
In the special GNATprove mode for proof of programs, expand the Enum_Rep attribute reference so that a suitable static integer is in the AST where required by the rest of analysis. There is no impact on compilation. 2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Expand attribute reference on Enum_Rep. From-SVN: r273276
Yannick Moy committed -
This patch removes a spurious bug on the use of the current instance of a generic package G as the actual in a nested instantiation of a generic unit GU that has a formal package whose generic_package name is G. This is only legal if G has no generic formal part, and the formal package declaration is declared with a box or without a formal_paxkage_actual part. 2019-07-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch12.adb (Instantiate_Formal_Package): Handle properly the case where the actual for a formal package in an instance is the current instance of an enclosing generic package. (Check_Formal_Packages): If the formal package declaration is box-initialized or lacks associations altogether, no internal instance was created to verify conformance, and there is no validating package to remove from tree. gcc/testsuite/ * gnat.dg/generic_inst5.adb, gnat.dg/generic_inst6.adb, gnat.dg/generic_inst6_g1-c.adb, gnat.dg/generic_inst6_g1-c.ads, gnat.dg/generic_inst6_g1.ads, gnat.dg/generic_inst6_i1.ads, gnat.dg/generic_inst6_i2.ads, gnat.dg/generic_inst6_x.ads: New testcases. From-SVN: r273275
Ed Schonberg committed -
In GNATprove mode, subprograms with a body to inline should have been filtered in Analyze_Subprogram_Body_Helper to match the conditions for inlining subprograms in GNATprove. Prevent a call to Set_Body_To_Inline in GNATprove mode that did not go through this filtering. There is no impact on compilation. 2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * freeze.adb (Build_Renamed_Body): Do not set body to inline in GNATprove mode. From-SVN: r273274
Yannick Moy committed -
In the special mode for GNATprove, expand the type of static expressions like done during compilation, to both get suitable legality checks and increase the precision of the formal analysis. There is no impact on compilation. 2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * exp_util.adb (Expand_Subtype_From_Expr): Still expand the type of static expressions in GNATprove_Mode. * sem_ch3.adb (Analyze_Object_Declaration): Remove obsolete special case for GNATprove_Mode. From-SVN: r273273
Yannick Moy committed -
2019-07-09 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * doc/gnat_rm/the_gnat_library.rst, doc/gnat_ugn/building_executable_programs_with_gnat.rst, erroutc.adb, libgnat/g-comlin.adb, libgnat/g-comlin.ads, libgnat/g-regexp.ads, libgnat/g-regpat.ads, libgnat/g-spipat.ads, libgnat/s-os_lib.ads, libgnat/s-regexp.ads: Reword "wild card" to "wildcard". * gnat_rm.texi, gnat_ugn.texi: Regenerate. From-SVN: r273272
Piotr Trojanek committed -
Allocator expressions and sub-expressions of (extension) aggregates are implicitly the source of assignments in Ada. Thus, they should be moved when of a deep type when checking ownership rules in SPARK. There is no impact on compilation. 2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_spark.adb (Check_Expression): Handle correctly implicit assignments as part of allocators and (extension) aggregates. (Get_Root_Object): Adapt for new path expressions. (Is_Path_Expression): Return True for (extension) aggregate. From-SVN: r273271
Yannick Moy committed -
2019-07-09 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * einfo.ads: Fix a typo. From-SVN: r273270
Piotr Trojanek committed -
No impact on compilation with GCC. 2019-07-09 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_util.adb (Scope_Within_Or_Same): Handle properly task bodies and protected bodies, so that local variables within have their proper scopes after these constructs have been rewritten during expansion. This patch resembles but is not identical to the code in Scope_Within. From-SVN: r273269
Ed Schonberg committed -
2019-07-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * gnat1drv.adb (Adjust_Global_Switches): Set Dynamic_Elaboration_Checks to True in CodePeer mode. From-SVN: r273268
Arnaud Charlet committed -
Check for declaration of global variables prior to use in the ownership checking for SPARK. There is no impact on compilation. 2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_spark.adb (Get_Perm_Or_Tree): Issue an error when encountering unknown global variable. From-SVN: r273267
Yannick Moy committed -
Checking of the readable status of sub-expressions occurring in the target path of an assignment should occur before the right-hand-side is moved or borrowed or observed. There is no impact on compilation. 2019-07-09 Yannick Moy <moy@adacore.com> gcc/ada/ * sem_spark.adb (Check_Expression): Change signature to take an Extended_Checking_Mode, for handling read permission checking of sub-expressions in an assignment. (Check_Parameter_Or_Global): Adapt to new behavior of Check_Expression for mode Assign. (Check_Safe_Pointers): Do not analyze generic bodies. (Check_Assignment): Separate checking of the target of an assignment. From-SVN: r273266
Yannick Moy committed -
This changes the -gnatRj output from a concatenation of entities to an array of entities, thus making it strictly conforming JSON and easier to be parsed by means of GNATColl or Python. 2019-07-09 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * repinfo.ads (JSON format): Adjust. * repinfo.adb (Need_Blank_Line): Rename to... (Need_Separator): ...this. (Blank_Line): Rename to... (Write_Separator): ...this and add JSON specific handling. (List_Array_Info): Adjust to above renaming. (List_Object_Info): Likewise. (List_Record_Info): Likewise. (List_Subprogram_Info): Likewise. (List_Type_Info): Likewise. (List_Entities): Do not set Need_Blank_Line. (List_Rep_Info): Set Need_Separator and add JSON specific handling. Output a single JSON stream in the normal case. From-SVN: r273265
Eric Botcazou committed -
2019-07-09 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * doc/gnat_ugn/the_gnat_compilation_model.rst: Update doc on -fdump-ada-spec now that we generate Ada 2012. * gnat_ugn.texi: Regenerate. From-SVN: r273264
Arnaud Charlet committed -
2019-07-09 Martin Liska <mliska@suse.cz> * lto-compress.c (lto_normalized_zstd_level): Do not use ZSTD_CLEVEL_DEFAULT as it is not default in old releases of libzstd. One can use 0 as a default compression level. From-SVN: r273263
Martin Liska committed -
2019-07-09 Martin Liska <mliska@suse.cz> * doc/invoke.texi: Add link from -fprofile-dir option. Use better wording for 'gcno filename'. From-SVN: r273262
Martin Liska committed -
PR middle-end/71924 - missing -Wreturn-local-addr returning alloca result PR middle-end/90549 - missing -Wreturn-local-addr maybe returning an address of a local array plus offset gcc/ChangeLog: PR middle-end/71924 PR middle-end/90549 * gimple-ssa-isolate-paths.c (isolate_path): Add attribute. Update comment. (args_loc_t): New type. (args_loc_t, locmap_t): same. (diag_returned_locals): New function. (is_addr_local): Same. (handle_return_addr_local_phi_arg, warn_return_addr_local): Same. (find_implicit_erroneous_behavior): Call warn_return_addr_local_phi_arg. (find_explicit_erroneous_behavior): Call warn_return_addr_local. gcc/testsuite/ChangeLog: PR middle-end/71924 PR middle-end/90549 * gcc.c-torture/execute/return-addr.c: New test. * gcc.dg/Wreturn-local-addr-2.c: New test. * gcc.dg/Wreturn-local-addr-4.c: New test. * gcc.dg/Wreturn-local-addr-5.c: New test. * gcc.dg/Wreturn-local-addr-6.c: New test. * gcc.dg/Wreturn-local-addr-7.c: New test. * gcc.dg/Wreturn-local-addr-8.c: New test. * gcc.dg/Wreturn-local-addr-9.c: New test. * gcc.dg/Wreturn-local-addr-10.c: New test. * gcc.dg/Walloca-4.c: Handle expected warnings. * gcc.dg/pr41551.c: Same. * gcc.dg/pr59523.c: Same. * gcc.dg/tree-ssa/pr88775-2.c: Same. * gcc.dg/tree-ssa/alias-37.c: Same. * gcc.dg/winline-7.c: Same. From-SVN: r273261
Martin Sebor committed -
From-SVN: r273260
GCC Administrator committed
-
- 08 Jul, 2019 15 commits
-
-
tree-vect-stmts.c (scan_operand_equal_p): Look through MEM_REF with SSA_NAME address of POINTER_PLUS_EXPR. * tree-vect-stmts.c (scan_operand_equal_p): Look through MEM_REF with SSA_NAME address of POINTER_PLUS_EXPR. Handle MULT_EXPR and casts in offset when different, both through gimple stmts and through trees. Rewritten using loops to minimize code duplication for each operand. * g++.dg/vect/simd-6.cc: Replace xfail with target x86. * g++.dg/vect/simd-9.cc: Likewise. * testsuite/libgomp.c++/scan-13.C: Replace xfail with target x86. * testsuite/libgomp.c++/scan-16.C: Likewise. From-SVN: r273249
Jakub Jelinek committed -
re PR c++/91110 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in cp_omp_mappable_type_1, at cp/decl2.c:1421) PR c++/91110 * decl2.c (cp_omp_mappable_type_1): Don't emit any note for error_mark_node type. * g++.dg/gomp/pr91110.C: New test. From-SVN: r273248
Jakub Jelinek committed -
* emit-rtl.c (set_insn_locations): New function moved from... * function.c (set_insn_locations): ...here. * ira-emit.c (emit_moves): Propagate location of the first instruction to the inserted move instructions. * reg-stack.c (compensate_edge): Set the location if the sequence is inserted on the edge. * rtl.h (set_insn_locations): Declare. From-SVN: r273247
Eric Botcazou committed -
The function rs6000_machine_from_flags chooses what .machine string to used based on the rs6000_isa_flags flags. For that it checks for each ISA level if something for its ISA_*_MASKS is selected. This does not work for GFXOPT and GPOPT: these are set as flags in ISA_2_5_MASKS_SERVER, but they aren't actually new there, they just are not selected by default for older ISAs (they were optional). This patch makes OPTION_MASK_PPC_GFXOPT and OPTION_MASK_PPC_GPOPT not influence the .machine selection. * config/rs6000/rs6000.c (rs6000_machine_from_flags): Ignore OPTION_MASK_PPC_GFXOPT and OPTION_MASK_PPC_GPOPT for selecting the .machine string. From-SVN: r273246
Segher Boessenkool committed -
This testcase tests that with -mcpu=power8 we do not generate any mtvsr* instructions, and we do the copy with {l,st}xvd2x. gcc/testsuite/ PR rtl-optimization/88233 * gcc.target/powerpc/pr88233.c: New testcase. From-SVN: r273245
Segher Boessenkool committed -
Currently the second lower-subreg pass is run right before RA. This is much too late to be very useful. At least for targets that do not have RTL patterns for operations on multi-register modes it is a lot better to split patterns earlier, before combine and all related passes. This adds an option -fsplit-wide-types-early that does that, and enables it by default for rs6000. PR rtl-optimization/88233 * common.opt (fsplit-wide-types-early): New option. * common/config/rs6000/rs6000-common.c (rs6000_option_optimization_table): Add OPT_fsplit_wide_types_early for OPT_LEVELS_ALL. * doc/invoke.texi (Optimization Options): Add -fsplit-wide-types-early. * lower-subreg.c (pass_lower_subreg2::gate): Add test for flag_split_wide_types_early. (pass_data_lower_subreg3): New. (pass_lower_subreg3): New. (make_pass_lower_subreg3): New. * passes.def (pass_lower_subreg2): Move after the loop passes. (pass_lower_subreg3): New, inserted where pass_lower_subreg2 was. * tree-pass.h (make_pass_lower_subreg2): Move up, to its new place in the pass pipeline; its previous place is taken by ... (make_pass_lower_subreg3): ... this. From-SVN: r273240
Segher Boessenkool committed -
The gcc.c-torture/execute/builtins/lib directory contains a reimplementation of many C library string functions, which causes non-trivial register allocation bugs with LTO and static linked libraries. To fix this long-standing test issue, turn off ipa-ra which avoids the register corruption across calls. All builtin torture tests now pass on aarch64-none-elf. Committed as obvious. testsuite/ PR testsuite/91059 PR testsuite/78529 * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra. From-SVN: r273238
Wilco Dijkstra committed -
Define s390_shift_truncation_mask to allow the optabs optimization sh = (64 - sh) -> sh = -sh for a rotation operation. gcc/ChangeLog: 2019-07-08 Robin Dapp <rdapp@linux.ibm.com> * config/s390/s390.c (s390_shift_truncation_mask): Define. (TARGET_SHIFT_TRUNCATION_MASK): Define. gcc/testsuite/ChangeLog: 2019-07-08 Robin Dapp <rdapp@linux.ibm.com> * gcc.target/s390/rotate-truncation-mask.c: New test. From-SVN: r273237
Robin Dapp committed -
Add s390_valid_shift_count to determine the validity of a shift-count operand. This is used to replace increasingly complex substitutions that should have allowed address-style shift-count handling, an and mask as well as no-op subregs on the operand. gcc/ChangeLog: 2019-07-08 Robin Dapp <rdapp@linux.ibm.com> * config/s390/constraints.md: Add new jsc constraint. * config/s390/predicates.md: New predicates. * config/s390/s390-protos.h (s390_valid_shift_count): New function. * config/s390/s390.c (s390_valid_shift_count): New function. (print_shift_count_operand): Use s390_valid_shift_count. (print_operand): Likewise. * config/s390/s390.md: Use new predicate. * config/s390/subst.md: Remove addr_style_op and masked_op substs. * config/s390/vector.md: Use new predicate. 2019-07-08 Robin Dapp <rdapp@linux.ibm.com> * gcc.target/s390/combine-rotate-modulo.c: New test. * gcc.target/s390/combine-shift-rotate-add-mod.c: New test. * gcc.target/s390/vector/combine-shift-vec.c: New test. From-SVN: r273236
Robin Dapp committed -
2019-07-08 Kito Cheng <kito.cheng@sifive.com> * MAINTAINERS (Write After Approval): Remove myself, already listed in RISC-V port maitainer. From-SVN: r273235
Kito Cheng committed -
2019-07-08 Richard Biener <rguenther@suse.de> PR tree-optimization/91108 * tree-ssa-sccvn.c: Include builtins.h. (vn_reference_lookup_3): Use only alignment constraints to verify same-valued store disambiguation. * gcc.dg/tree-ssa/ssa-fre-61.c: Adjust back. * gcc.dg/tree-ssa/ssa-fre-78.c: New testcase. From-SVN: r273232
Richard Biener committed -
* testsuite/gcc.dg/vect/slp-reduc-sad.c (uint32_t): Remove unused declaration. From-SVN: r273231
Joern Rennecke committed -
Fixes github.com/riscv/riscv-gcc issue #161. We were accidentally using BITS_PER_WORD to compute shift counts when we should have been using the bitsize of the operand modes. This was wrong when we had an SImode shift and a 64-bit target. Andrew Waterman <andrew@sifive.com> gcc/ * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1] bitsize instead of BITS_PER_WORD. gcc/testsuite/ * gcc.target/riscv/shift-shift-2.c: Add one more test. From-SVN: r273230
Jim Wilson committed -
2019-07-08 Martin Liska <mliska@suse.cz> * collect2.c (defined): Revert to before r254460. (scan_prog_file): Revert to before r254460. From-SVN: r273229
Martin Liska committed -
2019-07-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/65143 * g++.dg/tree-ssa/final2.C: New. * g++.dg/tree-ssa/final3.C: Likewise. From-SVN: r273228
Paolo Carlini committed
-