- 26 Feb, 2020 6 commits
-
-
In this PR we had a conversion between two integer vectors that both had scalar integer modes. We then tried to implement the conversion using the scalar optab for those modes, instead of doing the conversion elementwise. I wondered about letting through scalar modes for single-element vectors, but I don't have any evidence that that's useful/necessary, so it seemed better to keep things simple. 2020-02-26 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR middle-end/93843 * optabs-tree.c (supportable_convert_operation): Reject types with scalar modes. gcc/testsuite/ PR middle-end/93843 * gcc.dg/vect/pr93843-1.c: New test. * gcc.dg/vect/pr93843-2.c: Likewise.
Richard Sandiford committed -
This patch adds various information to -fdump-analyzer and -fdump-analyzer-stderr to make it easier to track down problems with state explosions in the exploded_graph. It logs the number of unprocessed nodes in the worklist, for the case where the upper limit on exploded nodes is reached. It prints: [a] a bar chart showing the number of exploded nodes by function, and [b] bar charts for each function showing the number of exploded nodes per supernode/BB, and [c] bar charts for each function showing the number of excess exploded nodes per supernode/BB beyond the limit (--param=analyzer-max-enodes-per-program-point), where that limit was reached I've found these helpful in finding exactly where we fail to consolidate state, leading to state explosions and false negatives due to the thresholds being reached. The patch also adds a "superedge::dump" member function I found myself needing. gcc/ChangeLog: * Makefile.in (ANALYZER_OBJS): Add analyzer/bar-chart.o. gcc/analyzer/ChangeLog: * bar-chart.cc: New file. * bar-chart.h: New file. * engine.cc: Include "analyzer/bar-chart.h". (stats::log): Only log the m_num_nodes kinds that are non-zero. (stats::dump): Likewise when dumping. (stats::get_total_enodes): New. (exploded_graph::get_or_create_node): Increment the per-point-data m_excess_enodes when hitting the per-program-point limit on enodes. (exploded_graph::print_bar_charts): New. (exploded_graph::log_stats): Log the number of unprocessed enodes in the worklist. Call print_bar_charts. (exploded_graph::dump_stats): Print the number of unprocessed enodes in the worklist. * exploded-graph.h (stats::get_total_enodes): New decl. (struct per_program_point_data): Add field m_excess_enodes. (exploded_graph::print_bar_charts): New decl. * supergraph.cc (superedge::dump): New. (superedge::dump): New. * supergraph.h (supernode::get_function): New. (superedge::dump): New decl. (superedge::dump): New decl.
David Malcolm committed -
2020-02-26 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/93820 * gcc.dg/pr93820-2.c: New test.
Jakub Jelinek committed -
The following testcase is miscompiled in 8+. The problem is that check_no_overlap has a special case for INTEGER_CST marked stores (i.e. stores of constants), if both all currenly merged stores and the one under consideration for merging with them are marked that way, it anticipates that other INTEGER_CST marked stores that overlap with those and precede those (have smaller info->order) could be merged with those and doesn't punt for them. In PR86844 and PR87859 fixes I've then added quite large code that is performed after check_no_overlap and tries to find out if we need and can merge further INTEGER_CST marked stores, or need to punt. Unfortunately, that code is there only in the overlapping case code and the testcase below shows that we really need it even in the adjacent store case. After sort_by_bitpos we have: bitpos width order rhs_code 96 32 3 INTEGER_CST 128 32 1 INTEGER_CST 128 128 2 INTEGER_CST 192 32 0 MEM_REF Because of the missing PR86844/PR87859-ish code in the adjacent store case, we merge the adjacent (memory wise) stores 96/32/3 and 128/32/1, and then we consider the 128-bit store which is in program-order in between them, but in this case we punt, because the merging would extend the merged store region from bitpos 96 and 64-bits to bitpos 96 and 160-bits and that has an overlap with an incompatible store (the MEM_REF one). The problem is that we can't really punt this way, because the 128-bit store is in between those two we've merged already, so either we manage to merge even that one together with the others, or would need to avoid already merging the 96/32/3 and 128/32/1 stores together. Now, rather than copying around the PR86844/PR87859 code to the other spot, we can actually just use the overlapping code, merge_overlapping is really a superset of merge_into, so that is what the patch does. If doing adjacent store merge for rhs_code other than INTEGER_CST, I believe the current code is already fine, check_no_overlap in that case doesn't make the exception and will punt if there is some earlier (smaller order) non-mergeable overlapping store. There is just one case that could be problematic, if the merged_store has BIT_INSERT_EXPRs in them and the new store is a constant store (INTEGER_CST rhs_code), then check_no_overlap would do the exception and still would allow the special case. But we really shouldn't have the special case in that case, so this patch also changes check_no_overlap to just have a bool whether we should have the special case or not. Note, as I said in the PR, for GCC11 we could consider performing some kind of cheap DSE during the store merging (perhaps guarded with flag_tree_dse). And another thing to consider is only consider as problematic non-mergeable stores that not only have order smaller than last_order as currently, but also have order larger than first_order, as in this testcase if we actually ignored (not merged with anything at all) the 192/32/0 store, because it is not in between the other stores we'd merge, it would be fine to merge the other 3 stores, though of course the testcase can be easily adjusted by putting the 192/32 store after the 128/32 store and then this patch would be still needed. Though, I think I'd need more time thinking this over. 2020-02-26 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/93820 * gimple-ssa-store-merging.c (check_no_overlap): Change RHS_CODE argument to ALL_INTEGER_CST_P boolean. (imm_store_chain_info::try_coalesce_bswap): Adjust caller. (imm_store_chain_info::coalesce_immediate_stores): Likewise. Handle adjacent INTEGER_CST store into merged_store->only_constants like overlapping one. * gcc.dg/pr93820.c: New test.
Jakub Jelinek committed -
Add testcase for a bug that has been just on the 8 branch. 2020-02-26 Jakub Jelinek <jakub@redhat.com> PR c++/93905 * g++.dg/cpp0x/pr93905.C: New test.
Jakub Jelinek committed -
GCC Administrator committed
-
- 25 Feb, 2020 29 commits
-
-
2020-02-25 Jakub Jelinek <jakub@redhat.com> PR other/93912 * config/sh/sh.c (expand_cbranchdi4): Fix comment typo, probablity -> probability. * cfghooks.c (verify_flow_info): Likewise. * predict.c (combine_predictions_for_bb): Likewise. * bb-reorder.c (connect_better_edge_p): Likewise. Fix comment typo, sucessor -> successor. (find_traces_1_round): Fix comment typo, destinarion -> destination. * omp-expand.c (expand_oacc_for): Fix comment typo, sucessors -> successors. * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Fix dump message typo, sucessors -> successors. c/ * gimple-parser.c (c_parser_gimple_parse_bb_spec_edge_probability): Rename last argument from probablity to probability.
Jakub Jelinek committed -
gcc/ChangeLog: * doc/extend.texi (attribute access): Correct an example.
Martin Sebor committed -
This patch adds the load/store bfloat16 intrinsics to the AArch64 back-end. ACLE documents are at https://developer.arm.com/docs/101028/latest ISA documents are at https://developer.arm.com/docs/ddi0596/latest 2020-02-25 Mihail Ionescu <mihail.ionescu@arm.com> gcc/ * config/aarch64/aarch64-builtins.c (aarch64_scalar_builtin_types): Add simd_bf. (aarch64_init_simd_builtin_scalar_types): Register simd_bf. (VAR15, VAR16): New. * config/aarch64/iterators.md (VALLDIF): Enable for V4BF and V8BF. (VD): Enable for V4BF. (VDC): Likewise. (VQ): Enable for V8BF. (VQ2): Likewise. (VQ_NO2E): Likewise. (VDBL, Vdbl): Add V4BF. (V_INT_EQUIV, v_int_equiv): Add V4BF and V8BF. * config/aarch64/arm_neon.h (bfloat16x4x2_t): New typedef. (bfloat16x8x2_t): Likewise. (bfloat16x4x3_t): Likewise. (bfloat16x8x3_t): Likewise. (bfloat16x4x4_t): Likewise. (bfloat16x8x4_t): Likewise. (vcombine_bf16): New. (vld1_bf16, vld1_bf16_x2): New. (vld1_bf16_x3, vld1_bf16_x4): New. (vld1q_bf16, vld1q_bf16_x2): New. (vld1q_bf16_x3, vld1q_bf16_x4): New. (vld1_lane_bf16): New. (vld1q_lane_bf16): New. (vld1_dup_bf16): New. (vld1q_dup_bf16): New. (vld2_bf16): New. (vld2q_bf16): New. (vld2_dup_bf16): New. (vld2q_dup_bf16): New. (vld3_bf16): New. (vld3q_bf16): New. (vld3_dup_bf16): New. (vld3q_dup_bf16): New. (vld4_bf16): New. (vld4q_bf16): New. (vld4_dup_bf16): New. (vld4q_dup_bf16): New. (vst1_bf16, vst1_bf16_x2): New. (vst1_bf16_x3, vst1_bf16_x4): New. (vst1q_bf16, vst1q_bf16_x2): New. (vst1q_bf16_x3, vst1q_bf16_x4): New. (vst1_lane_bf16): New. (vst1q_lane_bf16): New. (vst2_bf16): New. (vst2q_bf16): New. (vst3_bf16): New. (vst3q_bf16): New. (vst4_bf16): New. (vst4q_bf16): New. gcc/testsuite/ * gcc.target/aarch64/advsimd-intrinsics/bf16_vstn.c: New test. * gcc.target/aarch64/advsimd-intrinsics/bf16_vldn.c: New test.
Mihail Ionescu committed -
This patch adds support for the bf16 duplicate and reinterpret intrinsics. ACLE documents are at https://developer.arm.com/docs/101028/latest ISA documents are at https://developer.arm.com/docs/ddi0596/latest 2020-02-25 Mihail Ionescu <mihail.ionescu@arm.com> gcc/ * config/aarch64/iterators.md (VDQF_F16) Add V4BF and V8BF. (VALL_F16): Likewise. (VALLDI_F16): Likewise. (Vtype): Likewise. (Vetype): Likewise. (vswap_width_name): Likewise. (VSWAP_WIDTH): Likewise. (Vel): Likewise. (VEL): Likewise. (q): Likewise. * config/aarch64/arm_neon.h (vset_lane_bf16, vsetq_lane_bf16): New. (vget_lane_bf16, vgetq_lane_bf16): New. (vcreate_bf16): New. (vdup_n_bf16, vdupq_n_bf16): New. (vdup_lane_bf16, vdup_laneq_bf16): New. (vdupq_lane_bf16, vdupq_laneq_bf16): New. (vduph_lane_bf16, vduph_laneq_bf16): New. (vreinterpret_bf16_u8, vreinterpretq_bf16_u8): New. (vreinterpret_bf16_u16, vreinterpretq_bf16_u16): New. (vreinterpret_bf16_u32, vreinterpretq_bf16_u32): New. (vreinterpret_bf16_u64, vreinterpretq_bf16_u64): New. (vreinterpret_bf16_s8, vreinterpretq_bf16_s8): New. (vreinterpret_bf16_s16, vreinterpretq_bf16_s16): New. (vreinterpret_bf16_s32, vreinterpretq_bf16_s32): New. (vreinterpret_bf16_s64, vreinterpretq_bf16_s64): New. (vreinterpret_bf16_p8, vreinterpretq_bf16_p8): New. (vreinterpret_bf16_p16, vreinterpretq_bf16_p16): New. (vreinterpret_bf16_p64, vreinterpretq_bf16_p64): New (vreinterpret_bf16_f16, vreinterpretq_bf16_f16): New (vreinterpret_bf16_f32, vreinterpretq_bf16_f32): New. (vreinterpret_bf16_f64, vreinterpretq_bf16_f64): New. (vreinterpretq_bf16_p128): New. (vreinterpret_s8_bf16, vreinterpretq_s8_bf16): New. (vreinterpret_s16_bf16, vreinterpretq_s16_bf16): New. (vreinterpret_s32_bf16, vreinterpretq_s32_bf16): New. (vreinterpret_s64_bf16, vreinterpretq_s64_bf16): New. (vreinterpret_u8_bf16, vreinterpretq_u8_bf16): New. (vreinterpret_u16_bf16, vreinterpretq_u16_bf16): New. (vreinterpret_u32_bf16, vreinterpretq_u32_bf16): New. (vreinterpret_u64_bf16, vreinterpretq_u64_bf16): New. (vreinterpret_p8_bf16, vreinterpretq_p8_bf16): New. (vreinterpret_p16_bf16, vreinterpretq_p16_bf16): New. (vreinterpret_p64_bf16, vreinterpretq_p64_bf16): New. (vreinterpret_f32_bf16, vreinterpretq_f32_bf16): New. (vreinterpret_f64_bf16,vreinterpretq_f64_bf16): New. (vreinterpret_f16_bf16,vreinterpretq_f16_bf16): New. (vreinterpretq_p128_bf16): New. gcc/testsuite/ * gcc.target/aarch64/advsimd-intrinsics/bf16_dup.c: New test. * gcc.target/aarch64/advsimd-intrinsics/bf16_reinterpret.c: New test.
Mihail Ionescu committed -
libstdc++-v3/ChangeLog: LWG 3397 basic_istream_view::iterator should not provide iterator_category * include/std/ranges (basic_istream_view:_Iterator::iterator_category): Rename to ... (basic_istream_view:_Iterator::iterator_concept): ... this. * testsuite/std/ranges/istream_view.cc: Augment test.
Patrick Palka committed -
libstdc++-v3/ChangeLog: LWG 3325 Constrain return type of transformation function for transform_view * include/std/ranges (transform_view): Constrain the return type of the transformation function as per LWG 3325. * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
Patrick Palka committed -
libstdc++-v3/ChangeLog: LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained * include/std/ranges (join_view::_Iterator::operator--): Require that range_reference_t<_Base> models common_range. * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
Patrick Palka committed -
libstdc++-v3/ChangeLog: LWG 3301 transform_view::_Iterator has incorrect iterator_category * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust determination of iterator_category as per LWG 3301. * testsuite/std/ranges/adaptors/transform.cc: Augment test.
Patrick Palka committed -
libstdc++-v3/ChangeLog: LWG 3292 iota_view is under-constrained * include/std/ranges (iota_view): Require that _Winc models semiregular as per LWG 3292. * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
Patrick Palka committed -
This patch is part of a series adding support for Armv8.6-A features. It adds intrinsics for brain half-precision float-point (BF16) dot instructions with AdvSIMD support. gcc/ChangeLog: 2020-02-25 Dennis Zhang <dennis.zhang@arm.com> * config/arm/arm_neon.h (vbfdot_f32, vbfdotq_f32): New (vbfdot_lane_f32, vbfdotq_laneq_f32): New. (vbfdot_laneq_f32, vbfdotq_lane_f32): New. * config/arm/arm_neon_builtins.def (vbfdot): New entry. (vbfdot_lanev4bf, vbfdot_lanev8bf): Likewise. * config/arm/iterators.md (VSF2BF): New attribute. * config/arm/neon.md (neon_vbfdot<VCVTF:mode>): New entry. (neon_vbfdot_lanev4bf<VCVTF:mode>): Likewise. (neon_vbfdot_lanev8bf<VCVTF:mode>): Likewise. gcc/testsuite/ChangeLog: 2020-02-25 Dennis Zhang <dennis.zhang@arm.com> * gcc.target/arm/simd/bf16_dot_1.c: New test. * gcc.target/arm/simd/bf16_dot_2.c: New test. * gcc.target/arm/simd/bf16_dot_3.c: New test.
Dennis Zhang committed -
The mutating sequence algorithms std::copy, std::copy_backward, std::move and std::move_backward conditionally use __builtin_memmove for trivially copyable types. However, because memmove isn't usable in constant expressions the use of __builtin_memmove is wrapped in a __memmove function which replaces __builtin_memmove with a handwritten loop when std::is_constant_evaluated() is true. This means we have a manual loop for non-trivially copyable cases, and a different manual loop for trivially copyable but constexpr cases. The latter loop has incorrect semantics for the {copy,move}_backward cases and so isn't used for them. Until earlier today the latter loop also had incorrect semantics for the std::move cases, trying to move from const rvalues. The approach taken by this patch is to remove the __memmove function entirely and use the original (and correct) manual loops for the constexpr cases as well as the non-trivially copyable cases. This was already done for move_backward and copy_backward, but was incorrectly turning copy_backward into move_backward, by failing to use the _IsMove constant to select the right specialization. This patch also fixes that. * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove during constant evaluation. Call __builtin_memmove directly instead of __memmove. (__copy_or_move_backward): Likewise. * include/bits/stl_algobase.h (__memmove): Remove. (__copy_move<M, true, random_access_iterator_tag>::__copy_m) (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m): Use __builtin_memmove directly instead of __memmove. (__copy_move_a2): Do not use memmove during constant evaluation. (__copy_move_backward_a2): Use _IsMove constant to select correct __copy_move_backward specialization. * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies begin turned into moves during constant evaluation.
Jonathan Wakely committed -
Jonathan Wakely committed
-
When running the testsuite with -fdisable-rtl-fwprop2 and -mpure-code for cortex-m0, I noticed that some testcases were failing because we still generate "ldr rX, .LCY", which is what we want to avoid with -mpure-code. This is latent since a recent improvement in fwprop (PR88833). In this patch I change the thumb1_movsi_insn pattern so that it emits the desired instruction sequence when arm_disable_literal_pool is set. To achieve that, I introduce a new required_for_purecode attribute to enable the corresponding alternative in thumb1_movsi_insn and take the actual instruction sequence length into account. gcc/ChangeLog: 2020-02-13 Christophe Lyon <christophe.lyon@linaro.org> * config/arm/arm.md (required_for_purecode): New attribute. (enabled): Handle required_for_purecode. * config/arm/thumb1.md (thumb1_movsi_insn): Add alternative to work with -mpure-code.
Christophe Lyon committed -
git is miscompiled on s390x-linux with -O2 -march=zEC12 -mtune=z13. I've managed to reduce it into the following testcase. The problem is that during combine we see the s->k = -1; bitfield store and change the SET_SRC from a pseudo into a constant: (set (zero_extract:DI (mem/j:HI (plus:DI (reg/v/f:DI 60 [ s ]) (const_int 10 [0xa])) [0 +0 S2 A16]) (const_int 2 [0x2]) (const_int 7 [0x7])) (const_int -1 [0xffffffffffffffff])) This on s390x with the above option isn't recognized as valid instruction, so find_split_point decides to handle it as IOR or IOR/AND. src is -1, mask is 3 and pos is 7. src != mask (this is also incorrect, we want to set all (both) bits in the bitfield), so we go for IOR/AND, but instead of trying mem = (mem & ~0x180) | ((-1 << 7) & 0x180) we actually try mem = (mem & ~0x180) | (-1 << 7) and that is further simplified into: mem = mem | (-1 << 7) aka mem = mem | 0xff80 which doesn't set just the 2-bit bitfield, but also many other bitfields that shouldn't be touched. We really should do: mem = mem | 0x180 instead. The problem is that we assume that no bits but those low len (2 here) will be set in the SET_SRC, but there is nothing that can prevent that, we just should ignore the other bits. The following patch fixes it by masking src with mask, this way already the src == mask test will DTRT, and as the code for or_mask uses gen_int_mode, if the most significant bit is set after shifting it left by pos, it will be properly sign-extended. 2020-02-25 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/93908 * combine.c (find_split_point): For store into ZERO_EXTRACT, and src with mask. * gcc.c-torture/execute/pr93908.c: New test.
Jakub Jelinek committed -
* testsuite/25_algorithms/move_backward/93872.cc: Add test left out of previous commit.
Jonathan Wakely committed -
The std::move and std::move_backward algorithms dispatch to the std::__memmove helper when appropriate. That function uses a pointer-to-const for the source values, preventing them from being moved. The two callers of that function have the same problem. Rather than altering __memmove and its callers to work with const or non-const source pointers, this takes a more conservative approach of casting away the const at the point where we want to do a move assignment. This relies on the fact that we only use __memmove when the type is trivially copyable, so we know the move assignment doesn't alter the source anyway. PR libstdc++/93872 * include/bits/stl_algobase.h (__memmove): Cast away const before doing move assignment. * testsuite/25_algorithms/move/93872.cc: New test. * testsuite/25_algorithms/move_backward/93872.cc: New test.
Jonathan Wakely committed -
This fixes a regression whereby the program fails to link with debug info in LTO mode because of an undefined reference to a symbol coming from the object files containing the early debug info. * dwarf2out.c (dwarf2out_size_function): Run in early-DWARF mode.
Eric Botcazou committed -
This adds a testcase for some basic FRE functionality. 2020-02-25 Richard Biener <rguenther@suse.de> * gcc.dg/tree-ssa/ssa-fre-86.c: New testcase.
Richard Biener committed -
gcc/ChangeLog: doc/install.texi (--enable-checking): Adjust wording.
Roman Zhuykov committed -
This avoids altering possibly shared SLP subtrees when attempting to get rid of permutations in SLP reductions by copying the SLP subtree before re-arranging stmts in it. 2020-02-25 Richard Biener <rguenther@suse.de> PR tree-optimization/93868 * tree-vect-slp.c (slp_copy_subtree): New function. (vect_attempt_slp_rearrange_stmts): Copy the SLP tree before re-arranging stmts in it. * gcc.dg/torture/pr93868.c: New testcase.
Richard Biener committed -
dump_passes pushes a dummy function for which it evaluates the gates and checks whether the pass is enabled or disabled. Unfortunately, if any -fdisable-*-*/-fenable-*-* options were seen, we ICE during is_pass_explicitly_enabled_or_disabled because slot is non-NULL then and the code will do: cgraph_uid = func ? cgraph_node::get (func)->get_uid () : 0; but the dummy function doesn't have a cgraph node. So, either we need to create and then remove a cgraph node for the dummy function like the following patch, or function.c would need to export the in_dummy_function flag (or have some way to query that flag from other TUs) and we'd need to check it in is_pass_explicitly_enabled_or_disabled. 2020-02-25 Jakub Jelinek <jakub@redhat.com> PR middle-end/93874 * passes.c (pass_manager::dump_passes): Create a cgraph node for the dummy function and remove it at the end. * gcc.dg/pr93874.c: New test.
Jakub Jelinek committed -
* simplify.c (degrees_f): Remove unused code.
Steven G. Kargl committed -
Seems the test has been badly reduced (if the original doesn't emit warnings, it is always better in the reduction script avoid introducing new ones). Also, the g++.dg/ipa/ test fails with -std=c++98 because it is written in C++11. 2020-02-25 Jakub Jelinek <jakub@redhat.com> PR ipa/93763 * gcc.dg/ipa/pr93763.c: Adjust the test so that it compiles without warnings and still ICEs before the ipa-cp.c fix. * g++.dg/ipa/pr93763.C: Require c++11 effective target.
Jakub Jelinek committed -
2020-02-25 Jakub Jelinek <jakub@redhat.com> PR c/93858 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after "did you mean" hint in diagnostics.
Jakub Jelinek committed -
2020-02-25 Jakub Jelinek <jakub@redhat.com> PR translation/93864 * config/lm32/lm32.c (lm32_setup_incoming_varargs): Fix comment typo paramter -> parameter. * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Likewise. * ipa-prop.h (struct ipa_agg_replacement_value): Likewise. * intrinsic.texi (CO_BROADCAST): Fix typo, paramter -> parameter. * trans-array.c (gfc_allocate_pdt_comp, gfc_deallocate_pdt_comp, gfc_check_pdt_dummy): Fix comment typo paramter -> parameter. * objc.dg/encode-2.m: Fix comment typo paramter -> parameter. * obj-c++.dg/encode-4.mm: Likewise. * gfortran.dg/data_array_5.f90: Likewise. * gcc.dg/decl-1.c: Likewise.
Jakub Jelinek committed -
This patch rewords the whole description to fix minor issues: - documents 'gimple' and 'types' checks, - clarifies what happens when option is used without '=list', - fixes inaccurate wrong wording about release snapshots, - describes that release checks can only de disabled explicitly. gcc/ChangeLog: * doc/install.texi (--enable-checking): Properly document current behavior. (--enable-stage1-checking): Minor clarification about bootstrap.
Roman Zhuykov committed -
This patch fixes a bug with -fdump-analyzer, which is meant to write purely a dumpfile, but was erroneously sending part of the dump to stderr. gcc/analyzer/ChangeLog: * engine.cc (exploded_graph::get_or_create_node): Dump the program_state to the pp, rather than to stderr.
David Malcolm committed -
* de.po: Update.
Joseph Myers committed -
GCC Administrator committed
-
- 24 Feb, 2020 5 commits
-
-
PR analyzer/93032 tracks a false negative where we fail to report FILE * leaks within zlib/contrib/minizip/mztools.c. The underlying issue is a combinatorial explosion of states within the exploded graph. In particular, the state of the "taint" checker is exploding, leading to the analyzer bailing out. I have a patch kit under construction that fixes the state explosion issue enough for the "file" checker to report the leaks, but doing so requires disabling the "taint" checker. Given that the latter is more of a proof-of-concept, this patch disables it by default, to stop it breaking the other checkers. gcc/analyzer/ChangeLog: PR analyzer/93032 * sm.cc (make_checkers): Require the "taint" checker to be explicitly enabled. gcc/ChangeLog: PR analyzer/93032 * doc/invoke.texi (-Wnanalyzer-tainted-array-index): Note that -fanalyzer-checker=taint is also required. (-fanalyzer-checker=): Note that providing this option enables the given checker, and doing so may be required for checkers that are disabled by default. gcc/testsuite/ChangeLog: PR analyzer/93032 * gcc.dg/analyzer/pr93382.c: Add "-fanalyzer-checker=taint". * gcc.dg/analyzer/taint-1.c: Likewise.
David Malcolm committed -
PR analyzer/93899 reports an ICE within make_region_for_type when handling a param of type OFFSET_TYPE within exploded_graph::add_function_entry. This patch fixes the ICE by further generalizing the "give up on this tree code" logic from r10-6667-gf76a88eb for PR analyzer/93388 and r10-6695-g2e623393 for PR analyzer/93778 by replacing the gcc_unreachable in make_region_for_type with a return of NULL, and handling this in add_region_for_type by notifying the ctxt. Doing so means that numerous places that create regions now need to have a context passed to them, so most of the patch is churn involved in passing a context around to where it's needed. gcc/analyzer/ChangeLog: PR analyzer/93899 * engine.cc (impl_region_model_context::impl_region_model_context): Add logger param. * engine.cc (exploded_graph::add_function_entry): Create an impl_region_model_context and pass it to the push_frame call. Bail if the resulting state is invalid. (exploded_graph::build_initial_worklist): Likewise. (exploded_graph::build_initial_worklist): Handle the case where add_function_entry fails. * exploded-graph.h (impl_region_model_context::impl_region_model_context): Add logger param. * region-model.cc (map_region::get_or_create): Add ctxt param and pass it to add_region_for_type. (map_region::can_merge_p): Pass NULL as a ctxt to call to get_or_create. (array_region::get_element): Pass ctxt to call to get_or_create. (array_region::get_or_create): Add ctxt param and pass it to add_region_for_type. (root_region::push_frame): Pass ctxt to get_or_create calls. (region_model::get_lvalue_1): Likewise. (region_model::make_region_for_unexpected_tree_code): Assert that ctxt is non-NULL. (region_model::get_rvalue_1): Pass ctxt to get_svalue_for_fndecl and get_svalue_for_label calls. (region_model::get_svalue_for_fndecl): Add ctxt param and pass it to get_region_for_fndecl. (region_model::get_region_for_fndecl): Add ctxt param and pass it to get_or_create. (region_model::get_svalue_for_label): Add ctxt param and pass it to get_region_for_label. (region_model::get_region_for_label): Add ctxt param and pass it to get_region_for_fndecl and get_or_create. (region_model::get_field_region): Add ctxt param and pass it to get_or_create_view and get_or_create. (make_region_for_type): Replace gcc_unreachable with return NULL. (region_model::add_region_for_type): Add ctxt param. Handle a return of NULL from make_region_for_type by calling make_region_for_unexpected_tree_code. (region_model::get_or_create_mem_ref): Pass ctxt to calls to get_or_create_view. (region_model::get_or_create_view): Add ctxt param and pass it to add_region_for_type. (selftest::test_state_merging): Pass ctxt to get_or_create_view. * region-model.h (region_model::get_or_create): Add ctxt param. (region_model::add_region_for_type): Likewise. (region_model::get_svalue_for_fndecl): Likewise. (region_model::get_svalue_for_label): Likewise. (region_model::get_region_for_fndecl): Likewise. (region_model::get_region_for_label): Likewise. (region_model::get_field_region): Likewise. (region_model::get_or_create_view): Likewise. gcc/testsuite/ChangeLog: PR analyzer/93899 * g++.dg/analyzer/pr93899.C: New test.
David Malcolm committed -
Patch from Svante Signell. Fixes GCC PR go/93900 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/220592
Ian Lance Taylor committed -
gcc/cp/ChangeLog: * parser.c (cp_parser_check_class_key): Remove a duplicate hunk of code.
Martin Sebor committed -
gcc/cp/ChangeLog: PR c++/93804 * parser.c (cp_parser_check_class_key): Avoid issuing -Wredundant-tags in shared C/C++ code in headers. gcc/testsuite/ChangeLog: PR c++/93804 * g++.dg/warn/Wredundant-tags-4.C: New test. * g++.dg/warn/Wredundant-tags-5.C: New test. * g++.dg/warn/Wredundant-tags-5.h: New test.
Martin Sebor committed
-