aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-22Add testcase for PR fortran/95196Sandra Loosemore1-0/+83
2021-10-22 José Rui Faustino de Sousa <jrfsousa@gmail.com> Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ PR fortran/95196 * gfortran.dg/PR95196.f90: New.
2021-10-23Daily bump.GCC Administrator21-1/+206
2021-10-22Add install-dvi Makefile targets.Eric Gallager20-36/+2139
Closes #102663 ChangeLog: PR other/102663 * Makefile.def: Handle install-dvi target. * Makefile.tpl: Likewise. * Makefile.in: Regenerate. c++tools/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. gcc/ChangeLog: PR other/102663 * Makefile.in: Handle dvidir and install-dvi target. * configure: Regenerate. * configure.ac: Add install-dvi to target_list. gcc/ada/ChangeLog: PR other/102663 * gcc-interface/Make-lang.in: Allow dvi-formatted documentation to be installed. gcc/c/ChangeLog: PR other/102663 * Make-lang.in: Add dummy c.install-dvi target. gcc/cp/ChangeLog: PR other/102663 * Make-lang.in: Add dummy c++.install-dvi target. gcc/d/ChangeLog: PR other/102663 * Make-lang.in: Allow dvi-formatted documentation to be installed. gcc/fortran/ChangeLog: PR other/102663 * Make-lang.in: Allow dvi-formatted documentation to be installed. gcc/lto/ChangeLog: PR other/102663 * Make-lang.in: Add dummy lto.install-dvi target. gcc/objc/ChangeLog: PR other/102663 * Make-lang.in: Add dummy objc.install-dvi target. gcc/objcp/ChangeLog: PR other/102663 * Make-lang.in: Add dummy objc++.install-dvi target. gnattools/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libada/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libcpp/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libdecnumber/ChangeLog: PR other/102663 * Makefile.in: Add dummy install-dvi target. libiberty/ChangeLog: PR other/102663 * Makefile.in: Allow dvi-formatted documentation to be installed.
2021-10-23doc: Convert mingw-w64.org links to httpsGerald Pfeifer1-2/+2
gcc: * doc/install.texi (Binaries): Convert mingw-w64.org to https. (Specific): Ditto.
2021-10-22libstdc++: Constrain std::make_any [PR102894]Jonathan Wakely2-4/+29
std::make_any should be constrained so it can only be called if the construction of the return value would be valid. libstdc++-v3/ChangeLog: PR libstdc++/102894 * include/std/any (make_any): Add SFINAE constraint. * testsuite/20_util/any/102894.cc: New test.
2021-10-23Fortran: Change XFAIL to PASSTobias Burnus31-60/+51
Replace dg-excess-errors by dg-error/warning and dg-prune-output for more fine-grained output handling and to avoid XPASS. gcc/testsuite/ChangeLog: * gfortran.dg/associate_3.f03: Replace dg-excess-errors by other dg-* to change XFAIL to PASS. * gfortran.dg/binding_label_tests_4.f03: Likewise. * gfortran.dg/block_4.f08: Likewise. * gfortran.dg/charlen_04.f90: Likewise. * gfortran.dg/charlen_05.f90: Likewise. * gfortran.dg/charlen_06.f90: Likewise. * gfortran.dg/charlen_13.f90: Likewise. * gfortran.dg/coarray_9.f90: Likewise. * gfortran.dg/coarray_collectives_3.f90: Likewise. * gfortran.dg/data_invalid.f90: Likewise. * gfortran.dg/do_4.f: Likewise. * gfortran.dg/dollar_sym_1.f90: Likewise. * gfortran.dg/dollar_sym_3.f: Likewise. * gfortran.dg/fmt_tab_1.f90: Likewise. * gfortran.dg/fmt_tab_2.f90: Likewise. * gfortran.dg/forall_16.f90: Likewise. * gfortran.dg/g77/970125-0.f: Likewise. * gfortran.dg/gomp/unexpected-end.f90: Likewise. * gfortran.dg/interface_operator_1.f90: Likewise. * gfortran.dg/interface_operator_2.f90: Likewise. * gfortran.dg/line_length_4.f90: Likewise. * gfortran.dg/line_length_5.f90: Likewise. * gfortran.dg/line_length_6.f90: Likewise. * gfortran.dg/line_length_8.f90: Likewise. * gfortran.dg/line_length_9.f90: Likewise. * gfortran.dg/pr65045.f90: Likewise. * gfortran.dg/pr69497.f90: Likewise. * gfortran.dg/submodule_21.f08: Likewise. * gfortran.dg/tab_continuation.f: Likewise. * gfortran.dg/typebound_proc_2.f90: Likewise. * gfortran.dg/warnings_are_errors_1.f90: Likewise.
2021-10-22Fortran: Avoid running into assert with -fcheck= + UBSANTobias Burnus2-0/+40
PR fortran/92621 gcc/fortran/ * trans-expr.c (gfc_trans_assignment_1): Add STRIP_NOPS. gcc/testsuite/ * gfortran.dg/bind-c-intent-out-2.f90: New test.
2021-10-23or1k: Update FPU to specify detect tininess before roundingStafford Horne1-1/+1
This was not defined in the spec and not consistent in the implementation causing incosistent behavior. After review we have updated the CPU implementations and proposed the spec be updated to specific that FPU tininess checks check for tininess before roudning. Architecture change draft: https://openrisc.io/proposals/p18-fpu-tininess libgcc/ChangeLog: * config/or1k/sfp-machine.h (_FP_TININESS_AFTER_ROUNDING): Change to 0.
2021-10-22Handle jobserver file descriptors in btest.Martin Liska1-4/+20
PR testsuite/102742 libbacktrace/ChangeLog: * btest.c (MIN_DESCRIPTOR): New. (MAX_DESCRIPTOR): Likewise. (check_available_files): Likewise. (check_open_files): Check only file descriptors that were not available at the entry. (main): Call check_available_files.
2021-10-22Add testcase for PR fortran/94289Sandra Loosemore1-0/+168
2021-10-22 José Rui Faustino de Sousa <jrfsousa@gmail.com> Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ PR fortran/94289 * gfortran.dg/PR94289.f90: New.
2021-10-22Add testcase for PR fortran/100906Sandra Loosemore2-0/+1868
2021-10-21 José Rui Faustino de Sousa <jrfsousa@gmail.com> Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ PR fortran/100906 * gfortran.dg/PR100906.f90: New. * gfortran.dg/PR100906.c: New.
2021-10-22tree-optimization/102893 - properly DCE empty loops inside infinite loopsRichard Biener2-1/+11
The following fixes the test for an exit edge I put in place for the fix for PR45178 where I somehow misunderstood how the cyclic list works. 2021-10-22 Richard Biener <rguenther@suse.de> PR tree-optimization/102893 * tree-ssa-dce.c (find_obviously_necessary_stmts): Fix the test for an exit edge. * gcc.dg/tree-ssa/ssa-dce-9.c: New testcase.
2021-10-22Disregard incoming equivalences to a path when defining a new one.Aldy Hernandez3-1/+33
The equivalence oracle creates a new equiv set at each def point, killing any incoming equivalences, however in the path sensitive oracle we create brand new equivalences at each PHI: BB4: BB8: x_5 = PHI <y_8(4)> Here we note that x_5 == y_8 at the end of the path. The current code is intersecting this new equivalence with previously known equivalences coming into the path. This is incorrect, as this is a new definition. This patch kills any known equivalence before we register a new one. This hasn't caused problems so far, but upcoming changes to the pipeline has us threading more aggressively and triggering corner cases where this causes incorrect code. I have tested this patch with the usual regstrap cycle. I have also hacked a compiler comparing the old and new behavior to see if we were previously threading paths where the decision was made due to invalid equivalences. Luckily, there were no such paths, but there were 22 paths in a set of .ii files where disregarding incoming relations allowed us to thread the path. This is a miniscule improvement, but we moved a handful of thredable paths earlier in the pipeline, which is always good. Tested on x86-64 Linux. Co-authored-by: Andrew MacLeod <amacleod@redhat.com> gcc/ChangeLog: * gimple-range-path.cc (path_range_query::compute_phi_relations): Kill any global relations we may know before registering a new one. * value-relation.cc (path_oracle::killing_def): New. * value-relation.h (path_oracle::killing_def): New.
2021-10-22bootstrap/102681 - properly CSE PHIs with default def argsRichard Biener3-3/+32
The PR shows that we fail to CSE PHIs containing (different) default definitions due to the fact on how we now handle on-demand build of VN_INFO. The following fixes this in the same way the PHI visitation code does. On gcc.dg/ubsan/pr81981.c this causes one expected warning to be elided since the uninit pass sees the change <bb 4> [local count: 1073741824]: # u$0_2 = PHI <u$0_5(D)(3), i_3(D)(5)> - # cstore_11 = PHI <t$0_6(D)(3), i_3(D)(5)> v = u$0_2; - return cstore_11; + return u$0_2; and thus only one of the conditionally uninitialized uses (the other became dead). I have XFAILed the missing diagnostic, I don't see a way to preserve that. 2021-10-22 Richard Biener <rguenther@suse.de> PR bootstrap/102681 * tree-ssa-sccvn.c (vn_phi_insert): For undefined SSA args record VN_TOP. (vn_phi_lookup): Likewise. * gcc.dg/tree-ssa/ssa-fre-97.c: New testcase. * gcc.dg/ubsan/pr81981.c: XFAIL one case.
2021-10-22Daily bump.GCC Administrator8-1/+343
2021-10-21libstdc++: Improve generated man pages for libstdc++Jonathan Wakely2-106/+207
The man pages generated by Doxygen show internal header files, not the standard headers that users actually care about. The run_doxygen script uses the doc/doxygen/stdheader.cc program to address that, but it doesn't work. It only tries to fix headers with underscores in the names, which doesn't work for <bits/align.h> or <bits/fsteam.tcc>. It isn't prepared for the strings like "bits/stl_set\&.h" that are produced by Doxygen. It doesn't know about many headers that have been added since it was written. And the run_doxygen script fails to use its output correctly to modify the man pages. Additionally, run_doxygen doesn't know about new nested namespaces like std::filesystem and std::ranges. This change rewrites the stdheader.cc program to do a better job of finding the right header. The run_doxygen script now uses the just-built compiler to build stdheader.cc and actually uses its output. And the script now knows about other nested namespaces. The stdheader.cc program might be unnecessary if we consistently used @headername tags in the Doxygen comments, but we don't (and probably never will). A problem that remains after this change is that all the free function defined in namespace std get dumped into a single man page for std(3), without detailed descriptions. We don't even install that std(3) page, but remove it before installation. That means only classes are documented in man pages (including many internal ones that should not be publicly documented such as _Deque_base and _Tuple_impl). libstdc++-v3/ChangeLog: * doc/doxygen/stdheader.cc: Refactor. Use C++23. Add new headers. * scripts/run_doxygen: Fix post-processing of #include directives in man pages. Use new xg++ to compile helper program.
2021-10-21libstdc++: Add Doxygen comments to contents of <functional>Jonathan Wakely2-12/+119
libstdc++-v3/ChangeLog: * include/bits/mofunc_impl.h: Add doxygen comments. * include/std/functional: Likewise.
2021-10-21libstdc++: Suppress Doxygen docs for more implementation detailsJonathan Wakely8-1/+41
libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h: Suppress doxygen documentation. * include/bits/allocated_ptr.h: Likewise. * include/bits/enable_special_members.h: Likewise. * include/bits/hashtable.h: Likewise. * include/bits/hashtable_policy.h: Likewise. * include/bits/uses_allocator.h: Likewise. * include/bits/node_handle.h: Document node handles and suppress documentation for protected members. * include/std/any: Suppress documentation for implementation details.
2021-10-21libcody: Avoid double-freeJonathan Wakely1-0/+1
If the listen call fails then 'goto fail' will jump to that label and use freeaddrinfo again. Set the pointer to null to prevent that. libcody/ChangeLog: * netserver.cc (ListenInet6): Set pointer to null after deallocation.
2021-10-21x86: Document -fcf-protection requires i686 or newerH.J. Lu1-1/+2
PR target/98667 * doc/invoke.texi: Document -fcf-protection requires i686 or new.
2021-10-21testsuite: Adjust pr22076.c to avoid compile-time optimization [PR102840]Uros Bizjak1-3/+3
2021-10-21 Uroš Bizjak <ubizjak@gmail.com> PR testsuite/102840 gcc/testsuite/ChangeLog: * gcc.target/i386/pr22076.c: Adjust to avoid compile time optimization.
2021-10-21libstdc++: missing constexpr for __[nm]iter_base [PR102358]Patrick Palka2-0/+21
PR libstdc++/102358 libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (__niter_base): Make constexpr for C++20. (__miter_base): Likewise. * testsuite/25_algorithms/move/constexpr.cc: New test.
2021-10-21Fix again PR middle-end/102764Eric Botcazou1-1/+4
gcc/ PR middle-end/102764 * cfgexpand.c (expand_gimple_basic_block): Robustify latest change.
2021-10-21libstdc++: Implement P2432R1 changes for views::istreamPatrick Palka2-4/+34
libstdc++-v3/ChangeLog: * include/std/ranges (istream_view): Replace this function template with an alias template as per P2432R1. (wistream_view): Define as per P2432R1. (views::_Istream, views::istream): Likewise. * testsuite/std/ranges/istream_view.cc (test07): New test.
2021-10-21libstdc++: Implement P1739R4 changes to views::take/drop/countedPatrick Palka4-21/+193
This implements P1739R4 along with the resolution for LWG 3407 which corrects the paper's wording. libstdc++-v3/ChangeLog: * include/bits/ranges_util.h (views::_Drop): Forward declare. (subrange): Befriend views::_Drop. (subrange::_S_store_size): Declare constexpr instead of just const, remove obsolete comment. * include/std/ranges (views::__detail::__is_empty_view): Define. (views::__detail::__is_basic_string_view): Likewise. (views::__detail::__is_subrange): Likewise. (views::__detail::__is_iota_view): Likewise. (views::__detail::__can_take_view): Rename template parm _Tp to _Dp. (views::_Take): Rename template parm _Tp to _Dp, make it non-deducible and fix it to range_difference_t<_Range>. Implement P1739R4 and LWG 3407 changes. (views::__detail::__can_drop_view): Rename template parm _Tp to _Dp. (views::_Drop): As with views::_Take. (views::_Counted): Implement P1739R4 changes. * include/std/span (__detail::__is_std_span): Rename to ... (__detail::__is_span): ... this and turn it into a variable template. (__detail::__is_std_array): Turn it into a variable template. (span::span): Adjust uses of __is_std_span and __is_std_array accordingly. * testsuite/std/ranges/adaptors/p1739.cc: New test.
2021-10-21aarch64: Remove redundant struct type definitions in arm_neon.hJonathan Wright1-86/+0
These vector type definitions are an artifact from the initial commit that added the AArch64 port. gcc/ChangeLog: 2021-10-15 Jonathan Wright <jonathan.wright@arm.com> * config/aarch64/arm_neon.h (__STRUCTN): Delete function macro and all invocations.
2021-10-21Adjust testcase for 128/256 bit HF vector load/storeHongyu Wang1-4/+4
The HF vector move have been updated to align with HI vector, adjust according testcase for _Float16 vector load and store. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-13.c: Adjust scan-assembler for xmm/ymm load/store.
2021-10-21Split --param=evrp-mode into evrp-mode and ranger-debug.Andrew MacLeod7-37/+56
With Ranger being used in more than EVRP, the debug output should no longer be tied up with the EVRP mode flag. * doc/invoke.texi (ranger-debug): Document. * flag-types.h (enum ranger_debug): New. (enum evrp_mode): Remove debug values. * gimple-range-cache.cc (DEBUG_RANGE_CACHE): Use new debug flag. * gimple-range-gori.cc (gori_compute::gori_compute): Ditto. * gimple-range.cc (gimple_ranger::gimple_ranger): Ditto. * gimple-ssa-evrp.c (hybrid_folder::choose_value): Ditto. (execute_early_vrp): Use evrp-mode directly. * params.opt (enum evrp_mode): Remove debug values. (ranger-debug): New. (ranger-logical-depth): Relocate to be in alphabetical order.
2021-10-21Add --param=vrp1-mode and --param=vrp2-mode.Andrew MacLeod4-2/+40
Add 2 new params to select between VRP and RANGER to be used for each pass. * doc/invoke.texi: (vrp1-mode, vrp2-mode): Document. * flag-types.h: (enum vrp_mode): New. * params.opt: (vrp1-mode, vrp2-mode): New. * tree-vrp.c (vrp_pass_num): New. (pass_vrp::pass_vrp): Set pass number. (pass_vrp::execute): Choose which VRP mode to execute.
2021-10-21Move ranger only VRP folder to tree-vrp.Andrew MacLeod3-88/+128
Consolidate the RVRP folder into a single "execute_vrp" routine that mimics the format used by the vrp1 and vrp2 passes. Relocate into the tree-vrp file. * gimple-ssa-evrp.c (class rvrp_folder): Move to tree-vrp.c. (execute_early_vrp): For ranger only mode, invoke ranger_vrp. * tree-vrp.c (class rvrp_folder): Relocate here. (execute_ranger_vrp): New. * tree-vrp.h (execute_ranger_vrp): Export.
2021-10-21options: Fix variable tracking option processing.Martin Liska4-47/+53
PR debug/102585 PR bootstrap/102766 gcc/ChangeLog: * opts.c (finish_options): Process flag_var_tracking* options here as they can be adjusted by optimize attribute. Process also flag_syntax_only and flag_gtoggle. * toplev.c (process_options): Remove it here. * common.opt: Make debug_nonbind_markers_p as PerFunction attribute as it depends on optimization level. gcc/testsuite/ChangeLog: * gcc.dg/pr102585.c: New test.
2021-10-21sra: Fix corner case of total scalarization with virtual inheritance (PR 102505)Martin Jambor2-0/+17
PR 102505 is a situation where of SRA takes its initial top-level access size from a get_ref_base_and_extent called on a COMPONENT_REF, and thus derived frm the FIELD_DECL, which however does not include a virtual base. Total scalarization then goes on traversing the type, which however has virtual base past the non-virtual bits, tricking SRA to create sub-accesses outside of the supposedly encompassing accesses, which in turn triggers the verifier within the pass. The patch below fixes that by failing total scalarization when this situation is detected. gcc/ChangeLog: 2021-10-20 Martin Jambor <mjambor@suse.cz> PR tree-optimization/102505 * tree-sra.c (totally_scalarize_subtree): Check that the encountered field fits within the acces we would like to put it in. gcc/testsuite/ChangeLog: 2021-10-20 Martin Jambor <mjambor@suse.cz> PR tree-optimization/102505 * g++.dg/torture/pr102505.C: New test.
2021-10-21Revert the avoid threading circular paths commit.Aldy Hernandez1-4/+0
I've tested this patch on the wrong tree, and picked up the test changes in a pending patch, without which this patch is no longer obvious. Plus, it causes a regression in an invalid test I've recommended we remove. I'm reverting this patch until the dependencies are reviewed. Sorry for the noise. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Remove circular paths check.
2021-10-21Move the initial debug_hooks settingRichard Biener1-3/+3
I just realized that when I moved the langhook call I failed to move the initial debug_hooks setting whose comment mentions the langhook as reason. 2021-10-21 Richard Biener <rguenther@suse.de> * toplev.c (process_options): Move the initial debug_hooks setting ... (toplev::main): ... before the call of the post_options langhook.
2021-10-21tree-optimization/102847 - adjust VMAT_INVARIANT load costingRichard Biener1-0/+3
This adds the missing scalar load cost in the prologue. 2021-10-21 Richard Biener <rguenther@suse.de> PR tree-optimization/102847 * tree-vect-stmts.c (vect_model_load_cost): Add the scalar load cost in the prologue for VMAT_INVARIANT.
2021-10-21tree-optimization/102847 - properly cost VMAT_INVARIANT loadsRichard Biener1-0/+7
The following adds proper costing of VMAT_INVARIANT loads, avoiding to ask the target about the cost of an unsupported vector load cost which we won't emit anyway. 2021-10-21 Richard Biener <rguenther@suse.de> PR tree-optimization/102847 * tree-vect-stmts.c (vect_model_load_cost): Explicitely handle VMAT_INVARIANT as a splat in the prologue.
2021-10-21testsuite: Fix up gfortran.dg/gomp/strictly*.f90 testcasesJakub Jelinek3-30/+30
While these testcases are dg-do compile only, I think it is better not to give users bad examples and avoid unnecessary data races in testcases (unless it is exactly what we want to test). Perhaps one day we'll do some analysis and warn about data races... 2021-10-21 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/strictly-structured-block-1.f90: Use call do_work instead of x = x + 1 in places where the latter could be a data race. * gfortran.dg/gomp/strictly-structured-block-2.f90: Likewise. * gfortran.dg/gomp/strictly-structured-block-3.f90: Likewise.
2021-10-21i386: Fix wrong codegen for V8HF move without TARGET_AVX512FHongyu Wang2-3/+24
Since _Float16 type is enabled under sse2 target, returning V8HFmode vector without AVX512F target would generate wrong vmovdqa64 instruction. Adjust ix86_get_ssemov to avoid this. gcc/ChangeLog: PR target/102812 * config/i386/i386.c (ix86_get_ssemov): Adjust HFmode vector move to use the same logic as HImode. gcc/testsuite/ChangeLog: PR target/102812 * gcc.target/i386/pr102812.c: New test.
2021-10-21Remove restriction of SLP vectorizing internal function callsRichard Biener1-1/+0
We already checked for unsupported internal throwing calls, general nothrow is not required. 2021-10-21 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_build_slp_tree_1): Remove superfluous gimple_call_nothrow_p check.
2021-10-21openmp: For default(none) ignore variables created by ubsan_create_data ↵Jakub Jelinek2-6/+64
[PR64888] We weren't ignoring the ubsan variables created by c-ubsan.c before gimplification (others are added later). One way to fix this would be to introduce further UBSAN_ internal functions and lower it later (sanopt pass) like other ifns, this patch instead recognizes those magic vars by name/name of type and DECL_ARTIFICIAL and TYPE_ARTIFICIAL. 2021-10-21 Jakub Jelinek <jakub@redhat.com> PR middle-end/64888 gcc/c-family/ * c-omp.c (c_omp_predefined_variable): Return true also for ubsan_create_data created artificial variables. gcc/testsuite/ * c-c++-common/ubsan/pr64888.c: New test.
2021-10-21Improve maybe_remove_writeonly_store to do a simple DCE for defining statementAndrew Pinski2-6/+17
Instead of putting a full blow DCE after execute_fixup_cfg, it makes sense to try to remove the defining statement for the store that is being removed. Using simple_dce_from_worklist makes this easier, just mark the ssa_name on the rhs side of the store (if it was one) in a bitmap and then call simple_dce_from_worklist at the end. gcc.dg/pr36902.c needed to be changed such that the static array was no longer a static array but a global array. This is because this new dce will remove the load as it is dead. I also filed PR 102864 for the warning on dead loads. gcc/ChangeLog: * tree-cfg.c (maybe_remove_writeonly_store): Add dce_ssa_names argument. Mark the ssa-name of the rhs as one to be removed. (execute_fixup_cfg): Update call to maybe_remove_writeonly_store. Call simple_dce_from_worklist at the end to a simple dce. gcc/testsuite/ChangeLog: * gcc.dg/pr36902.c: Move buf to be a non-static variable.
2021-10-21Factor out removal of write only stores from execute_fixup_cfgAndrew Pinski1-25/+37
To make it easier to fix PR 102703, factoring this code out to its own function makes it easier to read and less indentions too. gcc/ChangeLog: * tree-cfg.c (maybe_remove_writeonly_store): New function factored out from ... (execute_fixup_cfg): Here. Call maybe_remove_writeonly_store.
2021-10-21Remove outdated comment about execute_fixup_cfgAndrew Pinski1-4/+1
The comment about execute_fixup_cfg not being able to run as a standalone pass is not true for a long time now. It has been a standalone pass for a while now. gcc/ChangeLog: * tree-cfg.c (execute_fixup_cfg): Remove comment about standalone pass.
2021-10-21Add dump prints when execute_fixup_cfg removes a write only var store.Andrew Pinski1-0/+7
While debugging PR 102703, I found it was hard to figure out where the store was being removed as there was no pass which was outputting why the store was removed. This adds to execute_fixup_cfg the output. Also note most of removals happen when execute_fixup_cfg is called from the inliner. gcc/ChangeLog: * tree-cfg.c (execute_fixup_cfg): Output when the statement is removed when it is a write only var.
2021-10-21Avoid threading circular paths.Aldy Hernandez1-0/+4
The backward threader keeps a hash of visited blocks to avoid crossing the same block twice. Interestingly, we haven't been checking it for the final block out of the path. This may be inherited from the old code, as it was simple enough that it didn't matter. With the upcoming changes enabling the fully resolving threader, it gets tripped often enough to cause wrong code to be generated. Tested on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Avoid threading circular paths.
2021-10-21testsuite/102861 - adjust gcc.dg/vect/bb-slp-16.c changeRichard Biener1-41/+32
This reverts the bogus previous change causing runtime failures and instead realizes that we now have the loop condition if-converted and the BB vectorization opportunity realized during the loop vectorization pass. 2021-10-21 Richard Biener <rguenther@suse.de> PR testsuite/102861 * gcc.dg/vect/bb-slp-16.c: Revert previous change, scan the vect dump instead.
2021-10-21openmp: Fortran strictly-structured blocks supportChung-Lin Tang11-25/+484
This implements strictly-structured blocks support for Fortran, as specified in OpenMP 5.2. This now allows using a Fortran BLOCK construct as the body of most OpenMP constructs, with a "!$omp end ..." ending directive optional for that form. gcc/fortran/ChangeLog: * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case together with COMP_BLOCK. * parse.c (parse_omp_structured_block): Change return type to 'gfc_statement', add handling for strictly-structured block case, adjust recursive calls to parse_omp_structured_block. (parse_executable): Adjust calls to parse_omp_structured_block. * parse.h (enum gfc_compile_state): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK. * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case handling. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/cancel-1.f90: Adjust testcase. * gfortran.dg/gomp/nesting-3.f90: Adjust testcase. * gfortran.dg/gomp/strictly-structured-block-1.f90: New test. * gfortran.dg/gomp/strictly-structured-block-2.f90: New test. * gfortran.dg/gomp/strictly-structured-block-3.f90: New test. libgomp/ChangeLog: * libgomp.texi (Support of strictly structured blocks in Fortran): Adjust to 'Y'. * testsuite/libgomp.fortran/task-reduction-16.f90: Adjust testcase.
2021-10-20Fortran: Fixes and additional tests for shape/ubound/size [PR94070]Sandra Loosemore9-178/+755
This patch reimplements the SHAPE intrinsic to be inlined similarly to LBOUND and UBOUND, instead of as a library call, to avoid an unnecessary array copy. Various bugs are also fixed. gcc/fortran/ PR fortran/94070 * expr.c (gfc_simplify_expr): Handle GFC_ISYM_SHAPE along with GFC_ISYM_LBOUND and GFC_ISYM_UBOUND. * trans-array.c (gfc_conv_ss_startstride): Likewise. (set_loop_bounds): Likewise. * trans-intrinsic.c (gfc_trans_intrinsic_bound): Extend to handle SHAPE. Correct logic for zero-size special cases and detecting assumed-rank arrays associated with an assumed-size argument. (gfc_conv_intrinsic_shape): Deleted. (gfc_conv_intrinsic_function): Handle GFC_ISYM_SHAPE like GFC_ISYM_LBOUND and GFC_ISYM_UBOUND. (gfc_add_intrinsic_ss_code): Likewise. (gfc_walk_intrinsic_bound): Likewise. gcc/testsuite/ PR fortran/94070 * gfortran.dg/c-interop/shape-bindc.f90: New test. * gfortran.dg/c-interop/shape-poly.f90: New test. * gfortran.dg/c-interop/size-bindc.f90: New test. * gfortran.dg/c-interop/size-poly.f90: New test. * gfortran.dg/c-interop/ubound-bindc.f90: New test. * gfortran.dg/c-interop/ubound-poly.f90: New test.
2021-10-20libstdc++: Implement LWG 3595 changes to common_iteratorPatrick Palka1-2/+4
libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (common_iterator::__arrow_proxy): Make fully constexpr as per LWG 3595. (common_iterator::__postfix_proxy): Likewise.
2021-10-20libstdc++: Implement LWG 3590-3592 changes to split_view/lazy_split_viewPatrick Palka1-6/+10
libstdc++-v3/ChangeLog: * include/std/ranges (lazy_split_view::base): Add forward_range constraint as per LWG 3591. (lazy_split_view::begin, lazy_split_view::end): Also check simpleness of _Pattern as per LWG 3592. (split_view::base): Relax copyable constraint as per LWG 3590.