aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-03ranger: Fix `-Werror' build error with `ranger_cache::push_poor_value'Maciej W. Rozycki1-1/+1
Remove a commit 86534c07a390 ("Disable poor value processing in ranger cache.") regression that caused GCC not to build anymore if `-Werror' has been enabled: .../gcc/gimple-range-cache.cc: In member function 'bool ranger_cache::push_poor_value(basic_block, tree)': .../gcc/gimple-range-cache.cc:850:44: error: unused parameter 'bb' [-Werror=unused-parameter] 850 | ranger_cache::push_poor_value (basic_block bb, tree name) | ~~~~~~~~~~~~^~ .../gcc/gimple-range-cache.cc:850:53: error: unused parameter 'name' [-Werror=unused-parameter] 850 | ranger_cache::push_poor_value (basic_block bb, tree name) | ~~~~~^~~~ To keep the change to the minimum mark the parameters reported unused. gcc/ * gimple-range-cache.cc (ranger_cache::push_poor_value): Mark parameters unused.
2021-11-03[PR102842] Consider all outputs in generation of matching reloadsVladimir N. Makarov2-12/+35
Without considering all output insn operands (not only processed before), in rare cases LRA can use the same hard register for different outputs of the insn on different assignment subpasses. The patch fixes the problem. gcc/ChangeLog: PR rtl-optimization/102842 * lra-constraints.c (match_reload): Ignore out in checking values of outs. (curr_insn_transform): Collect outputs before doing reloads of operands. gcc/testsuite/ChangeLog: PR rtl-optimization/102842 * g++.target/arm/pr102842.C: New test.
2021-11-03ipa/102714 - IPA SRA eliding volatileRichard Biener2-18/+139
The following fixes the volatileness check of IPA SRA which was looking at the innermost reference when checking TREE_THIS_VOLATILE but the reference to check is the outermost one. 2021-10-13 Richard Biener <rguenther@suse.de> PR ipa/102714 * ipa-sra.c (ptr_parm_has_nonarg_uses): Fix volatileness check. * gcc.dg/ipa/pr102714.c: New testcase. (cherry picked from commit 23cd18c60c8188e3d68eda721cdb739199e85e5b)
2021-11-03Daily bump.GCC Administrator1-1/+1
2021-11-02Merge remote-tracking branch 'origin/releases/gcc-11' into devel/omp/gcc-11Tobias Burnus18-91/+246
Merged up to r11-9199-gfdc2700d09530227a520e8d33623b7956582cffb (Nov 2, 2021)
2021-11-02openmp: Add testcase for threadprivate random access class iteratorsTobias Burnus2-0/+135
This adds a testcase for random access class iterators. The diagnostics can be different between templates and non-templates, as for some threadprivate vars finish_id_expression replaces them with call to their corresponding wrapper, but I think it is not that big deal, we reject it in either case. 2021-11-02 Jakub Jelinek <jakub@redhat.com> * g++.dg/gomp/loop-8.C: New test. (cherry picked from commit fb7fee84813b23487baf0c1094860251229ab5dd)
2021-11-02openmp: Diagnose threadprivate OpenMP loop iteratorsTobias Burnus4-0/+67
We weren't diagnosing the The loop iteration variable may not appear in a threadprivate directive. restriction which used to be in 5.0 just among the Worksharing-Loop restrictions but in 5.1 it is among Canonical Loop Nest Form restrictions. This patch diagnoses those. 2021-10-30 Jakub Jelinek <jakub@redhat.com> * gimplify.c (gimplify_omp_for): Diagnose threadprivate iterators. * c-c++-common/gomp/loop-10.c: New test. (cherry picked from commit 6f449bb93b33d63fa8a1b8d021d8d36f27ffe054)
2021-11-02Daily bump.GCC Administrator2-1/+14
2021-11-01libstdc++: Fix range access for empty std::valarray [PR103022]Jonathan Wakely4-16/+100
The std::begin and std::end overloads for std::valarray are defined in terms of std::addressof(v[0]) which is undefined for an empty valarray. libstdc++-v3/ChangeLog: PR libstdc++/103022 * include/std/valarray (begin, end): Do not dereference an empty valarray. Add noexcept and [[nodiscard]]. * testsuite/26_numerics/valarray/range_access.cc: Check empty valarray. Check iterator properties. Run as well as compiling. * testsuite/26_numerics/valarray/range_access2.cc: Likewise. * testsuite/26_numerics/valarray/103022.cc: New test. (cherry picked from commit 91bac9fed5d082f0b180834110ebc0f46f97599a)
2021-11-01Daily bump.GCC Administrator1-1/+1
2021-10-31Daily bump.GCC Administrator1-1/+1
2021-10-30Daily bump.GCC Administrator1-1/+1
2021-10-29Daily bump.GCC Administrator2-1/+5
2021-10-28Update documentation of %X specEric Botcazou1-2/+1
%X Output the accumulated linker options specified by -Wl or a ‘%x’ spec string The part about -Wl has been obsolete for 27 years, since this change: Author: Torbjorn Granlund <tege@gnu.org> Date: Thu Oct 27 18:04:25 1994 +0000 (process_command): Handle -Wl, and -Xlinker similar to -l, i.e., preserve their order with respect to linker input files. Technically speaking, the arguments of -l, -Wl and -Xlinker are input files. gcc/ * doc/invoke.texi (%X): Remove obsolete reference to -Wl.
2021-10-28Daily bump.GCC Administrator5-1/+47
2021-10-27Fortran: do not restrict PDT KIND and LEN type parameters to default integerHarald Anlauf2-18/+2
gcc/fortran/ChangeLog: PR fortran/102917 * decl.c (match_attr_spec): Remove invalid integer kind checks on KIND and LEN attributes of PDTs. gcc/testsuite/ChangeLog: PR fortran/102917 * gfortran.dg/pdt_4.f03: Adjust testcase. (cherry picked from commit cfcb27cfcb1d32b8cf7bc463cc1fc5cacae8d199)
2021-10-27Fix warnings building linux-atomic.c and fptr.c on hppa64-linuxJohn David Anglin3-54/+62
The file fptr.c is specific to 32-bit hppa-linux and should not be included in LIB2ADD on hppa64-linux. There is a builtin type mismatch in linux-atomic.c using the type long long unsigned int for 64-bit atomic operations on hppa64-linux. 2021-10-27 John David Anglin <danglin@gcc.gnu.org> libgcc/ChangeLog: * config.host (hppa*64*-*-linux*): Don't add pa/t-linux to tmake_file. * config/pa/linux-atomic.c: Define u8, u16 and u64 types. Use them in FETCH_AND_OP_2, OP_AND_FETCH_2, COMPARE_AND_SWAP_2, SYNC_LOCK_TEST_AND_SET_2 and SYNC_LOCK_RELEASE_1 macros. * config/pa/t-linux64 (LIB1ASMSRC): New define. (LIB1ASMFUNCS): Revise. (HOST_LIBGCC2_CFLAGS): Add "-DLINUX=1".
2021-10-27sra: 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. This backport also has commit f217e87972a2a207e793101fc05cfc9dd095c678 squashed into it in order to avoid PR 102886 that the fix introduced on trunk. 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. (cherry picked from commit 701ee067807b80957c65bd7ff94b6099a27181de)
2021-10-27Merge remote-tracking branch 'origin/releases/gcc-11' into devel/omp/gcc-11Tobias Burnus22-65/+250
Merge up to r11-9188-g2563fba71d0b67cb69b2cd2da649a50a70f2a02f (Oct 27, 2021)
2021-10-27Fortran: Fix 'select rank' for allocatables/pointersTobias Burnus4-1/+21
gcc/fortran/ChangeLog: * trans-stmt.c (gfc_trans_select_rank_cases): Fix condition for allocatables/pointers. gcc/testsuite/ChangeLog: * gfortran.dg/PR93963.f90: Extend testcase by scan-tree-dump test. (cherry picked from commit 7f899b23f36f94f907a025d3eeaf3e4640544927)
2021-10-27openmp: Document that non-rect loops are not supported in Fortran yetJakub Jelinek2-1/+9
I've found we claim to support non-rectangular loops, but don't actually support those in Fortran, as can be seen on: integer i, j !$omp parallel do collapse(2) do i = 0, 10 do j = 0, i end do end do end To support this, the Fortran FE needs to allow the valid forms of non-rectangular loops and disallow others, so mainly it needs its updated version of c-omp.c c_omp_check_loop_iv etc., plus for non-rectangular lb or ub expressions emit a TREE_VEC instead of normal expression as the C/C++ FE do, plus testsuite coverage. 2021-10-27 Jakub Jelinek <jakub@redhat.com> * libgomp.texi (OpenMP 5.0): Mention that Non-rectangular loop nests aren't implemented for Fortran yet. (cherry picked from commit eef811490646a68c9893968a421b351e7bf704e1)
2021-10-27openmp: Allow non-rectangular loops with pointer iteratorsJakub Jelinek10-46/+597
This patch handles pointer iterators for non-rectangular loops. They are more limited than integral iterators of non-rectangular loops, in particular only var-outer, var-outer + a2, a2 + var-outer or var-outer - a2 can appear in lb or ub where a2 is some integral loop invariant expression, so no e.g. multiplication etc. 2021-10-27 Jakub Jelinek <jakub@redhat.com> gcc/ * omp-expand.c (expand_omp_for_init_counts): Handle non-rectangular iterators with pointer types. (expand_omp_for_init_vars, extract_omp_for_update_vars): Likewise. gcc/c-family/ * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for POINTER_PLUS_EXPR. (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR. (c_omp_check_loop_iv): Set kind even if the iterator is non-integral. gcc/testsuite/ * c-c++-common/gomp/loop-8.c: New test. * c-c++-common/gomp/loop-9.c: New test. libgomp/ * testsuite/libgomp.c/loop-26.c: New test. * testsuite/libgomp.c/loop-27.c: New test. (cherry picked from commit 2084b5f42a4432da8b0625f9c669bf690ec46468)
2021-10-27openmp: Don't reject some valid initializers or conditions of ↵Jakub Jelinek8-14/+83
non-rectangular loops [PR102854] In C++, if an iterator has or might have (e.g. dependent type) class type we remember the original init expressions and check those separately for presence of iterators, because for class iterators we turn those into expressions that always do contain reference to the current iterator. But this resulted in rejecting valid non-rectangular loop where the dependent type is later instantiated to an integral type. Non-rectangular loops with class random access iterators remain broken, that is something to be fixed incrementally. 2021-10-27 Jakub Jelinek <jakub@redhat.com> PR c++/102854 gcc/c-family/ * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument. * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls, TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or conversions temporarily clear the 3rd bit from d->kind while walking subtrees. (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind if possibly non-rectangular. gcc/cp/ * semantics.c (handle_omp_for_class_iterator, finish_omp_for): Adjust c_omp_check_loop_iv_exprs caller. gcc/testsuite/ * g++.dg/gomp/loop-3.C: Don't expect some errors. * g++.dg/gomp/loop-7.C: New test. (cherry picked from commit 6b0f35299bd1468ebc13b900a73b7cac6181a2aa)
2021-10-27Daily bump.GCC Administrator2-1/+10
2021-10-26gcc/configure: Check for powerpc64le*-*-freebsd*Piotr Kubaj2-2/+2
Only powerpc64-unknown-freebsd was checked for. Signed-off-by: Piotr Kubaj <pkubaj@FreeBSD.org> gcc/ * configure.ac: Treat powerpc64*-*-freebsd* the same as powerpc64-*-freebsd*. * configure: Regenerate. (cherry picked from commit a9ef07fe5899fc5998395cdbf96e00af372cfb0b)
2021-10-26Fortran: Fix character(len=cst) dummies with bind(C) [PR102885]Tobias Burnus4-0/+73
PR fortran/102885 gcc/fortran/ChangeLog: * trans-decl.c (gfc_conv_cfi_to_gfc): Properly handle nonconstant character lenghts. gcc/testsuite/ChangeLog: * gfortran.dg/lto/bind-c-char_0.f90: New test. (cherry picked from commit a31a3d0421f0cf1f7eefacfec8cbf37e7f91600d)
2021-10-26Daily bump.GCC Administrator1-1/+1
2021-10-25Daily bump.GCC Administrator2-1/+21
2021-10-24Revise -mdisable-fpregs option and add new -msoft-mult optionJohn David Anglin5-20/+23
The behavior of the -mdisable-fpregs is confusing in that it doesn't disable the use of the floating-point registers in all situations. The -msoft-float disables the use of the floating-point registers in all situations. The Linux kernel only needs to disable use of the xmpyu instruction to avoid using the floating-point registers. This change revises the -mdisable-fpregs option to disable the use of the floating-point registers in all situations. It is now equivalent to the -msoft-float option. A new -msoft-mult option is added to disable use of the xmpyu instruction. The libgcc library can be compiled with the -msoft-mult option to avoid using hardware integer multiplication. 2021-10-24 John David Anglin <danglin@gcc.gnu.org> gcc/ChangeLog: * config/pa/pa-d.c (pa_d_handle_target_float_abi): Don't check TARGET_DISABLE_FPREGS. * config/pa/pa.c (fix_range): Use MASK_SOFT_FLOAT instead of MASK_DISABLE_FPREGS. (hppa_rtx_costs): Don't check TARGET_DISABLE_FPREGS. Adjust cost of hardware integer multiplication. (pa_conditional_register_usage): Don't check TARGET_DISABLE_FPREGS. * config/pa/pa.h (INT14_OK_STRICT): Likewise. * config/pa/pa.md: Don't check TARGET_DISABLE_FPREGS. Check TARGET_SOFT_FLOAT in patterns that use xmpyu instruction. * config/pa/pa.opt (mdisable-fpregs): Change target mask to SOFT_FLOAT. Revise comment. (msoft-float): New option.
2021-10-24Don't use 'G' constraint in integer move patternsJohn David Anglin1-16/+16
The 'G' constraint only matches a float zero. 2021-10-24 John David Anglin <danglin@gcc.gnu.org> gcc/ChangeLog: * config/pa/pa.md: Don't use 'G' constraint in integer move patterns.
2021-10-24Daily bump.GCC Administrator1-1/+1
2021-10-23Daily bump.GCC Administrator1-1/+1
2021-10-22Daily bump.GCC Administrator2-1/+10
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. (cherry picked from commit 1373066a46d8d47abd97e46a005aef3b3dbfe94a)
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. (cherry picked from commit e633f82fb71817f3232688869c1eb59f60eb78ca)
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. (cherry picked from commit 2e4659199e814b7ee0f6bd925fd2c0a7610da856)
2021-10-21testsuite/libgomp.oacc-fortran/: Add -Wopenacc-parallelismTobias Burnus4-1/+10
The following testcases expect the -Wopenacc-parallelism warning output but did fail as not compiled with that warning; solution: add it. * testsuite/libgomp.oacc-fortran/declare-allocatable-1.f90: Compile with -Wopenacc-parallelism. * testsuite/libgomp.oacc-fortran/declare-allocatable-3.f90: Likewise. * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Likewise.
2021-10-21Fortran: Fixes and additional tests for shape/ubound/size [PR94070]Tobias Burnus11-178/+788
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. (cherry picked from commit 1af78e731feb9327a17c99ebaa19a4cca1125caf)
2021-10-21Daily bump.GCC Administrator4-1/+29
2021-10-20openmp: in_reduction support for FortranChung-Lin Tang4-28/+102
This patch implements support for the in_reduction clause for Fortran. It also includes more completion of the taskgroup construct inside the Fortran front-end, thus allowing task_reduction to work for task and target constructs. gcc/fortran/ChangeLog: * openmp.c (gfc_match_omp_clause_reduction): Add 'openmp_target' default false parameter. Add 'always,tofrom' map for OMP_LIST_IN_REDUCTION case. (gfc_match_omp_clauses): Add 'openmp_target' default false parameter, adjust call to gfc_match_omp_clause_reduction. (match_omp): Adjust call to gfc_match_omp_clauses * trans-openmp.c (gfc_trans_omp_taskgroup): Add call to gfc_match_omp_clause, create and return block. gcc/ChangeLog: * omp-low.c (omp_copy_decl_2): For !ctx, use record_vars to add new copy as local variable. (scan_sharing_clauses): Place copy of OMP_CLAUSE_IN_REDUCTION decl in ctx->outer instead of ctx. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/reduction4.f90: Adjust omp target in_reduction' scan pattern. libgomp/ChangeLog: * testsuite/libgomp.fortran/target-in-reduction-1.f90: New test. * testsuite/libgomp.fortran/target-in-reduction-2.f90: New test. (cherry picked from commit d98626bf451dea6a28a42d953f7d0bd7659ad4d5) (This merges the review comments, taken care of in the mainline commit, referenced above. For OG11, the heavy lifting was already done in commit 07a380a8a024fbcc61c0098400da9a382b9a7010 )
2021-10-20Avoid exception propagation during bootstrapArnaud Charlet1-5/+69
This addresses PR ada/100486, which is the bootstrap failure of GCC 11 for 32-bit Windows in the MSYS setup. The PR shows that we cannot rely on exception propagation being operational during the bootstrap, at least on the 11 branch, so fix this by removing the problematic raise statement. gcc/ada/ PR ada/100486 * sem_prag.adb (Check_Valid_Library_Unit_Pragma): Do not raise an exception as part of the bootstrap.
2021-10-20openmp: Fix up struct gomp_work_share handling [PR102838]Tobias Burnus3-0/+56
If GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is not defined, the intent was to treat the split of the structure between first cacheline (64 bytes) as mostly write-once, use afterwards and second cacheline as rw just as an optimization. But as has been reported, with vectorization enabled at -O2 it can now result in aligned vector 16-byte or larger stores. When not having posix_memalign/aligned_alloc/memalign or other similar API, alloc.c emulates it but it needs to allocate extra memory for the dynamic realignment. So, for the GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC not defined case, this patch stops using aligned (64) attribute in the middle of the structure and instead inserts padding that puts the second half of the structure at offset 64 bytes. And when GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined, usually it was allocated as aligned, but for the orphaned case it could still be allocated just with gomp_malloc without guaranteed proper alignment. 2021-10-20 Jakub Jelinek <jakub@redhat.com> PR libgomp/102838 * libgomp.h (struct gomp_work_share_1st_cacheline): New type. (struct gomp_work_share): Only use aligned(64) attribute if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined, otherwise just add padding before lock to ensure lock is at offset 64 bytes into the structure. (gomp_workshare_struct_check1, gomp_workshare_struct_check2): New poor man's static assertions. * work.c (gomp_work_share_start): Use gomp_aligned_alloc instead of gomp_malloc if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC. (cherry picked from commit c7abdf46fb7ac9a0c37f120feff3fcc3a752584f)
2021-10-20gfortran.dg/bind-c-contiguous-5.c: Big-endian fixTobias Burnus2-0/+110
gcc/testsuite/ PR fortran/102815 * gfortran.dg/bind-c-contiguous-5.c (do_call, reset_var): Handle big andian. (cherry picked from commit d4044db034b40c275b5f287d5854a102d22e07c0)
2021-10-20c++: Fix up push_local_extern_decl_alias error recovery [PR102642]Jakub Jelinek4-4/+19
My recent push_local_extern_decl_alias change broke error-recovery, do_pushdecl can return error_mark_node and set_decl_tls_model can't be called on that. There are other code paths that store error_mark_node into DECL_LOCAL_DECL_ALIAS, with the intent to differentiate the cases where we haven't yet tried to push it into the namespace scope (NULL) and one where we have tried it but it failed (error_mark_node), but looking around, there are other spots where we call functions or do processing which doesn't tolerate error_mark_node. So, the first hunk with the testcase fixes the testcase, the others fix what I've spotted and the fix was easy to figure out (there are I think 3 other spots mainly for function multiversioning). 2021-10-20 Jakub Jelinek <jakub@redhat.com> PR c++/102642 * name-lookup.c (push_local_extern_decl_alias): Don't call set_decl_tls_model on error_mark_node. * decl.c (make_rtl_for_nonlocal_decl): Don't call set_user_assembler_name on error_mark_node. * parser.c (cp_parser_oacc_declare): Ignore DECL_LOCAL_DECL_ALIAS if it is error_mark_node. (cp_parser_omp_declare_target): Likewise. * g++.dg/tls/pr102642.C: New test. (cherry picked from commit 424945258d1778617b5d3d5273f6e1c10e718f80)
2021-10-20Daily bump.GCC Administrator4-1/+29
2021-10-19libstdc++: Fix doxygen generation to work with relative pathsJonathan Wakely2-16/+24
In r12-826 I tried to remove some redundant steps from the doxygen build, but they are needed when configure is run as a relative path. The use of pwd is to resolve the relative path to an absolute one. libstdc++-v3/ChangeLog: * doc/Makefile.am (stamp-html-doxygen, stamp-html-doxygen) (stamp-latex-doxygen, stamp-man-doxygen): Fix recipes for relative ${top_srcdir}. * doc/Makefile.in: Regenerate. (cherry picked from commit 04d392e8430ca66a3f12b7db4f3cb84788269a48)
2021-10-19Fortran: Fix "str" to scalar descriptor conversion [PR92482]Tobias Burnus4-20/+56
PR fortran/92482 gcc/fortran/ChangeLog: * trans-expr.c (gfc_conv_procedure_call): Use TREE_OPERAND not build_fold_indirect_ref_loc to undo an ADDR_EXPR. gcc/testsuite/ChangeLog: * gfortran.dg/bind-c-char-descr.f90: Remove xfail; extend a bit. (cherry picked from commit 6920d5a1a2834e9c62d441b8f4c6186b01107d13)
2021-10-19Merge remote-tracking branch 'origin/releases/gcc-11' into devel/omp/gcc-11Tobias Burnus3-8/+92
Merge up to r11-9173-g3de82c6c36fea8fad7145b62ccb3a7c06d1f3c51 (Oct 19, 2021)
2021-10-19Fortran: Fix CLASS conversion check [PR102745]Tobias Burnus3-8/+92
PR fortran/102745 gcc/fortran/ChangeLog * intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS and do typcheck in correct order for type extension. * misc.c (gfc_typename): Print proper not internal CLASS type name. gcc/testsuite/ChangeLog * gfortran.dg/class_72.f90: New. (cherry picked from commit 017665f63047ce47b087b0b283548a60e5abf3d2)
2021-10-19Merge remote-tracking branch 'origin/releases/gcc-11' into devel/omp/gcc-11Tobias Burnus8-8/+231
Merge up to r11-9172-g164044da342dc5f21132b2a782115f3fd70c29c5 (Oct 19, 2021).