[Bug debug/93888] Incorrect DW_AT_location generated for copy-constructed function argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93888 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:64ba6d17022eeb65f56f0b141c2640f9ab938f97 commit r10-7014-g64ba6d17022eeb65f56f0b141c2640f9ab938f97 Author: Jakub Jelinek Date: Wed Mar 4 12:59:04 2020 +0100 inliner: Copy DECL_BY_REFERENCE in copy_decl_to_var [PR93888] In the following testcase we emit wrong debug info for the karg parameter in the DW_TAG_inlined_subroutine into main. The problem is that the karg PARM_DECL is DECL_BY_REFERENCE and thus in the IL has const K & type, but in the source just const K. When the function is inlined, we create a VAR_DECL for it, but don't set DECL_BY_REFERENCE, so when emitting DW_AT_location, we treat it like a const K & typed variable, but it has DW_AT_abstract_origin which has just the const K type and thus the debugger thinks the variable has const K type. Fixed by copying the DECL_BY_REFERENCE flag. Not doing it in copy_decl_for_dup_finish, because copy_decl_no_change already copies that flag through copy_node and in copy_result_decl_to_var it is undesirable, as we handle DECL_BY_REFERENCE in that case instead by changing the type. 2020-03-04 Jakub Jelinek PR debug/93888 * tree-inline.c (copy_decl_to_var): Copy DECL_BY_REFERENCE flag. * g++.dg/guality/pr93888.C: New test.
[Bug fortran/93462] ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3771
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93462 --- Comment #8 from CVS Commits --- The releases/gcc-8 branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:6352c50d06a8ca0157293ecb0ef1f8a6dc19148a commit r8-10110-g6352c50d06a8ca0157293ecb0ef1f8a6dc19148a Author: Tobias Burnus Date: Wed Mar 4 13:29:25 2020 +0100 [Fortran] Disable front-end optimization for OpenACC atomic (PR93462) Backported from mainline 2020-01-31 Tobias Burnus PR fortran/93462 * frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set in_omp_atomic to true prevent front-end optimization. PR fortran/93462 * gfortran.dg/goacc/atomic-1.f90: New.
[Bug target/87560] ICE in curr_insn_transform, at lra-constraints.c:3892
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87560 --- Comment #8 from CVS Commits --- The master branch has been updated by William Schmidt : https://gcc.gnu.org/g:0b0908c1f27d12a3cbbd3c9fd55aec1fe87586a6 commit r10-7020-g0b0908c1f27d12a3cbbd3c9fd55aec1fe87586a6 Author: Bill Schmidt Date: Wed Mar 4 07:30:29 2020 -0600 rs6000: Fix -mpower9-vector -mno-altivec ICE (PR87560) PR87560 reports an ICE when a test case is compiled with -mpower9-vector and -mno-altivec. This patch terminates compilation with an error when this combination (and other unreasonable ones) are requested. Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Reported error is now: f951: Error: '-mno-altivec' turns off '-mpower9-vector' 2020-03-02 Bill Schmidt PR target/87560 * rs6000-cpus.def (OTHER_ALTIVEC_MASKS): New #define. * rs6000.c (rs6000_disable_incompatible_switches): Add table entry for OPTION_MASK_ALTIVEC.
[Bug c/93949] [8/9/10 Regression] Register const local var will not compile since r0-58166
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93949 --- Comment #7 from CVS Commits --- The releases/gcc-8 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a9e9ff7b8a4d10ccf54dd4a641dd55c1b1645e17 commit r8-10111-ga9e9ff7b8a4d10ccf54dd4a641dd55c1b1645e17 Author: Jakub Jelinek Date: Thu Feb 27 10:45:30 2020 +0100 gimplify: Don't optimize register const vars to static [PR93949] The following testcase is rejected, while it was accepted in 3.4 and earlier (before tree-ssa merge). The problem is that we decide to promote the const variable to TREE_STATIC, but TREE_STATIC DECL_REGISTER VAR_DECLs may only be the global register vars and so assemble_variable/make_decl_rtl diagnoses it. Either we do what the following patch does, where we could consider register as a hint the user doesn't want such optimization, because if something is forced static, it is not "register" anymore and register static is not valid in C either, or we could clear DECL_REGISTER instead, but would still need to punt at least on DECL_HARD_REGISTER cases. 2020-02-27 Jakub Jelinek PR c/93949 * gimplify.c (gimplify_init_constructor): Don't promote readonly DECL_REGISTER variables to TREE_STATIC. * gcc.c-torture/compile/pr93949.c: New test.
[Bug analyzer/93993] ICE in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93993 --- Comment #1 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:3d66e153b40ed000af30a9e569a05f34d5d576aa commit r10-7023-g3d66e153b40ed000af30a9e569a05f34d5d576aa Author: David Malcolm Date: Tue Mar 3 10:53:04 2020 -0500 analyzer: fix ICE on non-lvalue in prune_for_sm_diagnostic [PR93993] PR analyzer/93993 reports another ICE within diagnostic_manager::prune_for_sm_diagnostic in which the expression of interest becomes a non-lvalue (similar to PR 93544, PR 93647, and PR 93950), due to attempting to get an lvalue for a non-lvalue with a NULL context, leading to an ICE when the failure is reported to make_region_for_unexpected_tree_code. The tree in question is an ADDR_EXPR of a VAR_DECL, due to: event 11: switching var of interest from ‘tm’ in callee to ‘&qb’ in caller This patch adds more bulletproofing to the routine by introducing a tentative_region_model_context class that can be passed in such circumstances which records that an error occurred, and then checking to see if an error was recorded, thus avoiding the ICE. This is papering over the problem, but a better solution seems more like stage 1 material. The patch also refactors the error-checking for CONSTANT_CLASS_P. The testcase pr93993.f90 has a false positive: pr93993.f90:19:0: 19 | allocate (tm) ! { dg-warning "dereference of possibly-NULL" } | Warning: dereference of possibly-NULL ‘_6’ [CWE-690] [-Wanalyzer-possible-null-dereference] which appears to be a pre-existing bug affecting any allocate call in Fortran, which I will fix in a followup. gcc/analyzer/ChangeLog: PR analyzer/93993 * checker-path.h (state_change_event::get_lvalue): Add ctxt param and pass it to region_model::get_value call. * diagnostic-manager.cc (get_any_origin): Pass a tentative_region_model_context to the calls to get_lvalue and reject the comparison if errors occur. (can_be_expr_of_interest_p): New function. (diagnostic_manager::prune_for_sm_diagnostic): Replace checks for CONSTANT_CLASS_P with calls to update_for_unsuitable_sm_exprs. Pass a tentative_region_model_context to the calls to state_change_event::get_lvalue and reject the comparison if errors occur. (diagnostic_manager::update_for_unsuitable_sm_exprs): New. * diagnostic-manager.h (diagnostic_manager::update_for_unsuitable_sm_exprs): New decl. * region-model.h (class tentative_region_model_context): New class. gcc/testsuite/ChangeLog: PR analyzer/93993 * gfortran.dg/analyzer/pr93993.f90: New test.
[Bug analyzer/93950] ICE: in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786 with -fanalyzer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93950 --- Comment #4 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:3d66e153b40ed000af30a9e569a05f34d5d576aa commit r10-7023-g3d66e153b40ed000af30a9e569a05f34d5d576aa Author: David Malcolm Date: Tue Mar 3 10:53:04 2020 -0500 analyzer: fix ICE on non-lvalue in prune_for_sm_diagnostic [PR93993] PR analyzer/93993 reports another ICE within diagnostic_manager::prune_for_sm_diagnostic in which the expression of interest becomes a non-lvalue (similar to PR 93544, PR 93647, and PR 93950), due to attempting to get an lvalue for a non-lvalue with a NULL context, leading to an ICE when the failure is reported to make_region_for_unexpected_tree_code. The tree in question is an ADDR_EXPR of a VAR_DECL, due to: event 11: switching var of interest from ‘tm’ in callee to ‘&qb’ in caller This patch adds more bulletproofing to the routine by introducing a tentative_region_model_context class that can be passed in such circumstances which records that an error occurred, and then checking to see if an error was recorded, thus avoiding the ICE. This is papering over the problem, but a better solution seems more like stage 1 material. The patch also refactors the error-checking for CONSTANT_CLASS_P. The testcase pr93993.f90 has a false positive: pr93993.f90:19:0: 19 | allocate (tm) ! { dg-warning "dereference of possibly-NULL" } | Warning: dereference of possibly-NULL ‘_6’ [CWE-690] [-Wanalyzer-possible-null-dereference] which appears to be a pre-existing bug affecting any allocate call in Fortran, which I will fix in a followup. gcc/analyzer/ChangeLog: PR analyzer/93993 * checker-path.h (state_change_event::get_lvalue): Add ctxt param and pass it to region_model::get_value call. * diagnostic-manager.cc (get_any_origin): Pass a tentative_region_model_context to the calls to get_lvalue and reject the comparison if errors occur. (can_be_expr_of_interest_p): New function. (diagnostic_manager::prune_for_sm_diagnostic): Replace checks for CONSTANT_CLASS_P with calls to update_for_unsuitable_sm_exprs. Pass a tentative_region_model_context to the calls to state_change_event::get_lvalue and reject the comparison if errors occur. (diagnostic_manager::update_for_unsuitable_sm_exprs): New. * diagnostic-manager.h (diagnostic_manager::update_for_unsuitable_sm_exprs): New decl. * region-model.h (class tentative_region_model_context): New class. gcc/testsuite/ChangeLog: PR analyzer/93993 * gfortran.dg/analyzer/pr93993.f90: New test.
[Bug analyzer/93647] ICE in get_lvalue_1, at analyzer/region-model.cc:4613
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93647 --- Comment #4 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:3d66e153b40ed000af30a9e569a05f34d5d576aa commit r10-7023-g3d66e153b40ed000af30a9e569a05f34d5d576aa Author: David Malcolm Date: Tue Mar 3 10:53:04 2020 -0500 analyzer: fix ICE on non-lvalue in prune_for_sm_diagnostic [PR93993] PR analyzer/93993 reports another ICE within diagnostic_manager::prune_for_sm_diagnostic in which the expression of interest becomes a non-lvalue (similar to PR 93544, PR 93647, and PR 93950), due to attempting to get an lvalue for a non-lvalue with a NULL context, leading to an ICE when the failure is reported to make_region_for_unexpected_tree_code. The tree in question is an ADDR_EXPR of a VAR_DECL, due to: event 11: switching var of interest from ‘tm’ in callee to ‘&qb’ in caller This patch adds more bulletproofing to the routine by introducing a tentative_region_model_context class that can be passed in such circumstances which records that an error occurred, and then checking to see if an error was recorded, thus avoiding the ICE. This is papering over the problem, but a better solution seems more like stage 1 material. The patch also refactors the error-checking for CONSTANT_CLASS_P. The testcase pr93993.f90 has a false positive: pr93993.f90:19:0: 19 | allocate (tm) ! { dg-warning "dereference of possibly-NULL" } | Warning: dereference of possibly-NULL ‘_6’ [CWE-690] [-Wanalyzer-possible-null-dereference] which appears to be a pre-existing bug affecting any allocate call in Fortran, which I will fix in a followup. gcc/analyzer/ChangeLog: PR analyzer/93993 * checker-path.h (state_change_event::get_lvalue): Add ctxt param and pass it to region_model::get_value call. * diagnostic-manager.cc (get_any_origin): Pass a tentative_region_model_context to the calls to get_lvalue and reject the comparison if errors occur. (can_be_expr_of_interest_p): New function. (diagnostic_manager::prune_for_sm_diagnostic): Replace checks for CONSTANT_CLASS_P with calls to update_for_unsuitable_sm_exprs. Pass a tentative_region_model_context to the calls to state_change_event::get_lvalue and reject the comparison if errors occur. (diagnostic_manager::update_for_unsuitable_sm_exprs): New. * diagnostic-manager.h (diagnostic_manager::update_for_unsuitable_sm_exprs): New decl. * region-model.h (class tentative_region_model_context): New class. gcc/testsuite/ChangeLog: PR analyzer/93993 * gfortran.dg/analyzer/pr93993.f90: New test.
[Bug analyzer/93544] ICE in get_lvalue_1, at analyzer/region-model.cc:4613
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93544 --- Comment #8 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:3d66e153b40ed000af30a9e569a05f34d5d576aa commit r10-7023-g3d66e153b40ed000af30a9e569a05f34d5d576aa Author: David Malcolm Date: Tue Mar 3 10:53:04 2020 -0500 analyzer: fix ICE on non-lvalue in prune_for_sm_diagnostic [PR93993] PR analyzer/93993 reports another ICE within diagnostic_manager::prune_for_sm_diagnostic in which the expression of interest becomes a non-lvalue (similar to PR 93544, PR 93647, and PR 93950), due to attempting to get an lvalue for a non-lvalue with a NULL context, leading to an ICE when the failure is reported to make_region_for_unexpected_tree_code. The tree in question is an ADDR_EXPR of a VAR_DECL, due to: event 11: switching var of interest from ‘tm’ in callee to ‘&qb’ in caller This patch adds more bulletproofing to the routine by introducing a tentative_region_model_context class that can be passed in such circumstances which records that an error occurred, and then checking to see if an error was recorded, thus avoiding the ICE. This is papering over the problem, but a better solution seems more like stage 1 material. The patch also refactors the error-checking for CONSTANT_CLASS_P. The testcase pr93993.f90 has a false positive: pr93993.f90:19:0: 19 | allocate (tm) ! { dg-warning "dereference of possibly-NULL" } | Warning: dereference of possibly-NULL ‘_6’ [CWE-690] [-Wanalyzer-possible-null-dereference] which appears to be a pre-existing bug affecting any allocate call in Fortran, which I will fix in a followup. gcc/analyzer/ChangeLog: PR analyzer/93993 * checker-path.h (state_change_event::get_lvalue): Add ctxt param and pass it to region_model::get_value call. * diagnostic-manager.cc (get_any_origin): Pass a tentative_region_model_context to the calls to get_lvalue and reject the comparison if errors occur. (can_be_expr_of_interest_p): New function. (diagnostic_manager::prune_for_sm_diagnostic): Replace checks for CONSTANT_CLASS_P with calls to update_for_unsuitable_sm_exprs. Pass a tentative_region_model_context to the calls to state_change_event::get_lvalue and reject the comparison if errors occur. (diagnostic_manager::update_for_unsuitable_sm_exprs): New. * diagnostic-manager.h (diagnostic_manager::update_for_unsuitable_sm_exprs): New decl. * region-model.h (class tentative_region_model_context): New class. gcc/testsuite/ChangeLog: PR analyzer/93993 * gfortran.dg/analyzer/pr93993.f90: New test.
[Bug analyzer/93993] ICE in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93993 --- Comment #2 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:e516294a1acb28d44cfd583cc6a80354044e commit r10-7024-ge516294a1acb28d44cfd583cc6a80354044e Author: David Malcolm Date: Tue Mar 3 16:36:13 2020 -0500 analyzer: handle __builtin_expect [PR93993] The false warning: pr93993.f90:19:0: 19 | allocate (tm) ! { dg-warning "dereference of possibly-NULL" } | Warning: dereference of possibly-NULL ‘_6’ [CWE-690] [-Wanalyzer-possible-null-dereference] in the reproducer for PR analyzer/93993 is due to a BUILTIN_EXPECT in the chain of SSA expressions between the malloc and the condition guarding the edge: the analyzer didn't "know" about the relationship between initial argument to BUILTIN_EXPECT and the return value. This patch implements support for BUILTIN_EXPECT so that the return value is known to be equal to the initial argument. This adds constraints when exploring the CFG edges, eliminating the above false positive. Doing so also eliminated the leak warning from the reproducer. The issue was that leaked_pvs was empty within impl_region_model_context::on_state_leak, due to the leaking region being a view, of type struct Pdtet_8 *, of a region of type struct pdtet_8 *, which led region_model::get_representative_path_var to return a NULL_TREE value. Hence the patch also implements view support for region_model::get_representative_path_var, restoring the leak diagnostic, albeit changing the wording to: Warning: leak of ‘(struct Pdtet_8) qb’ [CWE-401] [-Wanalyzer-malloc-leak] It's not clear to me if we should emit leaks at a fortran "end program" (currently we suppress them for leaks at the end of main). gcc/analyzer/ChangeLog: PR analyzer/93993 * region-model.cc (region_model::on_call_pre): Handle BUILT_IN_EXPECT and its variants. (region_model::add_any_constraints_from_ssa_def_stmt): Split out gassign handling into add_any_constraints_from_gassign; add gcall handling. (region_model::add_any_constraints_from_gassign): New function, based on the above. Add handling for NOP_EXPR. (region_model::add_any_constraints_from_gcall): New function. (region_model::get_representative_path_var): Handle views. * region-model.h (region_model::add_any_constraints_from_ssa_def_stmt): New decl. (region_model::add_any_constraints_from_gassign): New decl. gcc/testsuite/ChangeLog: PR analyzer/93993 * gcc.dg/analyzer/expect-1.c: New test. * gcc.dg/analyzer/malloc-4.c: New test. * gfortran.dg/analyzer/pr93993.f90: Remove xfail from dg-bogus. Move location of leak warning and update message.
[Bug tree-optimization/81401] False positive sprintf warning at O2 (-Wformat-overflow)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81401 --- Comment #5 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:3ca63e1c76b7693b5d3f5ba2567421defc764249 commit r10-7027-g3ca63e1c76b7693b5d3f5ba2567421defc764249 Author: Martin Sebor Date: Wed Mar 4 10:23:49 2020 -0700 PR middle-end/81401 - false positive -Wformat-overflow in a loop gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/builtin-sprintf-warn-24.c: New test.
[Bug analyzer/94028] ICE: in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786 with -fanalyzer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94028 --- Comment #3 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:4ac3eb5c5f157bea22b5ae34b0df254d729dac25 commit r10-7028-g4ac3eb5c5f157bea22b5ae34b0df254d729dac25 Author: David Malcolm Date: Wed Mar 4 12:10:34 2020 -0500 analyzer: add regression test for fixed ICE [PR94028] The C++ reproducer for PR analyzer/94028 generates a similar ICE to that of the Fortran reproducer for PR analyzer/93993 and, like it, was fixed by r10-7023-g3d66e153b40ed000af30a9e569a05f34d5d576aa. This patch adds the C++ reproducer as a regression test. gcc/testsuite/ChangeLog: PR analyzer/94028 * g++.dg/analyzer/pr94028.C: New test.
[Bug analyzer/93993] ICE in make_region_for_unexpected_tree_code, at analyzer/region-model.cc:4786
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93993 --- Comment #4 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:4ac3eb5c5f157bea22b5ae34b0df254d729dac25 commit r10-7028-g4ac3eb5c5f157bea22b5ae34b0df254d729dac25 Author: David Malcolm Date: Wed Mar 4 12:10:34 2020 -0500 analyzer: add regression test for fixed ICE [PR94028] The C++ reproducer for PR analyzer/94028 generates a similar ICE to that of the Fortran reproducer for PR analyzer/93993 and, like it, was fixed by r10-7023-g3d66e153b40ed000af30a9e569a05f34d5d576aa. This patch adds the C++ reproducer as a regression test. gcc/testsuite/ChangeLog: PR analyzer/94028 * g++.dg/analyzer/pr94028.C: New test.
[Bug tree-optimization/93986] [10 Regression] ICE in decompose, at wide-int.h:984 since r10-5451
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93986 --- Comment #3 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:10591cfe6cac200e926a73f3b8065147ce84 commit r10-7030-g10591cfe6cac200e926a73f3b8065147ce84 Author: Martin Sebor Date: Wed Mar 4 15:14:49 2020 -0700 PR tree-optimization/93986 - ICE on mixed-precision wide_int arguments gcc/testsuite/ChangeLog: PR tree-optimization/93986 * gcc.dg/pr93986.c: New test. gcc/ChangeLog: PR tree-optimization/93986 * tree-ssa-strlen.c (maybe_warn_overflow): Convert all wide_int operands to the same precision widest_int to avoid ICEs.
[Bug c++/90432] [9/10 Regression] Internal compiler error with no_unique_address empty type with constructor call followed by value initialized to non-zero
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90432 --- Comment #4 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:6876b269bc7fe6465fedfed87c31e6175992129f commit r10-7031-g6876b269bc7fe6465fedfed87c31e6175992129f Author: Jason Merrill Date: Wed Mar 4 12:08:42 2020 -0500 c++: Fix [[no_unique_address]] and default mem-init [PR90432] output_constructor doesn't like two consecutive entries with fields at the same position; let's avoid adding the one for the empty field. gcc/cp/ChangeLog 2020-03-04 Jason Merrill PR c++/90432 * init.c (perform_member_init): Don't do aggregate initialization of empty field. * constexpr.c (cx_check_missing_mem_inits): Don't enforce initialization of empty field.
[Bug c++/90432] [9/10 Regression] Internal compiler error with no_unique_address empty type with constructor call followed by value initialized to non-zero
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90432 --- Comment #5 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:9af9e004831f8efdfb68c2affea07b17fadd3279 commit r9-8332-g9af9e004831f8efdfb68c2affea07b17fadd3279 Author: Jason Merrill Date: Wed Mar 4 17:30:58 2020 -0500 c++: Fix [[no_unique_address]] and default mem-init [PR90432] output_constructor doesn't like two consecutive entries with fields at the same position; let's avoid adding the one for the empty field. gcc/cp/ChangeLog 2020-03-04 Jason Merrill PR c++/90432 * init.c (perform_member_init): Don't do aggregate initialization of empty field. * constexpr.c (cx_check_missing_mem_inits): Don't enforce initialization of empty field.
[Bug c++/90997] [9 Regression] ICE on a memset in a template in tsubst_copy_and_build, at cp/pt.c:18480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90997 --- Comment #5 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:831d4a690053599d2d0aa9713642b8513fdf8f5b commit r9-8331-g831d4a690053599d2d0aa9713642b8513fdf8f5b Author: Jason Merrill Date: Wed Mar 4 17:30:58 2020 -0500 c++: avoid ICE with __builtin_memset (PR90997). warn_for_memset calls fold_for_warn, which calls fold_non_dependent_expr, so also calling instantiate_non_dependent_expr here is undesirable. gcc/cp/ChangeLog 2020-03-04 Jason Merrill PR c++/90997 * semantics.c (finish_call_expr): Don't call instantiate_non_dependent_expr before warn_for_memset.
[Bug bootstrap/93962] [10 regression] bootstrap fails with gcc/value-prof.c:268:28 : error: format '%lld' expects argument of type 'long long int', but argument 3 hastype 'int'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93962 --- Comment #8 from CVS Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:20a235a8b443a81ea0ec6a10f260b119f2193a69 commit r10-7032-g20a235a8b443a81ea0ec6a10f260b119f2193a69 Author: Jeff Law Date: Wed Mar 4 16:25:11 2020 -0700 Fix format warning which showed up on FreeBSD 11.3. PR bootstrap/93962 * value-prof.c (dump_histogram_value): Use std::abs.
[Bug c++/90505] [9 Regression] g++ rejects valid code
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90505 --- Comment #12 from CVS Commits --- The releases/gcc-9 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:581825efc30ce79d86dfb0ebf378913fdec44adf commit r9-8333-g581825efc30ce79d86dfb0ebf378913fdec44adf Author: Marek Polacek Date: Wed Mar 4 18:49:37 2020 -0500 c++: Fix mismatch in template argument deduction [PR90505] 2020-03-03 Jason Merrill Marek Polacek PR c++/90505 - mismatch in template argument deduction. * pt.c (tsubst): Don't reduce the template level of template parameters when tf_partial. * g++.dg/template/deduce4.C: New test. * g++.dg/template/deduce5.C: New test. * g++.dg/template/deduce6.C: New test. * g++.dg/template/deduce7.C: New test.
[Bug c++/93676] [8/9 Regression] crash in build_value_init
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93676 --- Comment #10 from CVS Commits --- The releases/gcc-9 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:b38d6242be6aeaf83cdf1f990ff3297a697e4488 commit r9-8334-gb38d6242be6aeaf83cdf1f990ff3297a697e4488 Author: Marek Polacek Date: Wed Mar 4 18:57:08 2020 -0500 c++: Fix value-init crash in template [PR93676] PR c++/93676 - value-init crash in template. * init.c (build_new_1): Don't call build_vec_init in a template. * g++.dg/cpp0x/nsdmi-template19.C: New test.
[Bug sanitizer/93436] [9 Regression] ICE during GIMPLE pass: sanopt with -fsanitize=address -fdump-tree-sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93436 --- Comment #5 from CVS Commits --- The releases/gcc-9 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:d8b65123ea2e7f169c3e3972d3942d73f9bc commit r9-8335-gd8b65123ea2e7f169c3e3972d3942d73f9bc Author: Marek Polacek Date: Wed Mar 4 19:02:22 2020 -0500 sanopt: Avoid crash on anonymous parameter [PR93436] PR sanitizer/93436 * sanopt.c (sanitize_rewrite_addressable_params): Avoid crash on null DECL_NAME.
[Bug c++/93299] [9 Regression] ICE in tsubst_copy, at cp/pt.c:15779
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93299 --- Comment #8 from CVS Commits --- The releases/gcc-9 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:2b5d109ba3af320f65cb0707e8733eeea3c96262 commit r9-8336-g2b5d109ba3af320f65cb0707e8733eeea3c96262 Author: Marek Polacek Date: Wed Mar 4 19:04:31 2020 -0500 c++: Fix ICE in tsubst_copy with parenthesized expression [PR93299] PR c++/93299 - ICE in tsubst_copy with parenthesized expression. * pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR. * g++.dg/cpp1y/paren5.C: New test.
[Bug c++/90938] [9/10 Regression] Initializing array with {1} works, but not {0}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90938 --- Comment #13 from CVS Commits --- The master branch has been updated by Martin Sebor : https://gcc.gnu.org/g:cb2409c60aeff498064346f85165531a3bbead14 commit r10-7034-gcb2409c60aeff498064346f85165531a3bbead14 Author: Martin Sebor Date: Wed Mar 4 18:19:31 2020 -0700 PR c++/90938 - Initializing array with {1} works but not {0} gcc/cp/ChangeLog: PR c++/90938 * tree.c (type_initializer_zero_p): Fail for structs initialized with non-structs. gcc/testsuite/ChangeLog: PR c++/90938 * g++.dg/init/array55.C: New test. * g++.dg/init/array56.C: New test. * g++.dg/cpp2a/nontype-class33.C: New test.
[Bug c++/90938] [9 Regression] Initializing array with {1} works, but not {0}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90938 --- Comment #14 from CVS Commits --- The releases/gcc-9 branch has been updated by Martin Sebor : https://gcc.gnu.org/g:1665d97d37559ea7403d5b3e0efd5c5ae416e1ae commit r9-8338-g1665d97d37559ea7403d5b3e0efd5c5ae416e1ae Author: Martin Sebor Date: Wed Mar 4 18:32:40 2020 -0700 PR c++/90938 - Initializing array with {1} works, but not {0} gcc/cp/ChangeLog: PR c++/90938 * tree.c (type_initializer_zero_p): Fail for structs initialized with non-structs. gcc/testsuite/ChangeLog: PR c++/90938 * g++.dg/init/array55.C: New test. * g++.dg/init/array56.C: New test. * g++.dg/cpp2a/nontype-class33.C: New test.
[Bug c++/91607] [9 regression] internal compiler error: in equal, at cp/constexpr.c:1088
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91607 --- Comment #13 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e19f06538c51fed54240a4e98277e62daa00d9b3 commit r9-8339-ge19f06538c51fed54240a4e98277e62daa00d9b3 Author: Jason Merrill Date: Wed Mar 4 23:07:13 2020 -0500 c++: Fix constexpr ICE from const mismatch [PR91607] gcc/cp/ChangeLog 2020-03-04 Jason Merrill PR c++/91607 * constexpr.c (constexpr_call_hasher::equal): Use same_type_ignoring_top_level_qualifiers_p.
[Bug middle-end/93582] [10 Regression] -Warray-bounds gives error: array subscript 0 is outside array bounds of struct E[1]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93582 --- Comment #40 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:fe19699ae2883b252d30f98481d32dabff00744b commit r10-7035-gfe19699ae2883b252d30f98481d32dabff00744b Author: Jakub Jelinek Date: Thu Mar 5 08:00:04 2020 +0100 sccvn: Fix handling of POINTER_PLUS_EXPR in memset offset [PR93582] > > where POINTER_PLUS_EXPR last operand has sizetype type, thus unsigned, > > and in the testcase gimple_assign_rhs2 (def) is thus 0xf001ULL > > which multiplied by 8 doesn't fit into signed HWI. If it would be treated > > as signed offset instead, it would fit (-0xfffLL, multiplied > > by 8 is -0x7ff8LL). Unfortunately with the poly_int obfuscation > > I'm not sure how to convert it from unsigned to signed poly_int. > > mem_ref_offset provides a boiler-plate for this: > > poly_offset_int::from (wi::to_poly_wide (TREE_OPERAND (t, 1)), SIGNED); Thanks, that seems to work. The test now works on both big-endian and little-endian. 2020-03-05 Richard Biener Jakub Jelinek PR tree-optimization/93582 * tree-ssa-sccvn.c (vn_reference_lookup_3): Treat POINTER_PLUS_EXPR last operand as signed when looking for memset offset. Formatting fix. * gcc.dg/tree-ssa/pr93582-11.c: New test. Co-authored-by: Richard Biener
[Bug middle-end/93399] [8/9/10 Regression] Annotate assembler option failure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93399 --- Comment #8 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:febfe87d80c5bc8afd9038136ae7c09910a0d883 commit r10-7037-gfebfe87d80c5bc8afd9038136ae7c09910a0d883 Author: Jakub Jelinek Date: Thu Mar 5 09:12:44 2020 +0100 print-rtl: Fix printing of CONST_STRING in DEBUG_INSNs [PR93399] The following testcase fails to assemble, as CONST_STRING in the DEBUG_INSNs is printed as is, so if it contains \n and/or \r, we are in trouble: .loc 1 14 3 # DEBUG haystack => [si] # DEBUG needle => " " In the gimple dumps we print those (STRING_CSTs) as # DEBUG haystack => D#1 # DEBUG needle => "\n" so this patch uses what we use in tree printing for the CONST_STRINGs too. 2020-03-05 Jakub Jelinek PR middle-end/93399 * tree-pretty-print.h (pretty_print_string): Declare. * tree-pretty-print.c (pretty_print_string): Remove forward declaration, no longer static. Change nbytes parameter type from unsigned to size_t. * print-rtl.c (print_value) : Use pretty_print_string and for shrink way too long strings. * gcc.dg/pr93399.c: New test.
[Bug fortran/92976] [8/9/10 Regression][OOP] ICE in trans_associate_var, at fortran/trans-stmt.c:1963
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92976 --- Comment #3 from CVS Commits --- The releases/gcc-9 branch has been updated by Thomas Kथघnig : https://gcc.gnu.org/g:7beafc829c5b122298093ba517023015611aeca8 commit r9-8340-g7beafc829c5b122298093ba517023015611aeca8 Author: Paul Thomas Date: Thu Mar 5 11:01:59 2020 +0100 Fix ICE in trans_associate_var 2020-03-05 Paul Thomas Backport from trunk PR fortran/92976 * match.c (select_type_set_tmp): Variable 'selector' to replace select_type_stack->selector. If the selector array spec has explicit bounds, make the temporary's bounds deferred. 2020-03-05 Paul Thomas Backport from trunk PR fortran/92976 * gfortran.dg/select_type_48.f90 : New test.
[Bug c++/91607] [9 regression] internal compiler error: in equal, at cp/constexpr.c:1088
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91607 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #14 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:a258e46458043b11495faef119489a776eb68f60 commit r10-7041-ga258e46458043b11495faef119489a776eb68f60 Author: Jason Merrill Date: Thu Mar 5 10:11:36 2020 -0500 c++: Add test for PR91607. PR c++/91607 * g++.dg/cpp0x/constexpr-const3.C: New. --- Comment #15 from Jason Merrill --- Fixed for 9.3.
[Bug c++/90338] [9 Regression] member function pointer non-type template parameter compile fail while matching
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90338 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:c47f6f69745cd41cb7cb00407bf1ff81b2a56124 commit r9-8341-gc47f6f69745cd41cb7cb00407bf1ff81b2a56124 Author: Jason Merrill Date: Thu Mar 5 10:22:25 2020 -0500 c++: Fix SFINAE for invalid non-type tparm types. Just missing the usual SFINAE pattern here. This was fixed for GCC 10 as a drive-by in r277902. gcc/cp/ChangeLog 2020-03-05 Jason Merrill PR c++/90338 * pt.c (invalid_nontype_parm_type_p): Check complain for non-literal and mutable errors.
[Bug target/90311] [9 Regression] wrong code with -O and __builtin_add_overflow() and compare
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90311 --- Comment #12 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c0e184b4ad4b28cbfc94290e8f1169a8297bb0de commit r10-7043-gc0e184b4ad4b28cbfc94290e8f1169a8297bb0de Author: Jakub Jelinek Date: Thu Mar 5 16:59:58 2020 +0100 testsuite: Add testcase for already fixed PR [PR90311] 2020-03-05 Jakub Jelinek PR target/90311 * gcc.c-torture/execute/pr90311.c: New test.
[Bug c++/93753] [8/9 Regression] ICE on a flexible array followed by a member in an anonymous struct with an initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93753 --- Comment #7 from CVS Commits --- The releases/gcc-9 branch has been updated by Martin Sebor : https://gcc.gnu.org/g:9ca4280a921b0094c7ef131c5c8a63b451ab9a05 commit r9-8342-g9ca4280a921b0094c7ef131c5c8a63b451ab9a05 Author: Martin Sebor Date: Thu Mar 5 09:37:25 2020 -0700 Backport fix for PR c++/93753 from trunk. gcc/cp/ChangeLog: Backport from trunk. 2020-02-21 Martin Sebor PR c++/93753 * class.c (check_flexarrays): Tighten up a test for potential members of anonymous structs or unions. gcc/testsuite/ChangeLog: Backport from trunk. 2020-02-21 Martin Sebor PR c++/93753 * g++.dg/ext/flexary36.C: New test.
[Bug libstdc++/94051] #include & is not enough for operator<
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94051 --- Comment #1 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:6a7052832a4791047b0ff4f18dcbb55c93a7336c commit r10-7044-g6a7052832a4791047b0ff4f18dcbb55c93a7336c Author: Jonathan Wakely Date: Thu Mar 5 16:46:28 2020 + libstdc++: allow string_view insertion to work with (PR 94051) I don't think this is actually required to compile, because using operator<< without a definition of the ostream doesn't seem valid to me. But it's easy to make it work. PR libstdc++/94051 * include/std/string_view: Include . * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
[Bug target/90311] [9 Regression] wrong code with -O and __builtin_add_overflow() and compare
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90311 --- Comment #13 from CVS Commits --- The releases/gcc-9 branch has been updated by Richard Earnshaw : https://gcc.gnu.org/g:d37244b40d20a54a12ee207a73518ad0f4edd88f commit r9-8344-gd37244b40d20a54a12ee207a73518ad0f4edd88f Author: Richard Earnshaw Date: Thu Jul 18 13:56:52 2019 + arm: Fix incorrect modes with 'borrow' operations [PR90311] Looking through the arm backend I noticed that the modes used to pass comparison types into subtract-with-carry operations were being incorrectly set. The result is that the compiler is not truly self-consistent. To clean this up I've introduced a new predicate, arm_borrow_operation (borrowed from the AArch64 backend) which can match the comparison type with the required mode and then fixed all the patterns to use this. The split patterns that were generating incorrect modes have all obviously been fixed as well. The basic rule for the use of a borrow is: - if the condition code was set by a 'subtract-like' operation (subs, cmp), then use CCmode and LTU. - if the condition code was by unsigned overflow of addition (adds), then use CC_Cmode and GEU. gcc: PR target/90311 Backport from master * config/arm/predicates.md (arm_borrow_operation): New predicate. * config/arm/arm.c (subdi3_compare1): Use CCmode for the split. (arm_subdi3, subdi_di_zesidi, subdi_di_sesidi): Likewise. (subdi_zesidi_zesidi): Likewise. (negdi2_compare, negdi2_insn): Likewise. (negdi_extensidi): Likewise. (negdi_zero_extendsidi): Likewise. (arm_cmpdi_insn): Likewise. (subsi3_carryin): Use arm_borrow_operation. (subsi3_carryin_const): Likewise. (subsi3_carryin_const0): Likewise. (subsi3_carryin_compare): Likewise. (subsi3_carryin_compare_const): Likewise. (subsi3_carryin_compare_const0): Likewise. (subsi3_carryin_shift): Likewise. (rsbsi3_carryin_shift): Likewise. (negsi2_carryin_compare): Likewise. gcc/testsuite: 2020-03-05 Jakub Jelinek Backport from master PR target/90311 * gcc.c-torture/execute/pr90311.c: New test.
[Bug libstdc++/93470] [9 Regression] [C++2a] std::reference_wrapper to function type is broken with Clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93470 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:08ed34284f4e6ac9a4e647d9caa82ee4b4de0fa3 commit r9-8345-g08ed34284f4e6ac9a4e647d9caa82ee4b4de0fa3 Author: Jonathan Wakely Date: Thu Mar 5 16:52:19 2020 + libstdc++: Avoid using sizeof with function types (PR 93470) Backport from mainline 2020-01-28 Jonathan Wakely PR libstdc++/93470 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict static assertion to object types.
[Bug libstdc++/91910] Debug mode: there is a racing condition between destructors of iterator and the associated container.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91910 --- Comment #8 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:9d0ad2d40ee86ad47913b06b7585d67bd216ce4f commit r9-8348-g9d0ad2d40ee86ad47913b06b7585d67bd216ce4f Author: Jonathan Wakely Date: Thu Mar 5 16:53:20 2020 + PR libstdc++/91910 fix data race in Debug Mode destructors Fix data race when _Safe_iterator_base::_M_detach() runs concurrently with the _Safe_container_base destructor. Backport from mainline 2019-09-27 Jonathan Wakely PR libstdc++/91910 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer atomically and lock the mutex before accessing the sequence. (_Safe_local_iterator_base::_M_detach()): Likewise. (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
[Bug target/94046] cast to __m256d in mask argument of avx2 float gather intrinsics
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94046 --- Comment #5 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:3a0e583bf17240e55fee7b490e13753cca52bfe1 commit r10-7048-g3a0e583bf17240e55fee7b490e13753cca52bfe1 Author: Jakub Jelinek Date: Thu Mar 5 19:44:42 2020 +0100 i386: Fix some -O0 avx2intrin.h and xopintrin.h intrinsic macros [PR94046] As the testcases show, the macros we have for -O0 for intrinsics that require constant argument(s) should first cast the argument to the type the -O1+ inline uses and afterwards to whatever type e.g. a builtin needs. The PR reported one which violated this, and I've grepped for all double-casts and grepped out from that meaningful casts where the __m{128,256,512}{,d,i} first cast is cast to same sized __v* type and has the same kind of element type (float, double, integral). These 7 macros were using different casts, and I've double checked them against the inline function types. 2020-03-05 Jakub Jelinek PR target/94046 * config/i386/avx2intrin.h (_mm_mask_i32gather_ps): Fix first cast of SRC and MASK arguments to __m128 from __m128d. (_mm256_mask_i32gather_ps): Fix first cast of MASK argument to __m256 from __m256d. (_mm_mask_i64gather_ps): Fix first cast of MASK argument to __m128 from __m128d. * config/i386/xopintrin.h (_mm_permute2_pd): Fix first cast of C argument to __m128i from __m128d. (_mm256_permute2_pd): Fix first cast of C argument to __m256i from __m256d. (_mm_permute2_ps): Fix first cast of C argument to __m128i from __m128. (_mm256_permute2_ps): Fix first cast of C argument to __m256i from __m256. * g++.target/i386/pr94046-1.C: New test. * g++.target/i386/pr94046-2.C: New test.
[Bug target/94046] cast to __m256d in mask argument of avx2 float gather intrinsics
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94046 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:07d52e63d999a0a10c7598c34c48365a357d3d5a commit r9-8350-g07d52e63d999a0a10c7598c34c48365a357d3d5a Author: Jakub Jelinek Date: Thu Mar 5 19:44:42 2020 +0100 i386: Fix some -O0 avx2intrin.h and xopintrin.h intrinsic macros [PR94046] As the testcases show, the macros we have for -O0 for intrinsics that require constant argument(s) should first cast the argument to the type the -O1+ inline uses and afterwards to whatever type e.g. a builtin needs. The PR reported one which violated this, and I've grepped for all double-casts and grepped out from that meaningful casts where the __m{128,256,512}{,d,i} first cast is cast to same sized __v* type and has the same kind of element type (float, double, integral). These 7 macros were using different casts, and I've double checked them against the inline function types. 2020-03-05 Jakub Jelinek PR target/94046 * config/i386/avx2intrin.h (_mm_mask_i32gather_ps): Fix first cast of SRC and MASK arguments to __m128 from __m128d. (_mm256_mask_i32gather_ps): Fix first cast of MASK argument to __m256 from __m256d. (_mm_mask_i64gather_ps): Fix first cast of MASK argument to __m128 from __m128d. * config/i386/xopintrin.h (_mm_permute2_pd): Fix first cast of C argument to __m128i from __m128d. (_mm256_permute2_pd): Fix first cast of C argument to __m256i from __m256d. (_mm_permute2_ps): Fix first cast of C argument to __m128i from __m128. (_mm256_permute2_ps): Fix first cast of C argument to __m256i from __m256. * g++.target/i386/pr94046-1.C: New test. * g++.target/i386/pr94046-2.C: New test.
[Bug c++/93551] [10 Regression] Call from templated function to constrained constructor segfaults when attempting to narrow to bool
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93551 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e50627ff8cd54c3983614b34727323b333b9374d commit r9-8351-ge50627ff8cd54c3983614b34727323b333b9374d Author: Jason Merrill Date: Thu Mar 5 13:45:38 2020 -0500 c++: Avoid ICE on infinite recursion with concepts. This was simple enough to backport even though it's concepts. gcc/cp/ChangeLog 2020-03-05 Jason Merrill PR c++/88395 PR c++/93551 * constraint.cc (constraints_satisfied_p): Use push_tinst_level.
[Bug c++/88395] ICE: Segmentation fault signal terminated program cc1plus, with -std=c++2a -fconcepts
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88395 --- Comment #14 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:e50627ff8cd54c3983614b34727323b333b9374d commit r9-8351-ge50627ff8cd54c3983614b34727323b333b9374d Author: Jason Merrill Date: Thu Mar 5 13:45:38 2020 -0500 c++: Avoid ICE on infinite recursion with concepts. This was simple enough to backport even though it's concepts. gcc/cp/ChangeLog 2020-03-05 Jason Merrill PR c++/88395 PR c++/93551 * constraint.cc (constraints_satisfied_p): Use push_tinst_level.
[Bug tree-optimization/91890] [10 Regression] -Warray-bounds warning testing glibc not suppressed by pragma
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91890 --- Comment #8 from CVS Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:55ace4d14637866466498ed43e02d6f95af98f10 commit r10-7049-g55ace4d14637866466498ed43e02d6f95af98f10 Author: Jeff Law Date: Thu Mar 5 14:01:30 2020 -0700 Fix location maybe_diag_overlap passes to diagnostics so that diagnostic pragmas work better. PR tree-optimization/91890 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Remove LOC argument. Use gimple_or_expr_nonartificial_location. (check_bounds_overlap): Drop LOC argument to maybe_diag_access_bounds. Use gimple_or_expr_nonartificial_location. * gimple.c (gimple_or_expr_nonartificial_location): New function. * gimple.h (gimple_or_expr_nonartificial_location): Declare it. * tree-ssa-strlen.c (maybe_warn_overflow): Use gimple_or_expr_nonartificial_location. (maybe_diag_stxncpy_trunc, handle_builtin_stxncpy_strncat): Likewise. (maybe_warn_pointless_strcmp): Likewise. * gcc.dg/pragma-diag-8.c: New test.
[Bug c/93577] [8/9/10 Regression] internal compiler error: tree check: expected integer_cst, have non_lvalue_expr in get_len, at tree.h:5902
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93577 --- Comment #4 from CVS Commits --- The master branch has been updated by Joseph Myers : https://gcc.gnu.org/g:c9d70946b3c9f10cfd560407aac8b0b4515f10b6 commit r10-7051-gc9d70946b3c9f10cfd560407aac8b0b4515f10b6 Author: Joseph Myers Date: Thu Mar 5 23:48:06 2020 + c: ignore initializers for elements of variable-size types [PR93577] Bug 93577, apparently a regression (although it isn't very clear to me exactly when it was introduced; tests I made with various past compilers produced inconclusive results, including e.g. ICEs appearing with 64-bit-host compilers for some versions but not 32-bit-host compilers for the same versions) is an C front-end tree-checking ICE processing initializers for structs using the VLA-in-struct extension. There is an error for such initializers, but other processing that still takes place for them results in the ICE. This patch ensures that processing of initializers for variable-size types stops earlier to avoid the code that results in the ICE (and ensures it stops earlier for error_mark_node to avoid ICEs in the check for variable-size types), adjusts the conditions for the "empty scalar initializer" diagnostic to avoid consequent excess errors in the case of a bad type name, and adds tests for a few variations on what such initializers might look like, as well as tests for cases identified from ICEs seen with an earlier version of this patch. Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/93577 gcc/c: * c-typeck.c (pop_init_level): Do not diagnose initializers as empty when initialized type is error_mark_node. (set_designator, process_init_element): Ignore initializers for elements of a variable-size type or of error_mark_node. gcc/testsuite: * gcc.dg/pr93577-1.c, gcc.dg/pr93577-2.c, gcc.dg/pr93577-3.c, gcc.dg/pr93577-4.c, gcc.dg/pr93577-5.c, gcc.dg/pr93577-6.c: New tests. * gcc.dg/vla-init-1.c: Expect fewer errors about VLA initializer.
[Bug target/89229] Incorrect xmm16-xmm31/ymm16-ymm31 in vector move
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89229 --- Comment #28 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:5358e8f5800daa0012fc9d06705d64bbb21fa07b commit r10-7054-g5358e8f5800daa0012fc9d06705d64bbb21fa07b Author: H.J. Lu Date: Thu Mar 5 16:45:05 2020 -0800 i386: Properly encode vector registers in vector move On x86, when AVX and AVX512 are enabled, vector move instructions can be encoded with either 2-byte/3-byte VEX (AVX) or 4-byte EVEX (AVX512): 0: c5 f9 6f d1 vmovdqa %xmm1,%xmm2 4: 62 f1 fd 08 6f d1 vmovdqa64 %xmm1,%xmm2 We prefer VEX encoding over EVEX since VEX is shorter. Also AVX512F only supports 512-bit vector moves. AVX512F + AVX512VL supports 128-bit and 256-bit vector moves. xmm16-xmm31 and ymm16-ymm31 are disallowed in 128-bit and 256-bit modes when AVX512VL is disabled. Mode attributes on x86 vector move patterns indicate target preferences of vector move encoding. For scalar register to register move, we can use 512-bit vector move instructions to move 32-bit/64-bit scalar if AVX512VL isn't available. With AVX512F and AVX512VL, we should use VEX encoding for 128-bit/256-bit vector moves if upper 16 vector registers aren't used. This patch adds a function, ix86_output_ssemov, to generate vector moves: 1. If zmm registers are used, use EVEX encoding. 2. If xmm16-xmm31/ymm16-ymm31 registers aren't used, SSE or VEX encoding will be generated. 3. If xmm16-xmm31/ymm16-ymm31 registers are used: a. With AVX512VL, AVX512VL vector moves will be generated. b. Without AVX512VL, xmm16-xmm31/ymm16-ymm31 register to register move will be done with zmm register move. There is no need to set mode attribute to XImode explicitly since ix86_output_ssemov can properly encode xmm16-xmm31/ymm16-ymm31 registers with and without AVX512VL. Tested on AVX2 and AVX512 with and without --with-arch=native. gcc/ PR target/89229 PR target/89346 * config/i386/i386-protos.h (ix86_output_ssemov): New prototype. * config/i386/i386.c (ix86_get_ssemov): New function. (ix86_output_ssemov): Likewise. * config/i386/sse.md (VMOVE:mov_internal): Call ix86_output_ssemov for TYPE_SSEMOV. Remove TARGET_AVX512VL check. (*movxi_internal_avx512f): Call ix86_output_ssemov for TYPE_SSEMOV. (*movoi_internal_avx): Call ix86_output_ssemov for TYPE_SSEMOV. Remove ext_sse_reg_operand and TARGET_AVX512VL check. (*movti_internal): Likewise. (*movtf_internal): Call ix86_output_ssemov for TYPE_SSEMOV. gcc/testsuite/ PR target/89229 PR target/89346 * gcc.target/i386/avx512vl-vmovdqa64-1.c: Updated. * gcc.target/i386/pr89229-2a.c: New test. * gcc.target/i386/pr89229-2b.c: Likewise. * gcc.target/i386/pr89229-2c.c: Likewise. * gcc.target/i386/pr89229-3a.c: Likewise. * gcc.target/i386/pr89229-3b.c: Likewise. * gcc.target/i386/pr89229-3c.c: Likewise. * gcc.target/i386/pr89346.c: Likewise.
[Bug target/89346] Unnecessary EVEX encoding
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89346 --- Comment #4 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:5358e8f5800daa0012fc9d06705d64bbb21fa07b commit r10-7054-g5358e8f5800daa0012fc9d06705d64bbb21fa07b Author: H.J. Lu Date: Thu Mar 5 16:45:05 2020 -0800 i386: Properly encode vector registers in vector move On x86, when AVX and AVX512 are enabled, vector move instructions can be encoded with either 2-byte/3-byte VEX (AVX) or 4-byte EVEX (AVX512): 0: c5 f9 6f d1 vmovdqa %xmm1,%xmm2 4: 62 f1 fd 08 6f d1 vmovdqa64 %xmm1,%xmm2 We prefer VEX encoding over EVEX since VEX is shorter. Also AVX512F only supports 512-bit vector moves. AVX512F + AVX512VL supports 128-bit and 256-bit vector moves. xmm16-xmm31 and ymm16-ymm31 are disallowed in 128-bit and 256-bit modes when AVX512VL is disabled. Mode attributes on x86 vector move patterns indicate target preferences of vector move encoding. For scalar register to register move, we can use 512-bit vector move instructions to move 32-bit/64-bit scalar if AVX512VL isn't available. With AVX512F and AVX512VL, we should use VEX encoding for 128-bit/256-bit vector moves if upper 16 vector registers aren't used. This patch adds a function, ix86_output_ssemov, to generate vector moves: 1. If zmm registers are used, use EVEX encoding. 2. If xmm16-xmm31/ymm16-ymm31 registers aren't used, SSE or VEX encoding will be generated. 3. If xmm16-xmm31/ymm16-ymm31 registers are used: a. With AVX512VL, AVX512VL vector moves will be generated. b. Without AVX512VL, xmm16-xmm31/ymm16-ymm31 register to register move will be done with zmm register move. There is no need to set mode attribute to XImode explicitly since ix86_output_ssemov can properly encode xmm16-xmm31/ymm16-ymm31 registers with and without AVX512VL. Tested on AVX2 and AVX512 with and without --with-arch=native. gcc/ PR target/89229 PR target/89346 * config/i386/i386-protos.h (ix86_output_ssemov): New prototype. * config/i386/i386.c (ix86_get_ssemov): New function. (ix86_output_ssemov): Likewise. * config/i386/sse.md (VMOVE:mov_internal): Call ix86_output_ssemov for TYPE_SSEMOV. Remove TARGET_AVX512VL check. (*movxi_internal_avx512f): Call ix86_output_ssemov for TYPE_SSEMOV. (*movoi_internal_avx): Call ix86_output_ssemov for TYPE_SSEMOV. Remove ext_sse_reg_operand and TARGET_AVX512VL check. (*movti_internal): Likewise. (*movtf_internal): Call ix86_output_ssemov for TYPE_SSEMOV. gcc/testsuite/ PR target/89229 PR target/89346 * gcc.target/i386/avx512vl-vmovdqa64-1.c: Updated. * gcc.target/i386/pr89229-2a.c: New test. * gcc.target/i386/pr89229-2b.c: Likewise. * gcc.target/i386/pr89229-2c.c: Likewise. * gcc.target/i386/pr89229-3a.c: Likewise. * gcc.target/i386/pr89229-3b.c: Likewise. * gcc.target/i386/pr89229-3c.c: Likewise. * gcc.target/i386/pr89346.c: Likewise.
[Bug tree-optimization/90883] Generated code is worse if returned struct is unnamed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90883 --- Comment #33 from CVS Commits --- The master branch has been updated by Kito Cheng : https://gcc.gnu.org/g:46275300312b44e1388b86a45f1600a5a1722303 commit r10-7055-g46275300312b44e1388b86a45f1600a5a1722303 Author: Kito Cheng Date: Tue Mar 3 14:16:42 2020 +0800 re PR tree-optimization/90883 (Generated code is worse if returned struct is unnamed) After add --param max-inline-insns-size=1 all target will remove the redundant store at dse1, except some targets like AArch64 and MIPS will expand the struct initialization into loop due to CLEAR_RATIO. Tested on cross compiler of riscv32, riscv64, x86, x86_64, mips, mips64, aarch64, nds32 and arm. gcc/testsuite/ChangeLog PR tree-optimization/90883 * g++.dg/tree-ssa/pr90883.c: Add --param max-inline-insns-size=1. Add aarch64-*-* mips*-*-* to XFAIL.
[Bug libstdc++/93244] std::filesystem::path::generic_string doesn't convert the first slash on Windows
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93244 --- Comment #6 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:180eeeaeb200a07f7f24e1f203cd026880ff861c commit r10-7062-g180eeeaeb200a07f7f24e1f203cd026880ff861c Author: Jonathan Wakely Date: Fri Mar 6 11:27:34 2020 + libstdc++: Fix failing filesystem::path tests (PR 93244) The checks for PR 93244 don't actually pass on Windows (which is the target where the bug is present) because of a different bug, PR 94063. This adjusts the tests to not be affected by 94063 so that they verify that 93244 was fixed. PR libstdc++/93244 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust test to not fail due to PR 94063. * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise. * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
[Bug libstdc++/94063] filesystem::path concatenation doesn't work for Windows root-paths
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94063 --- Comment #1 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:180eeeaeb200a07f7f24e1f203cd026880ff861c commit r10-7062-g180eeeaeb200a07f7f24e1f203cd026880ff861c Author: Jonathan Wakely Date: Fri Mar 6 11:27:34 2020 + libstdc++: Fix failing filesystem::path tests (PR 93244) The checks for PR 93244 don't actually pass on Windows (which is the target where the bug is present) because of a different bug, PR 94063. This adjusts the tests to not be affected by 94063 so that they verify that 93244 was fixed. PR libstdc++/93244 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust test to not fail due to PR 94063. * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise. * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
[Bug libstdc++/93244] std::filesystem::path::generic_string doesn't convert the first slash on Windows
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93244 --- Comment #7 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b0815713a32c5cc062bd41fa75dac4d4408215fb commit r10-7064-gb0815713a32c5cc062bd41fa75dac4d4408215fb Author: Jonathan Wakely Date: Fri Mar 6 12:03:17 2020 + libstdc++: Fix call to __glibcxx_rwlock_init (PR 93244) When the target doesn't define PTHREAD_RWLOCK_INITIALIZER we use a wrapper around pthread_wrlock_init, but the wrapper only takes one argument and we try to call it with two. This went unnnoticed on most targets because they do define the PTHREAD_RWLOCK_INITIALIZER macro, but it causes a bootstrap failure on darwin8. PR libstdc++/93244 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER] (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect second argument to __glibcxx_rwlock_init. * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
[Bug libstdc++/94069] [9 Regression] doesn't compile unless PTHREAD_RWLOCK_INITIALIZER is defined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94069 --- Comment #3 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:4cdcb2c92a128d2a30a6110084b7ab2f9995c683 commit r10-7065-g4cdcb2c92a128d2a30a6110084b7ab2f9995c683 Author: Jonathan Wakely Date: Fri Mar 6 12:24:37 2020 + libstdc++: Fix PR number in ChangeLog (PR 94069)
[Bug libstdc++/94069] [9 Regression] doesn't compile unless PTHREAD_RWLOCK_INITIALIZER is defined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94069 --- Comment #5 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:39bdebf3725d7681e5e9ba06e3862f8facef3572 commit r9-8353-g39bdebf3725d7681e5e9ba06e3862f8facef3572 Author: Jonathan Wakely Date: Fri Mar 6 12:52:51 2020 + libstdc++: Fix call to __glibcxx_rwlock_init (PR 94069) When the target doesn't define PTHREAD_RWLOCK_INITIALIZER we use a wrapper around pthread_wrlock_init, but the wrapper only takes one argument and we try to call it with two. This went unnnoticed on most targets because they do define the PTHREAD_RWLOCK_INITIALIZER macro, but it causes a bootstrap failure on darwin8. Backport from mainline 2020-03-06 Jonathan Wakely PR libstdc++/94069 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER] (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect second argument to __glibcxx_rwlock_init. * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
[Bug libstdc++/93978] A snippet using views::join fails to compile with -O1, but succeeds with -O0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93978 --- Comment #2 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:6d082cd90131a9c0ce3142217e84194a5bf0de27 commit r10-7066-g6d082cd90131a9c0ce3142217e84194a5bf0de27 Author: Patrick Palka Date: Thu Mar 5 10:04:06 2020 -0500 libstdc++: Give ranges::empty() a concrete return type (PR 93978) This works around PR 93978 by avoiding having to instantiate the body of ranges::empty() when checking the constraints of view_interface::operator bool(). When ranges::empty() has an auto return type, then we must instantiate its body in order to determine whether the requires expression { ranges::empty(_M_derived()); } is well-formed. But this means instantiating view_interface::empty() and hence view_interface::_M_derived(), all before we've yet deduced the return type of join_view::end(). (The reason view_interface::operator bool() is needed in join_view::end() in the first place is because in this function we perform direct initialization of join_view::_Sentinel from a join_view, and so we try to find a conversion sequence from the latter to the former that goes through this conversion operator.) Giving ranges::empty() a concrete return type of bool should be safe according to [range.prim.empty]/4 which says "whenever ranges::empty(E) is a valid expression, it has type bool." This fixes the test case in PR 93978 when compiling without -Wall, but with -Wall the test case still fails due to the issue described in PR c++/94038, I think. I still don't quite understand why the test case doesn't fail without -O. libstdc++-v3/ChangeLog: PR libstdc++/93978 * include/bits/range_access.h (__cust_access::_Empty::operator()): Declare return type to be bool instead of auto. * testsuite/std/ranges/adaptors/93978.cc: New test.
[Bug c++/94038] Compiling with -Wall causes function template body to get needlessly instantiated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94038 --- Comment #3 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:6d082cd90131a9c0ce3142217e84194a5bf0de27 commit r10-7066-g6d082cd90131a9c0ce3142217e84194a5bf0de27 Author: Patrick Palka Date: Thu Mar 5 10:04:06 2020 -0500 libstdc++: Give ranges::empty() a concrete return type (PR 93978) This works around PR 93978 by avoiding having to instantiate the body of ranges::empty() when checking the constraints of view_interface::operator bool(). When ranges::empty() has an auto return type, then we must instantiate its body in order to determine whether the requires expression { ranges::empty(_M_derived()); } is well-formed. But this means instantiating view_interface::empty() and hence view_interface::_M_derived(), all before we've yet deduced the return type of join_view::end(). (The reason view_interface::operator bool() is needed in join_view::end() in the first place is because in this function we perform direct initialization of join_view::_Sentinel from a join_view, and so we try to find a conversion sequence from the latter to the former that goes through this conversion operator.) Giving ranges::empty() a concrete return type of bool should be safe according to [range.prim.empty]/4 which says "whenever ranges::empty(E) is a valid expression, it has type bool." This fixes the test case in PR 93978 when compiling without -Wall, but with -Wall the test case still fails due to the issue described in PR c++/94038, I think. I still don't quite understand why the test case doesn't fail without -O. libstdc++-v3/ChangeLog: PR libstdc++/93978 * include/bits/range_access.h (__cust_access::_Empty::operator()): Declare return type to be bool instead of auto. * testsuite/std/ranges/adaptors/93978.cc: New test.
[Bug rtl-optimization/93996] [10 Regression] ICE in lookup_page_table_entry
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93996 --- Comment #11 from CVS Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:e6ce69cae5059dfd715edd4e26653c23baf4cb0f commit r10-7069-ge6ce69cae5059dfd715edd4e26653c23baf4cb0f Author: Andrew Pinski Date: Fri Mar 6 08:34:01 2020 -0700 Avoid putting a REG_NOTE on anything other than an INSN in haifa-sched.c PR rtl-optimization/93996 * haifa-sched.c (remove_notes): Be more careful when adding REG_SAVE_NOTE.
[Bug target/94065] AIX rs6000 NO_SUM_IN_TOC and NO_FP_IN_TOC disable logic reversed in aix config files
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94065 --- Comment #2 from CVS Commits --- The master branch has been updated by David Edelsohn : https://gcc.gnu.org/g:3dcf51ad7b0a9cacba1a056755c16cc1cf7984ee commit r10-7070-g3dcf51ad7b0a9cacba1a056755c16cc1cf7984ee Author: David Edelsohn Date: Thu Mar 5 20:41:08 2020 -0500 rs6000: Correct logic to disable NO_SUM_IN_TOC and NO_FP_IN_TOC [PR94065] aix61.h, aix71.h and aix72.h intends to prevent SUM_IN_TOC and FP_IN_TOC when cmodel=large. This patch defines the variables associated with the target options to 1 to _enable_ NO_SUM_IN_TOC and enable NO_FP_IN_TOC. Bootstrapped on powerpc-ibm-aix7.2.0.0 2020-03-06 David Edelsohn PR target/94065 * config/rs6000/aix61.h (TARGET_NO_SUM_IN_TOC): Set to 1 for cmodel=large. (TARGET_NO_FP_IN_TOC): Same. * config/rs6000/aix71.h: Same. * config/rs6000/aix72.h: Same.
[Bug target/91598] [8/9/10 regression] 60% speed drop on neon intrinsic loop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91598 --- Comment #6 from CVS Commits --- The master branch has been updated by Wilco Dijkstra : https://gcc.gnu.org/g:0b8393221177617f19e7c5c5c692b8c59f85fffb commit r10-7073-g0b8393221177617f19e7c5c5c692b8c59f85fffb Author: Wilco Dijkstra Date: Fri Mar 6 18:29:02 2020 + [AArch64] Use intrinsics for widening multiplies (PR91598) Inline assembler instructions don't have latency info and the scheduler does not attempt to schedule them at all - it does not even honor latencies of asm source operands. As a result, SIMD intrinsics which are implemented using inline assembler perform very poorly, particularly on in-order cores. Add new patterns and intrinsics for widening multiplies, which results in a 63% speedup for the example in the PR, thus fixing the reported regression. gcc/ PR target/91598 * config/aarch64/aarch64-builtins.c (TYPES_TERNOPU_LANE): Add define. * config/aarch64/aarch64-simd.md (aarch64_vec_mult_lane): Add new insn for widening lane mul. (aarch64_vec_mlal_lane): Likewise. * config/aarch64/aarch64-simd-builtins.def: Add intrinsics. * config/aarch64/arm_neon.h: (vmlal_lane_s16): Expand using intrinsics rather than inline asm. (vmlal_lane_u16): Likewise. (vmlal_lane_s32): Likewise. (vmlal_lane_u32): Likewise. (vmlal_laneq_s16): Likewise. (vmlal_laneq_u16): Likewise. (vmlal_laneq_s32): Likewise. (vmlal_laneq_u32): Likewise. (vmull_lane_s16): Likewise. (vmull_lane_u16): Likewise. (vmull_lane_s32): Likewise. (vmull_lane_u32): Likewise. (vmull_laneq_s16): Likewise. (vmull_laneq_u16): Likewise. (vmull_laneq_s32): Likewise. (vmull_laneq_u32): Likewise. * config/aarch64/iterators.md (Vcondtype): New iterator for lane mul. (Qlane): Likewise.
[Bug c++/94027] [10 Regression] ice in comptypes, at cp/typeck.c:1489 since r10-6907
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94027 --- Comment #3 from CVS Commits --- The master branch has been updated by Nathan Sidwell : https://gcc.gnu.org/g:191bcd0f30dd37dec773efb0125afdcae9bd90ef commit r10-7074-g191bcd0f30dd37dec773efb0125afdcae9bd90ef Author: Nathan Sidwell Date: Fri Mar 6 10:51:26 2020 -0800 Fix mangling ICE [PR94027] PR c++/94027 * mangle.c (find_substitution): Don't call same_type_p on template args that cannot match. Now same_type_p rejects argument packs, we need to be more careful calling it with template argument vector contents. The mangler needs to do some comparisons to find the special substitutions. While that code looks a little ugly, this seems the smallest fix.
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #30 from CVS Commits --- PR c/93218 - Testing
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #31 from CVS Commits --- PR c/93218 - Testing
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #32 from CVS Commits --- PR c/93218 - Testing
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #33 from CVS Commits --- PR c/93218 - Testing
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #34 from CVS Commits --- PR c/93218 - Testing
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #35 from CVS Commits --- PR c/93218 - Testing
[Bug target/92379] rs6000.c:5598:13: runtime error: shift exponent 64 is too large for 64-bit type 'long int'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92379 --- Comment #7 from CVS Commits --- https://gcc.gnu.org/g:50c96067c8ed60f4b3fcbee89fe31c905241b356commit r10-7169-g50c96067c8ed60f4b3fcbee89fe31c905241b356Author: Aaron Sawdey Date: Fri Mar 13 18:14:22 2020 -0500Fix UBSAN error, shifting 64 bit value by 64.2020-03-13 Aaron Sawdey PR target/92379* config/rs6000/rs6000.c (num_insns_constant_multi) Don't shift a 64-bit value by 64 bits (UB).
[Bug c/93218] Test bug for testing git email integration
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93218 --- Comment #36 from CVS Commits --- PR c/93218 - Testing
[Bug target/94176] rs6000/test: Fix selector in fold-vec-mule-misc.c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94176 --- Comment #1 from CVS Commits --- The master branch has been updated by Segher Boessenkool : https://gcc.gnu.org/g:9a6408bd18fe893a59297d80010fbd3660300347 commit r10-7172-g9a6408bd18fe893a59297d80010fbd3660300347 Author: Segher Boessenkool Date: Mon Feb 17 12:13:21 2020 + rs6000/test: Fix selector in fold-vec-mule-misc.c Run tests should use vmx_hw, not just powerpc_altivec_ok. gcc/testsuite/ PR target/94176 * gcc.target/powerpc/fold-vec-mule-misc.c: Use vmx_hw selector.
[Bug c++/93248] [8/9/10 Regression] ICE in decltype of template constructor with default argument within a class template since r8-2712
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93248 --- Comment #3 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:c393c99d3dc8329dc1a36011e70faa9700185051 commit r10-7174-gc393c99d3dc8329dc1a36011e70faa9700185051 Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Fix CTAD with multiple-arg ctor template [93248]. When cp_unevaluated_operand is set, tsubst_decl thinks that if it sees a PARM_DECL that isn't already in local_specializations, we're in a decltype in a trailing return type or some such, and so we only want a substitution for a single PARM_DECL. In this case, we want the whole chain, so make sure cp_unevaluated_operand is cleared. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/93248 * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for substituting DECL_ARGUMENTS.
[Bug c++/92909] [8/9/10 Regression] ICE on incorrect lambda inside variadic template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92909 --- Comment #3 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:b3b0c671cc341fd04afc045a8d42d7a845d7f73c commit r10-7175-gb3b0c671cc341fd04afc045a8d42d7a845d7f73c Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Find parameter pack in typedef in lambda [92909]. find_parameter_packs_r doesn't look through typedefs, which is normally correct, but that means we need to handle their declarations specially. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/92909 * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk DECL_ORIGINAL_TYPE of a typedef.
[Bug c++/92068] [8/9/10 Regression] ICE on invalid in process_partial_specialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92068 --- Comment #3 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:3a285529ee338ef2867ae7add26b6493f004bf0d commit r10-7176-g3a285529ee338ef2867ae7add26b6493f004bf0d Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Fix ICE-after-error on partial spec [92068] Here the template arguments for the partial specialization are valid arguments for the template, but not for a partial specialization, because 'd' can never be deduced to anything other than an empty pack. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/92068 * pt.c (process_partial_specialization): Error rather than crash on extra pack expansion.
[Bug target/89229] Incorrect xmm16-xmm31/ymm16-ymm31 in vector move
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89229 --- Comment #32 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:824722e45f80b22e2f035a61300f494b2a10d6f4 commit r10-7177-g824722e45f80b22e2f035a61300f494b2a10d6f4 Author: H.J. Lu Date: Sat Mar 14 16:06:55 2020 -0700 i386: Use ix86_output_ssemov for DImode TYPE_SSEMOV There is no need to set mode attribute to XImode since ix86_output_ssemov can properly encode xmm16-xmm31 registers with and without AVX512VL. gcc/ PR target/89229 * config/i386/i386.md (*movdi_internal): Call ix86_output_ssemov for TYPE_SSEMOV. Remove ext_sse_reg_operand and TARGET_AVX512VL check. gcc/testsuite/ PR target/89229 * gcc.target/i386/pr89229-5a.c: New test. * gcc.target/i386/pr89229-5b.c: Likewise. * gcc.target/i386/pr89229-5c.c: Likewise.
[Bug middle-end/93566] [8/9/10 Regression] tree-nested.c ICE on C OpenMP array section reduction
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93566 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:9c3cdb43c2bdaf8a8d2e62db010b04f6086d76b7 commit r10-7179-g9c3cdb43c2bdaf8a8d2e62db010b04f6086d76b7 Author: Jakub Jelinek Date: Sun Mar 15 01:27:40 2020 +0100 tree-nested: Fix handling of *reduction clauses with C array sections [PR93566] tree-nested.c didn't handle C array sections in {,task_,in_}reduction clauses. 2020-03-14 Jakub Jelinek PR middle-end/93566 * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle {,in_,task_}reduction clauses with C/C++ array sections. * testsuite/libgomp.c/pr93566.c: New test.
[Bug target/89229] Incorrect xmm16-xmm31/ymm16-ymm31 in vector move
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89229 --- Comment #33 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:9d74caf21be7025db8fef997e87ebf3b85acaf4a commit r10-7182-g9d74caf21be7025db8fef997e87ebf3b85acaf4a Author: H.J. Lu Date: Sun Mar 15 10:21:08 2020 -0700 i386: Use ix86_output_ssemov for SFmode TYPE_SSEMOV There is no need to set mode attribute to V16SFmode since ix86_output_ssemov can properly encode xmm16-xmm31 registers with and without AVX512VL. gcc/ PR target/89229 * config/i386/i386.c (ix86_output_ssemov): Handle MODE_SI and MODE_SF. * config/i386/i386.md (*movsf_internal): Call ix86_output_ssemov for TYPE_SSEMOV. Remove TARGET_PREFER_AVX256, TARGET_AVX512VL and ext_sse_reg_operand check. gcc/testsuite/ PR target/89229 * gcc.target/i386/pr89229-6a.c: New test. * gcc.target/i386/pr89229-6b.c: Likewise. * gcc.target/i386/pr89229-6c.c: Likewise.
[Bug c++/93248] [8/9/10 Regression] ICE in decltype of template constructor with default argument within a class template since r8-2712
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93248 --- Comment #5 from CVS Commits --- The releases/gcc-8 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:23690790dd739f1cdd33a8249304b8f17e296c38 commit r8-10126-g23690790dd739f1cdd33a8249304b8f17e296c38 Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Fix CTAD with multiple-arg ctor template [93248]. When cp_unevaluated_operand is set, tsubst_decl thinks that if it sees a PARM_DECL that isn't already in local_specializations, we're in a decltype in a trailing return type or some such, and so we only want a substitution for a single PARM_DECL. In this case, we want the whole chain, so make sure cp_unevaluated_operand is cleared. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/93248 * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for substituting DECL_ARGUMENTS.
[Bug c++/93248] [8/9/10 Regression] ICE in decltype of template constructor with default argument within a class template since r8-2712
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93248 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:cb05d702a17476fb658a59a6661d1f69394da786 commit r9-8377-gcb05d702a17476fb658a59a6661d1f69394da786 Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Fix CTAD with multiple-arg ctor template [93248]. When cp_unevaluated_operand is set, tsubst_decl thinks that if it sees a PARM_DECL that isn't already in local_specializations, we're in a decltype in a trailing return type or some such, and so we only want a substitution for a single PARM_DECL. In this case, we want the whole chain, so make sure cp_unevaluated_operand is cleared. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/93248 * pt.c (build_deduction_guide): Clear cp_unevaluated_operand for substituting DECL_ARGUMENTS.
[Bug c++/92068] [8/9/10 Regression] ICE on invalid in process_partial_specialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92068 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:2fa5f9e380b794053a0dd8a8cc63f8bfab370d22 commit r9-8378-g2fa5f9e380b794053a0dd8a8cc63f8bfab370d22 Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Fix ICE-after-error on partial spec [92068] Here the template arguments for the partial specialization are valid arguments for the template, but not for a partial specialization, because 'd' can never be deduced to anything other than an empty pack. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/92068 * pt.c (process_partial_specialization): Error rather than crash on extra pack expansion.
[Bug c++/92909] [8/9/10 Regression] ICE on incorrect lambda inside variadic template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92909 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:c3747bca3849b1e06358db9cb2389d8089c49e3e commit r9-8379-gc3747bca3849b1e06358db9cb2389d8089c49e3e Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Find parameter pack in typedef in lambda [92909]. find_parameter_packs_r doesn't look through typedefs, which is normally correct, but that means we need to handle their declarations specially. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/92909 * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk DECL_ORIGINAL_TYPE of a typedef.
[Bug c++/92909] [8/9/10 Regression] ICE on incorrect lambda inside variadic template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92909 --- Comment #5 from CVS Commits --- The releases/gcc-8 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:eee8f2161e072c1b9da4f334f882c385a27baa1f commit r8-10128-geee8f2161e072c1b9da4f334f882c385a27baa1f Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Find parameter pack in typedef in lambda [92909]. find_parameter_packs_r doesn't look through typedefs, which is normally correct, but that means we need to handle their declarations specially. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/92909 * pt.c (find_parameter_packs_r): [DECL_EXPR]: Walk DECL_ORIGINAL_TYPE of a typedef.
[Bug c++/92068] [8/9/10 Regression] ICE on invalid in process_partial_specialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92068 --- Comment #5 from CVS Commits --- The releases/gcc-8 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:fed9ac72ee6c1b36d20a9550803835daaac174db commit r8-10127-gfed9ac72ee6c1b36d20a9550803835daaac174db Author: Jason Merrill Date: Sat Mar 14 17:10:39 2020 -0400 c++: Fix ICE-after-error on partial spec [92068] Here the template arguments for the partial specialization are valid arguments for the template, but not for a partial specialization, because 'd' can never be deduced to anything other than an empty pack. gcc/cp/ChangeLog 2020-03-14 Jason Merrill PR c++/92068 * pt.c (process_partial_specialization): Error rather than crash on extra pack expansion.
[Bug tree-optimization/94125] [9/10 Regression] wrong code at -O3 on x86_64-linux-gnu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94125 --- Comment #8 from CVS Commits --- The master branch has been updated by Bin Cheng : https://gcc.gnu.org/g:e4e9a59105a81cdd6c1328b0a5ed9fe4cc82840e commit r10-7184-ge4e9a59105a81cdd6c1328b0a5ed9fe4cc82840e Author: Bin Cheng Date: Mon Mar 16 11:09:14 2020 +0800 Update post order number for merged SCC. Function loop_distribution::break_alias_scc_partitions needs to compute SCC with runtime alias edges skipped. As a result, partitions could be re-assigned larger post order number than SCC's precedent partition and distributed before the precedent one. This fixes the issue by updating the merged partition to the minimal post order in SCC. gcc/ PR tree-optimization/94125 * tree-loop-distribution.c (loop_distribution::break_alias_scc_partitions): Update post order number for merged scc. gcc/testsuite/ PR tree-optimization/94125 * gcc.dg/tree-ssa/pr94125.c: New test.
[Bug tree-optimization/94166] [10 Regression] random -fcompare-debug failures since r10-1913
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94166 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5ba25b2ef179aec8ba4c47612fbc5c388f41cb36 commit r10-7185-g5ba25b2ef179aec8ba4c47612fbc5c388f41cb36 Author: Jakub Jelinek Date: Mon Mar 16 09:02:21 2020 +0100 tree-inline: Fix a -fcompare-debug issue in the inliner [PR94167] The following testcase fails with -fcompare-debug. The problem is that bar is marked as address_taken only with -g and not without. I've tracked it down to insert_init_stmt calling gimple_regimplify_operands even on DEBUG_STMTs. That function will just insert normal stmts before the DEBUG_STMT if the DEBUG_STMT operand isn't gimple val or invariant. While DCE will turn those statements into debug temporaries, it can cause differences in SSA_NAMEs and more importantly, the ipa references are generated from those before the DCE happens. On the testcase, the DEBUG_STMT value is (int)bar. We could generate DEBUG_STMTs with debug temporaries instead, but I fail to see the reason to do that, DEBUG_STMTs allow other expressions and all we want to ensure is that the expressions aren't too large (arbitrarily complex), but during inlining/function versioning I don't see why something would queue a DEBUG_STMT with arbitrarily complex expressions in there. 2020-03-16 Jakub Jelinek PR tree-optimization/94166 * tree-ssa-reassoc.c (sort_by_mach_mode): Use SSA_NAME_VERSION as secondary comparison key. * gcc.dg/pr94166.c: New test.
[Bug debug/94167] [8/9/10 Regression] pr71109.c -fcompare-debug failures on x86_64 and powerpc64le
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94167 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:6d44c881286762628afce5169d921a388ae6a1ff commit r10-7186-g6d44c881286762628afce5169d921a388ae6a1ff Author: Jakub Jelinek Date: Mon Mar 16 09:03:59 2020 +0100 tree-inline: Fix a -fcompare-debug issue in the inliner [PR94167] The following testcase fails with -fcompare-debug. The problem is that bar is marked as address_taken only with -g and not without. I've tracked it down to insert_init_stmt calling gimple_regimplify_operands even on DEBUG_STMTs. That function will just insert normal stmts before the DEBUG_STMT if the DEBUG_STMT operand isn't gimple val or invariant. While DCE will turn those statements into debug temporaries, it can cause differences in SSA_NAMEs and more importantly, the ipa references are generated from those before the DCE happens. On the testcase, the DEBUG_STMT value is (int)bar. We could generate DEBUG_STMTs with debug temporaries instead, but I fail to see the reason to do that, DEBUG_STMTs allow other expressions and all we want to ensure is that the expressions aren't too large (arbitrarily complex), but during inlining/function versioning I don't see why something would queue a DEBUG_STMT with arbitrarily complex expressions in there. 2020-03-16 Jakub Jelinek PR debug/94167 * tree-inline.c (insert_init_stmt): Don't gimple_regimplify_operands DEBUG_STMTs. * gcc.dg/pr94167.c: New test.
[Bug target/89229] Incorrect xmm16-xmm31/ymm16-ymm31 in vector move
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89229 --- Comment #34 from CVS Commits --- The master branch has been updated by H.J. Lu : https://gcc.gnu.org/g:5a3c42b227bbe9e7acb5335088d2255262311bd8 commit r10-7189-g5a3c42b227bbe9e7acb5335088d2255262311bd8 Author: H.J. Lu Date: Mon Mar 16 03:48:55 2020 -0700 i386: Use ix86_output_ssemov for SImode TYPE_SSEMOV There is no need to set mode attribute to XImode since ix86_output_ssemov can properly encode xmm16-xmm31 registers with and without AVX512VL. Remove ext_sse_reg_operand since it is no longer needed. gcc/ PR target/89229 * config/i386/i386.md (*movsi_internal): Call ix86_output_ssemov for TYPE_SSEMOV. Remove ext_sse_reg_operand and TARGET_AVX512VL check. * config/i386/predicates.md (ext_sse_reg_operand): Removed. gcc/testsuite/ PR target/89229 * gcc.target/i386/pr89229-7a.c: New test. * gcc.target/i386/pr89229-7b.c: Likewise. * gcc.target/i386/pr89229-7c.c: Likewise.
[Bug d/92792] [10 Regression] symbols dropped from libphobos
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92792 --- Comment #2 from CVS Commits --- The master branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:bc093503d74b02f5372373bfaf052fb1bac3d553 commit r10-7192-gbc093503d74b02f5372373bfaf052fb1bac3d553 Author: Iain Buclaw Date: Mon Mar 16 17:00:07 2020 +0100 libphobos: Reset libtool_VERSION to 1:0:0 libphobos/ChangeLog: 2020-03-16 Iain Buclaw PR d/92792 * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (libtool_VERSION): Reset to 1:0:0. * libdruntime/Makefile.in: Regenerate.
[Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185 --- Comment #6 from CVS Commits --- The master branch has been updated by Vladimir Makarov : https://gcc.gnu.org/g:bae7b38cf8a21e068ad5c0bab089dedb78af3346 commit r10-7197-gbae7b38cf8a21e068ad5c0bab089dedb78af3346 Author: Vladimir N. Makarov Date: Mon Mar 16 16:42:19 2020 -0400 Fix PR94185: Do not reuse insn alternative after changing memory subreg. 2020-03-16 Vladimir Makarov PR target/94185 * lra-spills.c (remove_pseudos): Do not reuse insn alternative after changing memory subreg. 2020-03-16 Vladimir Makarov PR target/94185 * g++.target/i386/pr94185.C: New test.
[Bug c/94179] [10 Regression] ICE in gimplify_expr, at gimplify.c:14399 since r10-7127-gcb99630f254aaec6
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94179 --- Comment #4 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c015ff8ccaf3ee8e4f6393679ed790ed0df92873 commit r10-7198-gc015ff8ccaf3ee8e4f6393679ed790ed0df92873 Author: Jakub Jelinek Date: Mon Mar 16 22:58:41 2020 +0100 c: Handle MEM_REF in c_fully_fold* [PR94179] The recent match.pd changes can generate a MEM_REF which can be seen by the C FE folding routines. Unlike the C++ FE, they weren't expected in the C FE yet. MEM_REF should be handled like INDIRECT_REF, except that it has two operands rather than just one and that we should preserve the type of the second operand. Given that it already has to be an INTEGER_CST with pointer type, I think we are fine, the recursive call should return the INTEGER_CST unmodified and STRIP_TYPE_NOPS will not strip anything. 2020-03-16 Jakub Jelinek PR c/94179 * c-fold.c (c_fully_fold_internal): Handle MEM_REF. * gcc.c-torture/compile/pr94179.c: New test.
[Bug d/92216] GDC generate duplicate symbols when mixins and interfaces are used to gather
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92216 --- Comment #3 from CVS Commits --- The master branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:447d196e75d97a9ac7c6a548dc9d0fe367adf6be commit r10-7199-g447d196e75d97a9ac7c6a548dc9d0fe367adf6be Author: Iain Buclaw Date: Mon Mar 16 23:04:49 2020 +0100 d: Fix multiple definition error when using mixins and interfaces. gcc/d/ChangeLog: PR d/92216 * decl.cc (make_thunk): Don't set TREE_PUBLIC on thunks if the target function is external to the current compilation. gcc/testsuite/ChangeLog: PR d/92216 * gdc.dg/imports/pr92216.d: New. * gdc.dg/pr92216.d: New test.
[Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199 --- Comment #1 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:c62f5e6e1f457462b1cea74792833821bbea64bb commit r10-7200-gc62f5e6e1f457462b1cea74792833821bbea64bb Author: Jonathan Wakely Date: Mon Mar 16 22:53:42 2020 + libstdc++: Add default constructor to net::service_already_exists (PR 94199) The service_already_exists exception type specified in the TS doesn't have any constructors defined. Since its base class isn't default constructible, that means has no usable constructors. This may be a defect in the TS. This patch fixes it by adding a default constructor, but making it private. The make_service function is declared as a friend to be able to call that private constructor. PR libstdc++/94199 * include/experimental/executor (service_already_exists): Add default constructor. Declare make_service to be a friend. * testsuite/experimental/net/execution_context/make_service.cc: New test.
[Bug libstdc++/94199] std::experimental::net::v1::make_service function template not instantiatable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94199 --- Comment #2 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:31b204ace293b81fc51f76bf9faf459ab1cd7c50 commit r9-8381-g31b204ace293b81fc51f76bf9faf459ab1cd7c50 Author: Jonathan Wakely Date: Mon Mar 16 22:55:48 2020 + libstdc++: Add default constructor to net::service_already_exists (PR 94199) The service_already_exists exception type specified in the TS doesn't have any constructors defined. Since its base class isn't default constructible, that means has no usable constructors. This may be a defect in the TS. This patch fixes it by adding a default constructor, but making it private. The make_service function is declared as a friend to be able to call that private constructor. Backport from mainline 2020-03-16 Jonathan Wakely PR libstdc++/94199 * include/experimental/executor (service_already_exists): Add default constructor. Declare make_service to be a friend. * testsuite/experimental/net/execution_context/make_service.cc: New test.
[Bug d/92309] Assignment to anonymous union member corrupts sibling members in struct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92309 --- Comment #1 from CVS Commits --- The master branch has been updated by Iain Buclaw : https://gcc.gnu.org/g:2691ffe6dbaffb704593dd6220178c28848b3855 commit r10-7201-g2691ffe6dbaffb704593dd6220178c28848b3855 Author: Iain Buclaw Date: Mon Mar 16 23:53:20 2020 +0100 d: Fix assignment to anonymous union member corrupts sibling members in struct gcc/d/ChangeLog: PR d/92309 * types.cc (fixup_anonymous_offset): Don't set DECL_FIELD_OFFSET on anonymous fields. gcc/testsuite/ChangeLog: PR d/92309 * gdc.dg/pr92309.d: New test.
[Bug c++/93901] [10 Regression] noexcept specifier on ctor does not work with constexpr variable or expression since r10-4394
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93901 --- Comment #5 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:57e7ad5a8fd5a7bddf15e2fede6d2546cc6a2797 commit r10-7204-g57e7ad5a8fd5a7bddf15e2fede6d2546cc6a2797 Author: Jason Merrill Date: Mon Mar 16 21:16:35 2020 -0400 c++: Add test for PR 93901.
[Bug testsuite/94019] [9 regression] gcc.dg/vect/vect-over-widen-17.c fails starting with g:370c2ebe8fa20e0812cd2d533d4ed38ee2d37c85, r9-1590
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94019 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Kewen Lin : https://gcc.gnu.org/g:05409a1edd80a96c26cead01d1b65dc9f25a22af commit r9-8384-g05409a1edd80a96c26cead01d1b65dc9f25a22af Author: Kewen Lin Date: Sun Mar 8 21:55:11 2020 -0500 [testsuite] Fix PR94019 to check vector char when vect_hw_misalign As PR94019 shows, without misaligned vector access support but with realign load, the vectorized loop will end up with realign scheme. It generates mask (control vector) with return type vector signed char which breaks the not check. gcc/testsuite/ChangeLog 2020-03-17 Kewen Lin Backport from master 2020-03-09 Kewen Lin PR testsuite/94019 * gcc.dg/vect/vect-over-widen-17.c: Don't expect vector char if it's without misaligned vector access support.
[Bug testsuite/94023] [9 regression] gcc.dg/vect/slp-perm-12.c fails starting with r9-5008
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94023 --- Comment #4 from CVS Commits --- The releases/gcc-9 branch has been updated by Kewen Lin : https://gcc.gnu.org/g:62960ccdefe60f29897f4bae8ea6a2f3f385fc47 commit r9-8383-g62960ccdefe60f29897f4bae8ea6a2f3f385fc47 Author: Kewen Lin Date: Sun Mar 8 21:34:13 2020 -0500 [testsuite] Fix PR94023 to guard case under vect_hw_misalign As PR94023 shows, the expected SLP requires misaligned vector access support. This patch is to guard the check under the target condition vect_hw_misalign to ensure that. 2020-03-17 Kewen Lin Backport from master 2020-03-09 Kewen Lin PR testsuite/94023 * gcc.dg/vect/slp-perm-12.c: Expect loop vectorized messages only on vect_hw_misalign targets.
[Bug lto/94157] [10 Regression] error: lto-wrapper failed with -Wa,--noexecstack -Wa,--noexecstack since r10-6807-gf1a681a174cdfb82
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94157 --- Comment #7 from CVS Commits --- The master branch has been updated by Martin Liska : https://gcc.gnu.org/g:ecf2b69a629d4f79efe3c103fe54040437ea18a6 commit r10-7205-gecf2b69a629d4f79efe3c103fe54040437ea18a6 Author: Martin Liska Date: Tue Mar 17 09:43:46 2020 +0100 Filter a test-case with gas. PR lto/94157 * gcc.dg/lto/pr94157_0.c: Add gas effective target filter.
[Bug middle-end/94189] [9/10 Regression] -fcompare-debug failure on Wstringop-overflow-22.c since r9-3242
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94189 --- Comment #7 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:7afa3b82918a75a486aad7818f11df9ea7504368 commit r10-7206-g7afa3b82918a75a486aad7818f11df9ea7504368 Author: Jakub Jelinek Date: Tue Mar 17 10:42:35 2020 +0100 expand: Don't depend on warning flags in code generation of strnlen [PR94189] The following testcase FAILs with -O2 -fcompare-debug, but the reason isn't that we'd emit different code based on -g or non-debug, but rather that we emit different code depending on whether -w is used or not (or e.g. -Wno-stringop-overflow or whether some other pass emitted some other warning already on the call). Code generation shouldn't depend on whether we emit a warning or not if at all possible. The following patch punts (i.e. doesn't optimize the strnlen call to a constant value) if we would emit the warning if it was enabled. In the PR there is an alternate patch which does optimize the strnlen call no matter if we emit the warning or not, though I think I prefer the version below, e.g. the strnlen call might be crossing field boundaries, which is in strict reading undefined, but I'd be afraid people do that in the real world programs. 2020-03-17 Jakub Jelinek PR middle-end/94189 * builtins.c (expand_builtin_strnlen): Do return NULL_RTX if we would emit a warning if it was enabled and don't depend on TREE_NO_WARNING for code-generation. * gcc.dg/pr94189.c: New test.
[Bug tree-optimization/94187] [10 Regression] valgrind error in count_nonzero_bytes since r10-2101
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94187 --- Comment #11 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:741ff2a263fe0ddc343288331c0047c1a32af8b2 commit r10-7207-g741ff2a263fe0ddc343288331c0047c1a32af8b2 Author: Jakub Jelinek Date: Tue Mar 17 10:43:46 2020 +0100 strlen: Punt on UB reads past end of string literal [PR94187] The gcc.dg/pr68785.c test which contains: int foo (void) { return *(int *) ""; } has UB in the program if it is ever called, but causes UB in the compiler as well as at least in theory non-reproduceable code generation. The problem is that nbytes is in this case 4, prep is the TREE_STRING_POINTER of a "" string literal with TREE_STRING_LENGTH of 1 and we do: 4890 for (const char *p = prep; p != prep + nbytes; ++p) 4891if (*p) 4892 { 4893*allnul = false; 4894break; 4895 } and so read the bytes after the STRING_CST payload, which can be random. I think we should just punt in this case. 2020-03-17 Jakub Jelinek PR tree-optimization/94187 * tree-ssa-strlen.c (count_nonzero_bytes): Punt if nchars - offset < nbytes.
[Bug target/94185] [10 Regression] crashes with "error: unable to generate reloads for {*zero_extendsidi2} internal compiler error: in curr_insn_transform, at lra-constraints.c:4006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94185 --- Comment #8 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:994d48620621fa33d32018be5fb70042e38546d5 commit r10-7209-g994d48620621fa33d32018be5fb70042e38546d5 Author: Jakub Jelinek Date: Tue Mar 17 11:12:59 2020 +0100 testsuite: Fix pr94185.C testcase on i686-linux with C++98 [PR94185] I'm getting on i686-linux FAIL: g++.target/i386/pr94185.C -std=gnu++98 (test for excess errors) This is because of a diagnostic that 4294967295 is unsigned only in ISO C90. Adding U suffix fixes it and the testcase still ICEs with unfixed gcc and passes with current trunk. 2020-03-17 Jakub Jelinek PR target/94185 * g++.target/i386/pr94185.C (l): Use 4294967295U instead of 4294967295 to avoid FAIL with -m32 -std=c++98.
[Bug tree-optimization/94015] [10 Regression] Another assignment incorrectly omitted by -foptimize-strlen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94015 --- Comment #7 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a9a437ffc4269650e34af92c4fb095b7ed98f94a commit r10-7213-ga9a437ffc4269650e34af92c4fb095b7ed98f94a Author: Jakub Jelinek Date: Tue Mar 17 13:36:41 2020 +0100 tree-ssa-strlen: Fix up count_nonzero_bytes* [PR94015] As I said already yesterday in another PR, I'm afraid the mixing of apples and oranges (what we are actually computing, whether what bytes are zero or non-zero in the native representation of EXP itself or what EXP points to) in a single function where it performs some handling which must be specific to one or the other case unconditionally and only from time to time determines something based on if nbytes is 0 or not will continue to bite us again and again. So, this patch performs at least a partial cleanup to separate those two cases into two functions. In addition to the separation, the patch uses e.g. ctor_for_folding so that it does handle volatile loads properly and various other checks instead of directly using DECL_INITIAL or does guard native_encode_expr call the way it is guarded elsewhere (that host and target byte sizes are expected). I've left other issues I found as is for now, like the *allnonnul being IMHO wrongly computed (if we don't know anything about the bytes, such as if _1 = MEM[s_2(D)]; MEM[whatever] = _1; where nothing really is known about strlen(s) etc., the code right now clears *nulterm and *allnul, but keeps *allnonnull set), but the callers seem to never use that value for anything (so the question is why is it computed and how exactly should it be defined). Another thing I find quite weird is the distinction between count_nonzero_bytes failing (return false) and when it succeeds, but sets values to a don't know state (the warning is only issued if it succeeds), plus what lenrange[2] is for. The size of the store should be visible already from the store statement. Also the looking at the type of the MEM_REF first operand to determine if it is is_char_store is really weird, because both in user code and through sccvn where pointer conversions are useless the type of the MEM_REF operand doesn't have to have anything to do with what the code actually does. 2020-03-17 Jakub Jelinek PR tree-optimization/94015 * tree-ssa-strlen.c (count_nonzero_bytes): Split portions of the function where EXP is address of the bytes being stored rather than the bytes themselves into count_nonzero_bytes_addr. Punt on zero sized MEM_REF. Use VAR_P macro and handle CONST_DECL like VAR_DECLs. Use ctor_for_folding instead of looking at DECL_INITIAL. Punt before calling native_encode_expr if host or target doesn't have 8-bit chars. Formatting fixes. (count_nonzero_bytes_addr): New function. * gcc.dg/pr94015.c: New test.
[Bug c++/94197] __is_constructible gives an access error
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94197 --- Comment #4 from CVS Commits --- The master branch has been updated by Ville Voutilainen : https://gcc.gnu.org/g:887085be635101ae1fa16be8dcdbbe6b240b600b commit r10-7219-g887085be635101ae1fa16be8dcdbbe6b240b600b Author: Ville Voutilainen Date: Tue Mar 17 16:38:25 2020 +0200 c++: Fix access checks for __is_assignable and __is_constructible gcc/ PR c++/94197 * cp/method.c (assignable_expr): Use cp_unevaluated. (is_xible_helper): Push a non-deferred access check for the stub objects created by assignable_expr and constructible_expr. testsuite/ PR c++/94197 * g++.dg/ext/pr94197.C: New.
[Bug debug/93888] Incorrect DW_AT_location generated for copy-constructed function argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93888 --- Comment #8 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:d2a810ee83e2952bf351498cecf8f5db28860a24 commit r9-8386-gd2a810ee83e2952bf351498cecf8f5db28860a24 Author: Jakub Jelinek Date: Wed Mar 4 12:59:04 2020 +0100 inliner: Copy DECL_BY_REFERENCE in copy_decl_to_var [PR93888] In the following testcase we emit wrong debug info for the karg parameter in the DW_TAG_inlined_subroutine into main. The problem is that the karg PARM_DECL is DECL_BY_REFERENCE and thus in the IL has const K & type, but in the source just const K. When the function is inlined, we create a VAR_DECL for it, but don't set DECL_BY_REFERENCE, so when emitting DW_AT_location, we treat it like a const K & typed variable, but it has DW_AT_abstract_origin which has just the const K type and thus the debugger thinks the variable has const K type. Fixed by copying the DECL_BY_REFERENCE flag. Not doing it in copy_decl_for_dup_finish, because copy_decl_no_change already copies that flag through copy_node and in copy_result_decl_to_var it is undesirable, as we handle DECL_BY_REFERENCE in that case instead by changing the type. 2020-03-04 Jakub Jelinek PR debug/93888 * tree-inline.c (copy_decl_to_var): Copy DECL_BY_REFERENCE flag. * g++.dg/guality/pr93888.C: New test.
[Bug tree-optimization/94001] [10 Regression] ICE: in fold_convert_loc, at fold-const.c:2435 at -O2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94001 --- Comment #7 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5de0dc84c75a43f78a03c7cdb7e7c443c641a7fa commit r9-8385-g5de0dc84c75a43f78a03c7cdb7e7c443c641a7fa Author: Jakub Jelinek Date: Wed Mar 4 09:01:59 2020 +0100 tailcall: Fix up process_assignment [PR94001] When a function returns void or the return value is ignored, ass_var is NULL_TREE. The tail recursion handling generally assumes DCE has been performed and so doesn't expect to encounter useless assignments after the call and expects them to be part of the return value adjustment that need to be changed into tail recursion additions/multiplications. process_assignment does some verification and has a way to tell the caller to try to move dead or whatever other stmts that don't participate in the return value modifications before it is returned. For binary rhs assignments it is just fine, neither op0 nor op1 will be NULL_TREE and thus if *ass_var is NULL_TREE, it will not match, but unary rhs is handled by only setting op0 to rhs1 and setting op1 to NULL_TREE. And at this point, NULL_TREE == NULL_TREE and thus we think e.g. the c_2 = -e_3(D); dead stmt is actually a return value modification, so we queue it as multiplication and then create a void type SSA_NAME accumulator for it and ICE shortly after. Fixed by making sure op1 == *ass_var comparison is done only if *ass_var. 2020-03-04 Jakub Jelinek PR tree-optimization/94001 * tree-tailcall.c (process_assignment): Before comparing op1 to *ass_var, verify *ass_var is non-NULL. * gcc.dg/pr94001.c: New test.
[Bug target/94134] pdp11-aout puts initial variable into .text section rather than .data
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94134 --- Comment #14 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:f1125cf88ac0c97d819e4f81d556fbcd1161270e commit r9-8391-gf1125cf88ac0c97d819e4f81d556fbcd1161270e Author: Jakub Jelinek Date: Wed Mar 11 18:35:13 2020 +0100 pdp11: Fix handling of common (local and global) vars [PR94134] As mentioned in the PR, the generic code decides to put the a variable into lcomm_section, which is a NOSWITCH section and thus the generic code doesn't switch into a particular section before using ASM_OUTPUT{_ALIGNED{,_DECL}_}_LOCAL, on many targets that results just in .lcomm (or for non-local .comm) directives which don't need a switch to some section, other targets put switch_to_section (bss_section) at the start of that macro. pdp11 doesn't do that (and doesn't have bss_section), and so emits the lcomm/comm variables in whatever section is current (it has only .text/.data and for DEC assembler rodata). The following patch fixes that by putting it always into data section, and additionally avoids emitting an empty line in the assembly for the lcomm vars. 2020-03-11 Jakub Jelinek PR target/94134 * config/pdp11/pdp11.c (pdp11_asm_output_var): Call switch_to_section at the start to switch to data section. Don't print extra newline if .globl directive has not been emitted. * gcc.c-torture/execute/pr94134.c: New test.
[Bug tree-optimization/94130] [8/9 Regression] Unintended result with optimization option when assigning two structures, memset and 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94130 --- Comment #10 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:a545ffafa380fa958393e1dfbf7f5f8f129bc5cf commit r9-8392-ga545ffafa380fa958393e1dfbf7f5f8f129bc5cf Author: Jakub Jelinek Date: Thu Mar 12 09:34:00 2020 +0100 tree-dse: Fix mem* head trimming if call has lhs [PR94130] As the testcase shows, if DSE decides to head trim {mem{set,cpy,move},strncpy} and the call has lhs, it is incorrect to leave the lhs as is, because it will then point to the adjusted address (base + head_trim) instead of the original base. The following patch fixes that by dropping the lhs of the call and assigning lhs the original base in a following statement. 2020-03-12 Jakub Jelinek PR tree-optimization/94130 * tree-ssa-dse.c: Include gimplify.h. (increment_start_addr): If stmt has lhs, drop the lhs from call and set it after the call to the original value of the first argument. Formatting fixes. (decrement_count): Formatting fix. * gcc.c-torture/execute/pr94130.c: New test.