aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-08-25LoongArch: Fix pr106459 by use HWIT instead of 1UL.Chenghua Xu3-9/+25
gcc/ChangeLog: PR target/106459 * config/loongarch/loongarch.cc (loongarch_build_integer): Use HOST_WIDE_INT. * config/loongarch/loongarch.h (IMM_REACH): Likewise. (HWIT_1U): New Defined. (LU12I_OPERAND): Use HOST_WIDE_INT. (LU32I_OPERAND): Likewise. (LU52I_OPERAND): Likewise. (HWIT_UC_0xFFF): Likwise. gcc/testsuite/ChangeLog: * gcc.target/loongarch/pr106459.c: New test. (cherry picked from commit b169b67d7dafe2b786f87c31d6b2efc603fd880c)
2022-08-25Daily bump.GCC Administrator4-1/+47
2022-08-24libstdc++: Fix visit<void>(v) for non-void visitors [PR106589]Jonathan Wakely2-1/+14
The optimization for the common case of std::visit forgot to handle the edge case of passing zero variants to a non-void visitor and converting the result to void. libstdc++-v3/ChangeLog: PR libstdc++/106589 * include/std/variant (__do_visit): Handle is_void<R> for zero argument case. * testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v). (cherry picked from commit e85bb1881e57e53306ede2a15f30d06480d69886)
2022-08-23vect: Don't allow vect_emulated_vector_p type in vectorizable_call [PR106322]Kewen Lin3-0/+109
As PR106322 shows, in some cases for some vector type whose TYPE_MODE is a scalar integral mode instead of a vector mode, it's possible to obtain wrong target support information when querying with the scalar integral mode. For example, for the test case in PR106322, on ppc64 32bit vectorizer gets vector type "vector(2) short unsigned int" for scalar type "short unsigned int", its mode is SImode instead of V2HImode. The target support querying checks umul_highpart optab with SImode and considers it's supported, then vectorizer further generates .MULH IFN call for that vector type. Unfortunately it's wrong to use SImode support for that vector type multiply highpart here. This patch is to teach vectorizable_call analysis not to allow vect_emulated_vector_p type for both vectype_in and vectype_out as Richi suggested. PR tree-optimization/106322 gcc/ChangeLog: * tree-vect-stmts.cc (vectorizable_call): Don't allow vect_emulated_vector_p type for both vectype_in and vectype_out. gcc/testsuite/ChangeLog: * gcc.target/i386/pr106322.c: New test. * gcc.target/powerpc/pr106322.c: New test. (cherry picked from commit 5239e2bd48fb1e6a1d1b06a1bac49bee0a742e98)
2022-08-23rs6000: Adjust mov optabs for opaque modes [PR103353]Kewen.Lin2-6/+55
As PR103353 shows, we may want to continue to expand built-in function __builtin_vsx_lxvp, even if we have already emitted error messages about some missing required conditions. As shown in that PR, without one explicit mov optab on OOmode provided, it would call emit_move_insn recursively. So this patch is to allow the mov pattern to be generated during expanding phase if compiler has already seen errors. PR target/103353 gcc/ChangeLog: * config/rs6000/mma.md (define_expand movoo): Move TARGET_MMA condition check to preparation statements and add handlings for !TARGET_MMA. (define_expand movxo): Likewise. gcc/testsuite/ChangeLog: * gcc.target/powerpc/pr103353.c: New test. (cherry picked from commit 9367e3a65f874dffc8f8a3b6760e77fd9ed67117)
2022-08-24Daily bump.GCC Administrator7-1/+58
2022-08-23libstdc++: Document linker option for C++23 <stacktrace> [PR105678]Jonathan Wakely4-7/+35
libstdc++-v3/ChangeLog: PR libstdc++/105678 * doc/xml/manual/using.xml: Document -lstdc++_libbacktrace requirement for using std::stacktrace. Also adjust -frtti and -fexceptions to document non-default (i.e. negative) forms. * doc/html/*: Regenerate. (cherry picked from commit cc4fa7a210b638d6a46f14dab17f2361389d18e1)
2022-08-23Update gcc .po filesJoseph Myers19-74616/+74925
* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po, ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po, zh_TW.po: Update.
2022-08-23Merge branch 'releases/gcc-12' into devel/omp/gcc-12Tobias Burnus3-1/+257
Merge up to r12-8705-g4218d3abfde1aa3dadfdacb55893f08489e8a064 (23th Aug 2022)
2022-08-23gfortran.dg/gomp/depend-4.f90: minor fix + dump updateTobias Burnus2-37/+43
Contains the minor fix of upstream commit r13-2151-g6b2a584ed5bed1b851ee7b4668ac705f20cbb2c4 to avoid setting the same array element twice. Additionally, it updates the expected tree dumps due to differences between GCC 12/OG12 and mainline (GCC13); the latter seems to use a restricted pointer of type '&a[1]' while OG12 has pointerplus expressions like 'a + 4'. The changes include -m32/-m64 handling for the depobj var and in two cases, the expected count increases from 1 to 2 for code like 'D.\[0-9\]+ = daa'. gcc/testsuite/ * gfortran.dg/gomp/depend-4.f90: Update expected tree dumps.
2022-08-23Fortran: OpenMP fix declare simd inside modules and absent linear step ↵Tobias Burnus6-3/+160
[PR106566] gcc/fortran/ChangeLog: PR fortran/106566 * openmp.cc (gfc_match_omp_clauses): Fix setting linear-step value to 1 when not specified. (gfc_match_omp_declare_simd): Accept module procedures. gcc/testsuite/ChangeLog: PR fortran/106566 * gfortran.dg/gomp/declare-simd-4.f90: New test. * gfortran.dg/gomp/declare-simd-5.f90: New test. * gfortran.dg/gomp/declare-simd-6.f90: New test. (cherry picked from commit 1513512ec7d0751cba30c9c8804f2be462acfb9b)
2022-08-23gcn/mkoffload: Cleanup temporary dbgobj fileTobias Burnus1-0/+1
The file (suffix ".mkoffload.dbg.o") used to save the dbgobj data data has to be passed to maybe_unlink for cleanup or -v -save-temps stderr diagnostic. That was missed before. This is a partial backport of commit r13-2125, "mkoffload: Cleanup temporary omp_requires_file", only for GCN's mkoffload and its dbgobj file as 'omp requires' is not supported on GCC 12 and, hence, omp_requires_file does not exist on this branch. gcc/ChangeLog: * config/gcn/mkoffload.cc (main): Add dbgobj to files_to_cleanup. (cherry picked from commit 713ec97e593bd4d9915a13bc4047f064fec0e24a)
2022-08-23Fortran: OpenMP fix declare simd inside modules and absent linear step ↵Tobias Burnus2-2/+48
[PR106566] Partial backport from commit r13-2093, only, as 'OpenMP 5.2 linear clause syntax' is not on GCC 12. gcc/fortran/ChangeLog: PR fortran/106566 * openmp.cc (gfc_match_omp_declare_simd): Accept module procedures. gcc/testsuite/ChangeLog: PR fortran/106566 * gfortran.dg/gomp/declare-simd-6.f90: New test. (cherry picked from commit 1513512ec7d0751cba30c9c8804f2be462acfb9b)
2022-08-23OpenMP: Fix var replacement with 'simd' and linear-step vars [PR106548]Tobias Burnus2-0/+256
gcc/ChangeLog: PR middle-end/106548 * omp-low.cc (lower_rec_input_clauses): Use build_outer_var_ref for 'simd' linear-step values that are variable. libgomp/ChangeLog: PR middle-end/106548 * testsuite/libgomp.c/linear-2.c: New test. (cherry picked from commit d9c9424d2c4f7b25acfc00db0076a65882c8a99f)
2022-08-23Daily bump.GCC Administrator1-1/+1
2022-08-22lto-wrapper.cc: Delete offload_names temp files in case of error [PR106686]Tobias Burnus2-30/+49
Usually, the caller takes care of the .o files for the offload compilers (suffix: ".target.o"). However, if an error occurs during processing (e.g. fatal error by lto1), they were not deleted. gcc/ChangeLog: PR lto/106686 * lto-wrapper.cc (free_array_of_ptrs): Move before tool_cleanup. (tool_cleanup): Unlink offload_names. (compile_offload_image): Take filename argument to set it early. (compile_images_for_offload_targets): Update call; set offload_names to NULL after freeing the array. (cherry picked from commit e228683b244c6afbe3bdfef7ba607fbda813bd0f)
2022-08-22Daily bump.GCC Administrator1-1/+1
2022-08-21Daily bump.GCC Administrator1-1/+1
2022-08-20Daily bump.GCC Administrator1-1/+1
2022-08-19mkoffload: Cleanup temporary omp_requires_fileTobias Burnus4-1/+19
The file (suffix ".mkoffload.omp_requires") used to save the 'omp requires' data has to be passed to maybe_unlink for cleanup or -v -save-temps stderr diagnostic. That was missed before. - For GCN, the same has to be done for the files with suffix ".mkoffload.dbg.o". gcc/ChangeLog: * config/gcn/mkoffload.cc (main): Add omp_requires_file and dbgobj to files_to_cleanup. * config/i386/intelmic-mkoffload.cc (prepare_target_image): Add omp_requires_file to temp_files. * config/nvptx/mkoffload.cc (omp_requires_file): New global static var. (main): Remove local omp_requires_file var. (tool_cleanup): Handle omp_requires_file. (cherry picked from commit 713ec97e593bd4d9915a13bc4047f064fec0e24a)
2022-08-19Merge branch 'releases/gcc-12' into devel/omp/gcc-12Tobias Burnus59-3935/+4187
Merge up to r12-8698-g2d29d7b240d9ca87cbee5d90c846694125d293af (19th Aug 2022) This includes the 12.2.0 release and then 12.2.1 post-release version bump
2022-08-19Bump BASE-VERRichard Biener1-1/+1
* BASE-VER: Set to 12.2.1.
2022-08-19Update ChangeLog and version files for releasereleases/gcc-12.2.0Richard Biener55-1/+217
2022-08-19Daily bump.GCC Administrator1-1/+1
2022-08-18Daily bump.GCC Administrator3-1/+14
2022-08-17Regenerate gcc.potJoseph Myers1-3927/+3944
* gcc.pot: Regenerate.
2022-08-17OpenMP requires: Fix diagnostic filename corner caseTobias Burnus2-0/+13
The issue occurs when there is, e.g., main._omp_fn.0 in two files with different OpenMP requires clauses. The function entries in the offload table ends up having the same decl tree and, hence, the diagnostic showed the same filename for both. Solution: Use the .o filename in this case. Note that the issue does not occur with same-named 'static' functions and without the fatal error from the requires diagnostic, there would be later a linker error due to having two 'main'. gcc/ * lto-cgraph.cc (input_offload_tables): Improve requires diagnostic when filenames come out identically. (cherry picked from commit 027b281f1e8de55d959695c7f1e80572fae6dbe7)
2022-08-17libgomp/splay-tree.h: Fix splay_tree_prefix handlingTobias Burnus2-15/+23
When splay_tree_prefix is defined, the .h file defines splay_* macros to add the prefix. However, before those were only unset when additionally splay_tree_c was defined. Additionally, for consistency undefine splay_tree_c also when no splay_tree_prefix is defined - there is no interdependence either. libgomp/ChangeLog: * splay-tree.h: Fix splay_* macro unsetting if splay_tree_prefix is defined. (cherry picked from commit 6b4e49fdfcc9bff5459d5a821dd7e9476c7c1c10)
2022-08-17OpenMP/C++: Allow classes with static members to be mappable [PR104493]Tobias Burnus19-103/+119
As this is the last lang-specific user of the omp_mappable_type hook, the hook is removed, keeping only a generic omp_mappable_type for incomplete types (or error_node). PR c++/104493 gcc/c/ChangeLog: * c-decl.cc (c_decl_attributes, finish_decl): Call omp_mappable_type instead of removed langhook. * c-typeck.cc (c_finish_omp_clauses): Likewise. gcc/cp/ChangeLog: * cp-objcp-common.h (LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove. * cp-tree.h (cp_omp_mappable_type, cp_omp_emit_unmappable_type_notes): Remove. * decl2.cc (cp_omp_mappable_type_1, cp_omp_mappable_type, cp_omp_emit_unmappable_type_notes): Remove. (cplus_decl_attributes): Call omp_mappable_type instead of removed langhook. * decl.cc (cp_finish_decl): Likewise; call cxx_incomplete_type_inform in lieu of cp_omp_emit_unmappable_type_notes. * semantics.cc (finish_omp_clauses): Likewise. gcc/ChangeLog: * gimplify.cc (omp_notice_variable): Call omp_mappable_type instead of removed langhook. * omp-general.h (omp_mappable_type): New prototype. * omp-general.cc (omp_mappable_type): New; moved from ... * langhooks.cc (lhd_omp_mappable_type): ... here. * langhooks-def.h (lhd_omp_mappable_type, LANG_HOOKS_OMP_MAPPABLE_TYPE): Remove. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Remote the latter. * langhooks.h (struct lang_hooks_for_types): Remove omp_mappable_type. gcc/testsuite/ChangeLog: * g++.dg/gomp/unmappable-1.C: Remove dg-error; remove dg-note no longer shown as TYPE_MAIN_DECL is NULL. * c-c++-common/gomp/map-incomplete-type.c: New test. Co-authored-by: Chung-Lin Tang <cltang@codesourcery.com> (cherry picked from commit 92a5de3df2dc958d6b3d18a0466189ad31f5ae79)
2022-08-17PR106342 - IBM zSystems: Provide vsel for all vector modesIlya Leoshkevich2-6/+12
dg.exp=pr104612.c fails with an ICE on s390x, because copysignv2sf3 produces an insn that vsel<mode> is supposed to recognize, but can't, because it's not defined for V2SF. Fix by defining it for all vector modes supported by copysign<mode>3. gcc/ChangeLog: * config/s390/vector.md (V_HW_FT): New iterator. * config/s390/vx-builtins.md (vsel<mode>): Use V_HW_FT instead of V_HW. (cherry picked from commit 2f17f489de47d46626ed85804c3b810547ef550e)
2022-08-17Merge branch 'releases/gcc-12' into devel/omp/gcc-12Tobias Burnus83-226/+1999
Merge up to r12-8692-gebf3cd1716139f210ff80ba2e2da42e666d72bec (17th Aug 2022)
2022-08-17Daily bump.GCC Administrator2-1/+10
2022-08-16d: Update DIP links in gdc documentation to point at upstream repositoryIain Buclaw1-6/+10
The wiki links probably worked at some point in the distant past, but now the official location of tracking all D Improvement Proposals is on the upstream dlang/DIPs GitHub repository. PR d/106638 gcc/d/ChangeLog: * gdc.texi: Update DIP links to point at upstream dlang/DIPs repository. (cherry picked from commit e56b695aa3aed3c0c80616bba569bbeb4a06b5e5)
2022-08-16Daily bump.GCC Administrator3-1/+37
2022-08-15d: Defer compiling inline definitions until after the module has finished.Iain Buclaw3-11/+32
This is to prevent the case of when generating the methods of a struct type, we don't accidentally emit an inline function that references it, as the outer struct itself would still be incomplete. gcc/d/ChangeLog: * d-tree.h (d_defer_declaration): Declare. * decl.cc (function_needs_inline_definition_p): Defer checking DECL_UNINLINABLE and DECL_DECLARED_INLINE_P. (maybe_build_decl_tree): Call d_defer_declaration instead of build_decl_tree. * modules.cc (deferred_inline_declarations): New variable. (build_module_tree): Set deferred_inline_declarations and a handle declarations pushed to it. (d_defer_declaration): New function. (cherry picked from commit 8db5b71e212debcc4f6a17f80191ca187c307fcb)
2022-08-15d: Fix internal compiler error: Segmentation fault at gimple-expr.cc:88Iain Buclaw4-1/+64
Because complex types are deprecated in the language, the new way to expose native complex types is by defining an enum with a basetype of a library-defined struct that is implicitly treated as-if it is native. As casts are not implicitly added by the front-end when downcasting from enum to its underlying type, we must insert an explicit cast during the code generation pass. PR d/106623 gcc/d/ChangeLog: * d-codegen.cc (underlying_complex_expr): New function. (d_build_call): Handle passing native complex objects as the library-defined equivalent. * d-tree.h (underlying_complex_expr): Declare. * expr.cc (ExprVisitor::visit (DotVarExp *)): Call underlying_complex_expr instead of build_vconvert. gcc/testsuite/ChangeLog: * gdc.dg/torture/pr106623.d: New test. (cherry picked from commit e206fecaac29f559f4990312b875604eb1ce3ef3)
2022-08-15Daily bump.GCC Administrator1-1/+1
2022-08-14Daily bump.GCC Administrator1-1/+1
2022-08-13Daily bump.GCC Administrator4-1/+51
2022-08-12c++: constexpr, empty base after non-empty [PR106369]Jason Merrill2-1/+33
Here the CONSTRUCTOR we were providing for D{} had an entry for the B base subobject at offset 0 following the entry for the C base, causing output_constructor_regular_field to ICE due to going backwards. It might be nice for that function to be more tolerant of empty fields, but it also seems reasonable for the front end to prune the useless entry. PR c++/106369 gcc/cp/ChangeLog: * constexpr.cc (reduced_constant_expression_p): Return false if a CONSTRUCTOR initializes an empty field. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/constexpr-lambda27.C: New test. (cherry picked from commit 9efe4e153d994974afcbba09c3c683f5f4a19c63)
2022-08-12c++: pedwarn for empty unnamed enum in decl [PR67048]Marek Polacek2-1/+10
[dcl.dcl]/5 says that enum { }; is ill-formed, and since r197742 we issue a pedwarn. However, the pedwarn also fires for enum { } x; which is well-formed. So only warn when {} is followed by a ;. This should be correct since you can't have "enum {}, <whatever>" -- that produces "expected unqualified-id before ',' token". PR c++/67048 gcc/cp/ChangeLog: * parser.cc (cp_parser_enum_specifier): Warn about empty unnamed enum only when it's followed by a semicolon. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/enum42.C: New test. (cherry picked from commit fd0d3e9121c5aa65150d242676be6bbdc8d4a92a)
2022-08-11c: Handle initializations of opaque types [PR106016]Peter Bergner2-1/+15
The initial commit that added opaque types thought that there couldn't be any valid initializations for variables of these types, but the test case in the bug report shows that isn't true. The solution is to handle OPAQUE_TYPE initializations like the other scalar types. 2022-06-17 Peter Bergner <bergner@linux.ibm.com> gcc/ PR c/106016 * expr.cc (count_type_elements): Handle OPAQUE_TYPE. gcc/testsuite/ PR c/106016 * gcc.target/powerpc/pr106016.c: New test. (cherry picked from commit 975658b782f36dcf6eb190966d5b705977bfd5eb)
2022-08-12Daily bump.GCC Administrator3-1/+30
2022-08-11aarch64: Implement ACLE Data IntrinsicsAndre Simoes Dias Vieira4-3/+602
This patch adds support for the ACLE Data Intrinsics to the AArch64 port. gcc/ChangeLog: 2022-07-25 Andre Vieira <andre.simoesdiasvieira@arm.com> * config/aarch64/aarch64.md (rbit<mode>2): Rename this ... (@aarch64_rbit<mode>): ... to this and change it in... (ffs<mode>2,ctz<mode>2): ... here. (@aarch64_rev16<mode>): New. * config/aarch64/aarch64-builtins.cc: (aarch64_builtins): Define the following enum AARCH64_REV16, AARCH64_REV16L, AARCH64_REV16LL, AARCH64_RBIT, AARCH64_RBITL, AARCH64_RBITLL. (aarch64_init_data_intrinsics): New. (aarch64_general_init_builtins): Add call to aarch64_init_data_intrinsics. (aarch64_expand_builtin_data_intrinsic): New. (aarch64_general_expand_builtin): Add call to aarch64_expand_builtin_data_intrinsic. * config/aarch64/arm_acle.h (__clz, __clzl, __clzll, __cls, __clsl, __clsll, __rbit, __rbitl, __rbitll, __rev, __revl, __revll, __rev16, __rev16l, __rev16ll, __ror, __rorl, __rorll, __revsh): New. gcc/testsuite/ChangeLog: 2022-07-25 Andre Vieira <andre.simoesdiasvieira@arm.com> * gcc.target/aarch64/acle/data-intrinsics.c: New test. (cherry picked from commit eb966d393dfdfd2c80994e4bfcc0dddf85828a73)
2022-08-11Daily bump.GCC Administrator3-1/+45
2022-08-10OpenMP: Fix folding with simd's linear clause [PR106492]Tobias Burnus2-3/+52
gcc/ChangeLog: PR middle-end/106492 * omp-low.cc (lower_rec_input_clauses): Add missing folding to data type of linear-clause list item. gcc/testsuite/ChangeLog: PR middle-end/106492 * g++.dg/gomp/pr106492.C: New test. (cherry picked from commit 8a16b9f983824b6b9a25275cd23b6bba8c98b800)
2022-08-10tree-optimization/106513 - fix mistake in bswap symbolic number shiftsRichard Biener2-1/+27
This fixes a mistake in typing a local variable in the symbolic shift routine. PR tree-optimization/106513 * gimple-ssa-store-merging.cc (do_shift_rotate): Use uint64_t for head_marker. * gcc.dg/torture/pr106513.c: New testcase. (cherry picked from commit f675afa4eeac9910a2c085a95aa04d6d9f2fd8d6)
2022-08-10lto/106540 - fix LTO tree input wrt dwarf2out_register_external_dieRichard Biener1-2/+5
I've revisited the earlier two workarounds for dwarf2out_register_external_die getting duplicate entries. It turns out that r11-525-g03d90a20a1afcb added dref_queue pruning to lto_input_tree but decl reading uses that to stream in DECL_INITIAL even when in the middle of SCC streaming. When that SCC then gets thrown away we can end up with debug nodes registered which isn't supposed to happen. The following adjusts the DECL_INITIAL streaming to go the in-SCC way, using lto_input_tree_1, since no SCCs are expected at this point, just refs. PR lto/106540 PR lto/106334 * lto-streamer-in.cc (lto_read_tree_1): Use lto_input_tree_1 to input DECL_INITIAL, avoiding to commit drefs. (cherry picked from commit 2a1448f2763a72c83e2ec496f78243a975b0d44e)
2022-08-10Daily bump.GCC Administrator4-1/+35
2022-08-09libgccjit.h: Uncomment macro definition for testing ↵Vibhav Pant1-2/+2
gcc_jit_context_new_bitcast support (cherry-picked from r13-2004-g9385cd9c74cf66) The macro definition for LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast was earlier located in the documentation comment for gcc_jit_context_new_bitcast, making it unavailable to code that consumed libgccjit.h. This commit moves the definition out of the comment, making it effective. gcc/jit/ChangeLog: * libgccjit.h (LIBGCCJIT_HAVE_gcc_jit_context_new_bitcast): Move definition out of comment. Signed-off-by: David Malcolm <dmalcolm@redhat.com>