aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-27ada: Fix internal error on declare-expression in post-conditionEric Botcazou1-5/+7
It comes from an incorrect node sharing in the expanded tree. gcc/ada/ * sem_ch3.adb (Find_Type_Of_Object): Copy the object definition when building the subtype declaration in the case of a spec expression.
2023-09-27ada: Rework fix for internal error on quantified expression with predicated typeEric Botcazou3-35/+21
It turns out that skipping compiler-generated block scopes is problematic when computing the public status of a subprogram, because this subprogram may end up being nested in the elaboration procedure of a package spec or body, in which case it may not be public. This replaces the original fix with a pair of Push_Scope/Pop_Scope in the Build_Predicate_Function procedure, as done elsewhere in similar cases. gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): If the current scope is not that of the type, push this scope and pop it at the end. * sem_util.ads (Current_Scope_No_Loops_No_Blocks): Delete. * sem_util.adb (Current_Scope_No_Loops_No_Blocks): Likewise. (Set_Public_Status): Call again Current_Scope.
2023-09-27ada: Fix internal error on quantified expression with predicated typeEric Botcazou3-14/+40
The problem is that the special function created by the compiler to check the predicate does not inherit the public status of the type, because it is generated as part of the freezing of the quantified expression, which occurs from within a couple of intermediate internal scopes. gcc/ada/ * sem_ch13.adb (Build_Predicate_Function_Declaration): Adjust the commentary to the current implementation. * sem_util.ads (Current_Scope_No_Loops): Move around. (Current_Scope_No_Loops_No_Blocks): New declaration. (Add_Block_Identifier): Fix formatting. * sem_util.adb (Add_Block_Identifier): Likewise. (Current_Scope_No_Loops_No_Blocks): New function. (Set_Public_Status): Call Current_Scope_No_Loops_No_Blocks instead of Current_Scope to get the current scope.
2023-09-27ada: Fix bogus error on predicated limited record declared in protected typeEric Botcazou2-22/+10
This happens when the limited record is initialized with a function call because of a couple of issues: incorrect tree sharing when building the predicate check and too late freezing for a compiler-generated subtype. It turns out that building the predicate check manually is redundant here, since predicate checks are automatically generated during the expansion of assignment statements, and the late freezing can be easily fixed. gcc/ada/ * exp_ch3.adb (Build_Record_Init_Proc.Build_Assignment): Do not manually generate a predicate check. Call Unqualify before doing pattern matching on the expression. * sem_ch3.adb (Analyze_Object_Declaration): Also freeze the actual subtype when it is built in the definite case.
2023-09-27ada: Small code cleanupEric Botcazou1-13/+8
This just merges two conditional blocks depending on the same condition. gcc/ada/ * frontend.adb (Frontend): Merge two conditional blocks and adjust.
2023-09-27ada: Use idiomatic construct in Expand_N_Package_BodyEric Botcazou1-10/+1
gcc/ada/ * exp_ch7.adb (Expand_N_Package_Body): Call Defining_Entity to get the entity of the body.
2023-09-27ada: Fix spurious freezing error on nonabstract null extensionEric Botcazou1-3/+5
This prevents the wrapper function created for each nonoverridden inherited function with a controlling result of nonabstract null extensions of tagged types from causing premature freezing of types referenced in its profile. gcc/ada/ * exp_ch3.adb (Make_Controlling_Function_Wrappers): Create the body as the expanded body of an expression function.
2023-09-27ada: Fix crash on Ada.Containers with No_Dispatching_Calls restrictionEric Botcazou1-1/+5
This makes it so that the compiler does not crash and flags the underlying violation of the restriction instead. gcc/ada/ * exp_ch3.adb (Freeze_Type): Do not associate the Finalize_Address routine for a class-wide type if restriction No_Dispatching_Calls is in effect.
2023-09-27ada: Fix error and crash on imported function with precondition and 'BaseEric Botcazou1-3/+4
This fixes a spurious error on an imported function with a precondition and a parameter declared with a 'Base formal type, and even a crash in the case where this function is declared in a generic package. gcc/ada/ * freeze.adb (Wrap_Imported_Subprogram): Use Copy_Subprogram_Spec to copy the spec from the subprogram to the generated subprogram body. (Freeze_Entity): Do not wrap imported subprograms inside generics.
2023-09-27ada: Fix double finalization in conditional exit statementEric Botcazou1-2/+5
The temporary is first finalized through its enclosing block. gcc/ada/ * exp_ch4.adb (Expand_N_Expression_With_Actions.Process_Action): Do not look into nested blocks.
2023-09-27ada: Fix handling of constrained array declarations in declare-expressionEric Botcazou1-2/+2
They need to go through Constrain_Array or else they do not really work. gcc/ada/ * sem_ch3.adb (Find_Type_Of_Object): In a spec expression, also set the Scope of the type, and call Constrain_Array for array subtypes.
2023-09-27ada: Use accumulator type in expansion of 'Reduce attributeEric Botcazou1-10/+62
The current expansion of the 'Reduce attribute uses the resolution type of the expression for the accumulator. Now this type can be unresolved or set to a universal type, for example if it is itself the prefix of the 'Image attribute, and this may yield a spurious type mismatch error in that case. This changes the expansion to use the accumulator type instead as defined by the RM 4.5.10 clause, albeit only in the prefixed case for now. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Reduce>: Use the canonical accumulator type as the type of the accumulator in the prefixed case.
2023-09-27ada: Fix crash on iterated component in expression functionEric Botcazou1-6/+8
The problem is that the freeze node generated for the type of a static subexpression present in the expression function is incorrectly placed inside instead of outside the function. gcc/ada/ * freeze.adb (Freeze_Expression): When the freezing is to be done outside the current scope, skip any scope that is an internal loop.
2023-09-27ada: Fix internal error on 'Image applied to array componentEric Botcazou1-2/+21
This happens because the array component depends on a discriminant. gcc/ada/ * exp_imgv.adb (Rewrite_Object_Image): If the prefix is a component that depends on a discriminant, create an actual subtype for it.
2023-09-27ada: Fix internal error on chain of predicated record typesEric Botcazou1-6/+21
The preanalysis of a predicate set on one of the record types was causing premature freezing of another record type. gcc/ada/ * sem_ch13.adb: Add with and use clauses for Expander. (Resolve_Aspect_Expressions) <Aspect_Predicate>: Emulate a bona-fide preanalysis setup before calling Resolve_Aspect_Expression.
2023-09-27ada: Implement inheritance of user-defined literal aspects for untagged typesEric Botcazou3-8/+38
In Ada 2022, user-defined literal aspects are nonoverridable but the named subprograms present in them can be overridden, including for untagged types. gcc/ada/ * sem_res.adb (Has_Applicable_User_Defined_Literal): Apply the same processing for derived untagged types as for tagged types. * sem_util.ads (Corresponding_Primitive_Op): Adjust description. * sem_util.adb (Corresponding_Primitive_Op): Handle untagged types.
2023-09-27ada: Fix internal error on instance in package body with -gnatnEric Botcazou1-0/+4
This plugs a small loophole in the procedure responsible for attempting to hide entities that have been previously made public by the semantic analyzer in package bodies. gcc/ada/ * sem_ch7.adb (Hide_Public_Entities): Use the same condition for subprogram bodies without specification as for those with one.
2023-09-27ada: Fix invalid JSON for extended variant record with -gnatRjEric Botcazou2-9/+52
This fixes the output of -gnatRj for an extension of a tagged type which has a variant part and also deals with the case where the parent type is private with unknown discriminants. gcc/ada/ * repinfo.ads (JSON output format): Document special case of Present member of a Variant object. * repinfo.adb (List_Structural_Record_Layout): Change the type of Ext_Level parameter to Integer. Restrict the first recursion with increasing levels to the fixed part and implement a second recursion with decreasing levels for the variant part. Deal with an extension of a type with unknown discriminants.
2023-09-26libstdc++: Prevent unwanted ADL in std::to_array [PR111512]Jonathan Wakely2-2/+27
Qualify the calls to the __to_array helper to prevent ADL, so we don't try to complete associated classes. libstdc++-v3/ChangeLog: PR libstdc++/111511 PR c++/111512 * include/std/array (to_array): Qualify calls to __to_array. * testsuite/23_containers/array/creation/111512.cc: New test. (cherry picked from commit 77cf3773021b0a20d89623e09d620747a05588ec)
2023-09-26Add missing return in gori_compute::logical_combineEric Botcazou4-0/+33
The varying case currently falls through to the 1/true case. gcc/ * gimple-range-gori.cc (gori_compute::logical_combine): Add missing return statement in the varying case. gcc/testsuite/ * gnat.dg/opt102.adb:New test. * gnat.dg/opt102_pkg.adb, gnat.dg/opt102_pkg.ads: New helper.
2023-09-26PR modula2/111510 runtime ICE findChildAndParent has caused internal runtime ↵Gaius Mulley3-19/+23
error This patch fixes the runtime bug above. The full runtime message is: findChildAndParent has caused internal runtime error, RTentity is either corrupt or the module storage has not been initialized yet. The bug is due to a non nul terminated string determining the module initialization order. This results in modules being uninitialized and the above crash. The bug manifests itself on 32 bit systems - but obviously is latent on all targets and the fix should be applied to both gcc-14 and gcc-13. gcc/m2/ChangeLog: PR modula2/111510 * gm2-compiler/M2GenGCC.mod (IsExportedGcc): Minor spacing changes. (BuildTrashTreeFromInterface): Minor spacing changes. * gm2-compiler/M2Options.mod (GetRuntimeModuleOverride): Call string to generate a nul terminated C style string. * gm2-compiler/M2Quads.mod (BuildStringAdrParam): New procedure. (BuildM2InitFunction): Replace inline parameter generation with calls to BuildStringAdrParam. (cherry picked from commit 53daf67fd55e005e37cb3ab33ac0783a71761de9) Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
2023-09-26Reduce the initial size of int_range_max.Andrew MacLeod3-30/+83
This patch adds the ability to resize ranges as needed, defaulting to no resizing. int_range_max now defaults to 3 sub-ranges (instead of 255) and grows to 255 when the range being calculated does not fit. PR tree-optimization/110315 * value-range-storage.h (vrange_allocator::alloc_irange): Adjust new params. * value-range.cc (irange::operator=): Resize range. (irange::irange_union): Same. (irange::irange_intersect): Same. (irange::invert): Same. * value-range.h (irange::maybe_resize): New. (~int_range): New. (int_range_max): Default to 3 sub-ranges and resize as needed. (int_range::int_range): Adjust for resizing. (int_range::operator=): Same.
2023-09-26ada: Fix deferred constant wrongly rejectedEric Botcazou1-2/+4
This recent regression occurs when the nominal subtype of the constant is a discriminated record type with default discriminants. gcc/ada/ PR ada/110488 * sem_ch3.adb (Analyze_Object_Declaration): Do not build a default subtype for a deferred constant in the definite case too.
2023-09-26Daily bump.GCC Administrator1-1/+1
2023-09-25Daily bump.GCC Administrator4-1/+78
2023-09-24c++: missing SFINAE in grok_array_decl [PR111493]Patrick Palka2-3/+37
We should guard both the diagnostic and backward compatibilty fallback code with tf_error, so that in a SFINAE context we don't issue any diagnostics and correctly treat ill-formed C++23 multidimensional subscript operator expressions as such. PR c++/111493 gcc/cp/ChangeLog: * decl2.cc (grok_array_decl): Guard diagnostic and backward compatibility fallback code paths with tf_error. gcc/testsuite/ChangeLog: * g++.dg/cpp23/subscript15.C: New test. (cherry picked from commit 1fea14def849dd38b098b0e2d54e64801f9c1f43)
2023-09-24c++: constraint rewriting during ttp coercion [PR111485]Patrick Palka3-2/+44
In order to compare the constraints of a ttp with that of its argument, we rewrite the ttp's constraints in terms of the argument template's template parameters. The substitution to achieve this currently uses a single level of template arguments, but that never does the right thing because a ttp's template parameters always have level >= 2. This patch fixes this by including the outer template arguments in the substitution, which ought to match the depth of the ttp. The second testcase demonstrates it's better to substitute the concrete outer template arguments instead of generic ones since a ttp's constraints could depend on outer parameters. PR c++/111485 gcc/cp/ChangeLog: * pt.cc (is_compatible_template_arg): New parameter 'args'. Add the outer template arguments 'args' to 'new_args'. (convert_template_argument): Pass 'args' to is_compatible_template_arg. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-ttp5.C: New test. * g++.dg/cpp2a/concepts-ttp6.C: New test. (cherry picked from commit 6f902a42b0afe3f3145bcb864695fc290b5acc3e)
2023-09-24c++: constness of decltype of NTTP object [PR99631]Patrick Palka2-0/+26
This corrects resolving decltype of a (class) NTTP object as per [dcl.type.decltype]/1.2 and [temp.param]/6 in the type-dependent case. Note that in the non-dependent case we resolve the decltype ahead of time, in which case finish_decltype_type drops the const VIEW_CONVERT_EXPR wrapper around the TEMPLATE_PARM_INDEX, and the latter has the desired non-const type. In the type-dependent case, at instantiation time tsubst drops the VIEW_CONVERT_EXPR since the substituted NTTP is the already-const object created by get_template_parm_object. So in this case finish_decltype_type sees the const object, which this patch now adds special handling for. PR c++/99631 gcc/cp/ChangeLog: * semantics.cc (finish_decltype_type): For an NTTP object, return its type modulo cv-quals. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/nontype-class60.C: New test. (cherry picked from commit ddd064e3571c4a9e6258c75eba65585a07367712)
2023-09-24Fortran: Supply a missing dereference [PR92586]Paul Thomas2-1/+63
2023-09-24 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/92586 * trans-expr.cc (gfc_trans_arrayfunc_assign): Supply a missing dereference for the call to gfc_deallocate_alloc_comp_no_caf. gcc/testsuite/ PR fortran/92586 * gfortran.dg/pr92586.f90 : New test
2023-09-24Fortran: Pad mismatched charlens in component initializers [PR68155]Paul Thomas2-34/+79
2023-09-24 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/68155 * decl.cc (fix_initializer_charlen): New function broken out of add_init_expr_to_sym. (add_init_expr_to_sym, build_struct): Call the new function. gcc/testsuite/ PR fortran/68155 * gfortran.dg/pr68155.f90: New test.
2023-09-24Daily bump.GCC Administrator1-1/+1
2023-09-23Daily bump.GCC Administrator3-1/+23
2023-09-22c++: improve class NTTP object pretty printing [PR111471]Patrick Palka2-2/+37
1. Move class NTTP object pretty printing to a more general spot in the pretty printer, so that we always print its value instead of its (mangled) name even when it appears outside of a template argument list. 2. Print the type of an class NTTP object alongside its CONSTRUCTOR value, like dump_expr would have done. 3. Don't print const VIEW_CONVERT_EXPR wrappers for class NTTPs. PR c++/111471 gcc/cp/ChangeLog: * cxx-pretty-print.cc (cxx_pretty_printer::expression) <case VAR_DECL>: Handle class NTTP objects by printing their type and value. <case VIEW_CONVERT_EXPR>: Strip const VIEW_CONVERT_EXPR wrappers for class NTTPs. (pp_cxx_template_argument_list): Don't handle class NTTP objects here. gcc/testsuite/ChangeLog: * g++.dg/concepts/diagnostic19.C: New test. (cherry picked from commit 75c4b0cde4835b45350da0a5cd82f1d1a0a7a2f1)
2023-09-22Daily bump.GCC Administrator1-1/+1
2023-09-21Daily bump.GCC Administrator3-1/+27
2023-09-20OpenMP: Add ME support for 'omp allocate' stack variablesTobias Burnus16-35/+785
Call GOMP_alloc/free for 'omp allocate' allocated variables. This is for C only as C++ and Fortran show a sorry already in the FE. Note that this only applies to stack variables as the C FE shows a sorry for static variables. gcc/ChangeLog: * gimplify.cc (gimplify_bind_expr): Call GOMP_alloc/free for 'omp allocate' variables; move stack cleanup after other cleanup. (omp_notice_variable): Process original decl when decl of the value-expression for a 'omp allocate' variable is passed. * omp-low.cc (scan_omp_1_op): Handle 'omp allocate' variables libgomp/ChangeLog: * libgomp.texi (OpenMP 5.1 Impl.): Mark 'omp allocate' as implemented for C only. * testsuite/libgomp.c/allocate-4.c: New test. * testsuite/libgomp.c/allocate-5.c: New test. * testsuite/libgomp.c/allocate-6.c: New test. gcc/testsuite/ChangeLog: * c-c++-common/gomp/allocate-11.c: Remove C-only dg-message for 'sorry, unimplemented'. * c-c++-common/gomp/allocate-12.c: Likewise. * c-c++-common/gomp/allocate-15.c: Likewise. * c-c++-common/gomp/allocate-9.c: Likewise. * c-c++-common/gomp/allocate-10.c: New test. * c-c++-common/gomp/allocate-17.c: New test. (cherry picked from commit 1a554a2c9f33fdb3c170f1c37274037ece050114)
2023-09-20[og13] OpenMP: Support accelerated 2D/3D memory copies for AMD GCNJulian Brown3-0/+400
This patch adds support for 2D/3D memory copies for omp_target_memcpy_rect and "target update", using AMD extensions to the HSA API. This follows Tobias's similar patch for NVPTX (already present on mainline and higher up this patch series for og13). Support is also added for 1-dimensional strided accesses: these are treated as a special case of 2-dimensional transfers, where the innermost dimension is formed from the stride length (in bytes). 2023-09-19 Julian Brown <julian@codesourcery.com> libgomp/ * plugin/plugin-gcn.c (hsa_runtime_fn_info): Add hsa_amd_memory_lock_fn, hsa_amd_memory_unlock_fn, hsa_amd_memory_async_copy_rect_fn function pointers. (init_hsa_runtime_functions): Add above functions, with DLSYM_OPT_FN. (GOMP_OFFLOAD_memcpy2d, GOMP_OFFLOAD_memcpy3d): New functions. * target.c (omp_target_memcpy_rect_worker): Add 1D strided transfer support.
2023-09-20[og13] OpenMP, NVPTX: memcpy[23]D bias correctionJulian Brown2-0/+73
This patch works around behaviour of the 2D and 3D memcpy operations in the CUDA driver runtime. Particularly in Fortran, the "base pointer" of an array (used for either source or destination of a host/device copy) may lie outside of data that is actually stored on the device. The fix is to make sure that we use the first element of data to be transferred instead, and adjust parameters accordingly. This is a merge of the patch previously posted for mainline to the og13 branch. 2023-09-19 Julian Brown <julian@codesourcery.com> libgomp/ * plugin/plugin-nvptx.c (GOMP_OFFLOAD_memcpy2d): Adjust parameters to avoid out-of-bounds array checks in CUDA runtime. (GOMP_OFFLOAD_memcpy3d): Likewise.
2023-09-20[og13] OpenMP: Call cuMemcpy2D/cuMemcpy3D for nvptx for omp_target_memcpy_rectTobias Burnus13-25/+911
This is a version of Tobias's mainline patch of the same name, merged to og13 and with the followup patch "libgomp: cuda.h and omp_target_memcpy_rect cleanup" folded in. A couple of merge conflicts have also been resolved, mostly regarding "gomp_update". Tobias's original log message follows. When copying a 2D or 3D rectangular memmory block, the performance is better when using CUDA's cuMemcpy2D/cuMemcpy3D instead of copying the data one by one. That's what this commit does. Additionally, it permits device-to-device copies, if necessary using a temporary variable on the host. 2023-09-19 Tobias Burnus <tobias@codesourcery.com> Julian Brown <julian@codesourcery.com> include/ * cuda/cuda.h (CUlimit): Add CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_INVALID_HANDLE. (CUarray, CUmemorytype, CUDA_MEMCPY2D, CUDA_MEMCPY3D, CUDA_MEMCPY3D_PEER): New typdefs. (cuMemcpyPeer, cuMemcpyPeerAsync, cuMemcpy2D, cuMemcpy2DAsync, cuMemcpy2DUnaligned, cuMemcpy3D, cuMemcpy3DAsync, cuMemcpy3DPeer, cuMemcpy3DPeerAsync): New prototypes. libgomp/ * libgomp-plugin.h (GOMP_OFFLOAD_memcpy2d, GOMP_OFFLOAD_memcpy3d): New prototypes. * libgomp.h (struct gomp_device_descr): Add memcpy2d_func and memcpy3d_func. * libgomp.texi (nvptx): Document when cuMemcpy2D/cuMemcpy3D is used. * oacc-host.c (memcpy2d_func, .memcpy3d_func): Init with NULL. * plugin/cuda-lib.def (cuMemcpy2D, cuMemcpy2DUnaligned, cuMemcpy3D): Invoke via CUDA_ONE_CALL. * plugin/plugin-nvptx.c (GOMP_OFFLOAD_memcpy2d, GOMP_OFFLOAD_memcpy3d): New. * target.c (omp_target_memcpy_rect_worker): Update prototype. (omp_target_memcpy_rect_check, omp_target_memcpy_rect_copy): Permit all device-to-device copies; invoke new plugins for 2D and 3D copying when available. (gomp_update): Update calls to omp_target_memcpy_rect_worker. Ensure that tmp space is not allocated here. (gomp_load_plugin_for_device): DLSYM the new plugin functions. * testsuite/libgomp.c/target-12.c: Fix dimension bug. * testsuite/libgomp.fortran/target-12.f90: Likewise. * testsuite/libgomp.fortran/target-memcpy-rect-1.f90: New test.
2023-09-20aarch64: Fix loose ldpstp check [PR111411]Richard Sandiford2-5/+60
aarch64_operands_ok_for_ldpstp contained the code: /* One of the memory accesses must be a mempair operand. If it is not the first one, they need to be swapped by the peephole. */ if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1)) && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2))) return false; But the requirement isn't just that one of the accesses must be a valid mempair operand. It's that the lower access must be, since that's the access that will be used for the instruction operand. gcc/ PR target/111411 * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp): Require the lower memory access to a mem-pair operand. gcc/testsuite/ PR target/111411 * gcc.dg/rtl/aarch64/pr111411.c: New test. (cherry picked from commit 2d38f45bcca62ca0c7afef4b579f82c5c2a01610)
2023-09-20aarch64: Fix return register handling in untyped_callRichard Sandiford1-1/+19
While working on another patch, I hit a problem with the aarch64 expansion of untyped_call. The expander emits the usual: (set (mem ...) (reg resN)) instructions to store the result registers to memory, but it didn't say in RTL where those resN results came from. This eventually led to a failure of gcc.dg/torture/stackalign/builtin-return-2.c, via regrename. This patch turns the untyped call from a plain call to a call_value, to represent that the call returns (or might return) a useful value. The patch also uses a PARALLEL return rtx to represent all the possible return registers. gcc/ * config/aarch64/aarch64.md (untyped_call): Emit a call_value rather than a call. List each possible destination register in the call pattern. (cherry picked from commit 629efe27744d13c3b83bbe8338b84c37c83dbe4f)
2023-09-20Daily bump.GCC Administrator1-1/+1
2023-09-19OpenMP: Fix ICE in fixup_blocks_walker [PR111274]Sandra Loosemore2-1/+19
This ICE was caused by an invalid assumption that all BIND_EXPRs have a non-null BIND_EXPR_BLOCK. In C++ these do exist and are used for temporaries introduced in expressions that are not full-expressions. Since they have no block to fix up, the traversal can just ignore these tree nodes. gcc/cp/ChangeLog PR c++/111274 * parser.cc (fixup_blocks_walker): Check for null BIND_EXPR_BLOCK. gcc/testsuite/ChangeLog PR c++/111274 * g++.dg/gomp/pr111274.C: New test case. (cherry picked from commit ab4bdad49716eb1c60e22e0e617d5eb56b0bac6f)
2023-09-19OpenMP: Avoid ICE in c_parser_omp_clause_allocate with invalid exprTobias Burnus4-1/+46
gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_clause_allocate): Handle error_mark_node. gcc/testsuite/ChangeLog: * c-c++-common/gomp/allocate-13.c: New test. (cherry picked from commit 55243898f8f9560371f258fe0c6ca202ab7b2085)
2023-09-19OpenMP: Handle 'all' as category in defaultmapTobias Burnus20-13/+390
Both, specifying no category and specifying 'all', implies that the implicit-behavior applies to all categories. gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_clause_defaultmap): Parse 'all' as category. gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_clause_defaultmap): Parse 'all' as category. gcc/fortran/ChangeLog: * gfortran.h (enum gfc_omp_defaultmap_category): Add OMP_DEFAULTMAP_CAT_ALL. * openmp.cc (gfc_match_omp_clauses): Parse 'all' as category. * trans-openmp.cc (gfc_trans_omp_clauses): Handle it. gcc/ChangeLog: * tree-core.h (enum omp_clause_defaultmap_kind): Add OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL. * gimplify.cc (gimplify_scan_omp_clauses): Handle it. * tree-pretty-print.cc (dump_omp_clause): Likewise. libgomp/ChangeLog: * libgomp.texi (OpenMP 5.2 status): Add depobj with destroy-var argument as 'N'. Mark defaultmap with 'all' category as 'Y'. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/defaultmap-1.f90: Update dg-error. * c-c++-common/gomp/defaultmap-5.c: New test. * c-c++-common/gomp/defaultmap-6.c: New test. * gfortran.dg/gomp/defaultmap-10.f90: New test. * gfortran.dg/gomp/defaultmap-9.f90: New test. (cherry picked from commit 0698c9fddfc5a41dd7f233928b7a486cb044fea3)
2023-09-19Daily bump.GCC Administrator4-1/+44
2023-09-18libstdc++: Update C++20 and C++23 status docsJonathan Wakely5-66/+721
libstdc++-v3/ChangeLog: * doc/xml/manual/configure.xml: Use conventional option name. * doc/xml/manual/status_cxx2020.xml: Update. * doc/xml/manual/status_cxx2023.xml: Update. * doc/html/*: Regenerate. (cherry picked from commit c8e9a75085f9725c5b5f32a27867c106fed3b5fb)
2023-09-18Merge branch 'releases/gcc-13' into devel/omp/gcc-13Tobias Burnus83-843/+2061
Merge up to r13-7822-g10c7edcc65d4bf1d05a9f0791e77e7b953e3e796 (18th Sep 2023)
2023-09-18RISC-V: Remove phase 6 of vsetvl pass in GCC13[PR111412]xuli21-190/+80
vsetvl pass has been refactored in gcc14, and the optimization is more reasonable than releases/gcc-13. This problem does not exist in gcc14. Phase 6 of gcc13 is an optimization patch. Due to lack of consideration, there will be some hidden bugs, so we decided to remove phase 6. Although the generated code will be redundant, the program is correct. PR target/111412 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (vector_infos_manager::release): Remove. (pass_vsetvl::refine_vsetvls): Ditto. (pass_vsetvl::cleanup_vsetvls): Ditto. (pass_vsetvl::propagate_avl): Ditto. (pass_vsetvl::lazy_vsetvl): Ditto. * config/riscv/riscv-vsetvl.h: Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/avl_single-79.c: Adjust case. * gcc.target/riscv/rvv/vsetvl/avl_single-80.c: Ditto. * gcc.target/riscv/rvv/vsetvl/avl_single-86.c: Ditto. * gcc.target/riscv/rvv/vsetvl/avl_single-87.c: Ditto. * gcc.target/riscv/rvv/vsetvl/avl_single-88.c: Ditto. * gcc.target/riscv/rvv/vsetvl/avl_single-89.c: Ditto. * gcc.target/riscv/rvv/vsetvl/avl_single-90.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-25.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vlmax_back_prop-26.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vlmax_switch_vtype-14.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vlmax_switch_vtype-15.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvl-1.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvl-5.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvl-6.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvl-7.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvl-8.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvlmax-2.c: Ditto. * gcc.target/riscv/rvv/vsetvl/vsetvlmax-4.c: Ditto. * gcc.target/riscv/rvv/base/pr111412.c: New test.
2023-09-18Daily bump.GCC Administrator1-1/+1