diff options
44 files changed, 315 insertions, 102 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 97f1021..f3bc8ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,24 @@ +2025-09-27 ChengLulu <chenglulu@loongson.cn> + + PR target/99217 + * config/mips/mips.cc (mips_start_function_definition): + Implements the functionality of '-fpatchable-function-entry='. + (mips_print_patchable_function_entry): Define empty function. + (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY): Define macro. + +2025-09-27 Jie Mei <jie.mei@oss.cipunited.com> + + * config/mips/mips.cc(mips_option_override):Add conditions + for use of the -mmips16e2 and -mips16 option. + +2025-09-27 Jie Mei <jie.mei@oss.cipunited.com> + + * config/mips/mips.md (fms<mode>4): Generates MSUBF.fmt + instructions. + (*fms<mode>4_msubf): Same as above. + (fnma<mode>4): Same as above. + (*fnma<mode>4_msubf): Same as above. + 2025-09-26 Alejandro Colomar <alx@kernel.org> * doc/extend.texi: Clarify documentation about lists of diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index edfad19..758c2d5 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20250927 +20250928 diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc index b0b9e6d..c6f4227 100644 --- a/gcc/config/i386/i386-expand.cc +++ b/gcc/config/i386/i386-expand.cc @@ -13915,8 +13915,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, char *opts = ix86_target_string (bisa, bisa2, 0, 0, NULL, NULL, (enum fpmath_unit) 0, (enum prefer_vector_width) 0, - PVW_NONE, PVW_NONE, - false, add_abi_p); + PVW_NONE, false, add_abi_p); if (!opts) error ("%qE needs unknown isa option", fndecl); else diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc index abb5dd7..cad4019 100644 --- a/gcc/config/i386/i386-options.cc +++ b/gcc/config/i386/i386-options.cc @@ -401,7 +401,6 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, enum fpmath_unit fpmath, enum prefer_vector_width pvw, enum prefer_vector_width move_max, - enum prefer_vector_width store_max, bool add_nl_p, bool add_abi_p) { /* Flag options. */ @@ -611,10 +610,6 @@ ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, if (move_max) add_vector_width (move_max, "-mmove-max="); - /* Add -mstore-max= option. */ - if (store_max) - add_vector_width (store_max, "-mstore-max="); - /* Any options? */ if (num == 0) return NULL; @@ -680,8 +675,7 @@ ix86_debug_options (void) target_flags, ix86_target_flags, ix86_arch_string, ix86_tune_string, ix86_fpmath, prefer_vector_width_type, - ix86_move_max, ix86_store_max, - true, true); + ix86_move_max, true, true); if (opts) { @@ -956,8 +950,7 @@ ix86_function_specific_print (FILE *file, int indent, ptr->x_target_flags, ptr->x_ix86_target_flags, NULL, NULL, ptr->x_ix86_fpmath, ptr->x_prefer_vector_width_type, - ptr->x_ix86_move_max, ptr->x_ix86_store_max, - false, true); + ptr->x_ix86_move_max, false, true); gcc_assert (ptr->arch < PROCESSOR_max); fprintf (file, "%*sarch = %d (%s)\n", @@ -1410,8 +1403,6 @@ ix86_valid_target_attribute_tree (tree fndecl, tree args, enum prefer_vector_width orig_pvw_set = opts_set->x_prefer_vector_width_type; enum prefer_vector_width orig_ix86_move_max_set = opts_set->x_ix86_move_max; - enum prefer_vector_width orig_ix86_store_max_set - = opts_set->x_ix86_store_max; int orig_tune_defaulted = ix86_tune_defaulted; int orig_arch_specified = ix86_arch_specified; char *option_strings[IX86_FUNCTION_SPECIFIC_MAX] = { NULL, NULL }; @@ -1492,7 +1483,6 @@ ix86_valid_target_attribute_tree (tree fndecl, tree args, opts_set->x_ix86_fpmath = orig_fpmath_set; opts_set->x_prefer_vector_width_type = orig_pvw_set; opts_set->x_ix86_move_max = orig_ix86_move_max_set; - opts_set->x_ix86_store_max = orig_ix86_store_max_set; opts->x_ix86_excess_precision = orig_ix86_excess_precision; opts->x_ix86_unsafe_math_optimizations = orig_ix86_unsafe_math_optimizations; @@ -2940,32 +2930,6 @@ ix86_option_override_internal (bool main_args_p, } } - if (opts_set->x_ix86_store_max == PVW_NONE) - { - /* Set the maximum number of bits can be stored to memory - efficiently. */ - if (opts_set->x_prefer_vector_width_type != PVW_NONE) - opts->x_ix86_store_max = opts->x_prefer_vector_width_type; - else if (ix86_tune_features[X86_TUNE_AVX512_STORE_BY_PIECES]) - opts->x_ix86_store_max = PVW_AVX512; - else if (ix86_tune_features[X86_TUNE_AVX256_STORE_BY_PIECES]) - opts->x_ix86_store_max = PVW_AVX256; - else - { - opts->x_ix86_store_max = opts->x_prefer_vector_width_type; - if (opts_set->x_ix86_store_max == PVW_NONE) - { - if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)) - opts->x_ix86_store_max = PVW_AVX512; - /* Align with vectorizer to avoid potential STLF issue. */ - else if (TARGET_AVX_P (opts->x_ix86_isa_flags)) - opts->x_ix86_store_max = PVW_AVX256; - else - opts->x_ix86_store_max = PVW_AVX128; - } - } - } - if (opts->x_ix86_recip_name) { char *p = ASTRDUP (opts->x_ix86_recip_name); diff --git a/gcc/config/i386/i386-options.h b/gcc/config/i386/i386-options.h index 0499c08..5686899 100644 --- a/gcc/config/i386/i386-options.h +++ b/gcc/config/i386/i386-options.h @@ -28,7 +28,6 @@ char *ix86_target_string (HOST_WIDE_INT isa, HOST_WIDE_INT isa2, enum fpmath_unit fpmath, enum prefer_vector_width pvw, enum prefer_vector_width move_max, - enum prefer_vector_width store_max, bool add_nl_p, bool add_abi_p); extern enum attr_cpu ix86_schedule; diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index ac0ce68..f4c89f0 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -1916,13 +1916,9 @@ typedef struct ix86_args { MOVE_MAX_PIECES defaults to MOVE_MAX. */ #define MOVE_MAX \ - ((TARGET_AVX512F \ - && (ix86_move_max == PVW_AVX512 \ - || ix86_store_max == PVW_AVX512)) \ + ((TARGET_AVX512F && ix86_move_max == PVW_AVX512) \ ? 64 \ - : ((TARGET_AVX \ - && (ix86_move_max >= PVW_AVX256 \ - || ix86_store_max >= PVW_AVX256)) \ + : ((TARGET_AVX && ix86_move_max >= PVW_AVX256) \ ? 32 \ : ((TARGET_SSE2 \ && TARGET_SSE_UNALIGNED_LOAD_OPTIMAL \ @@ -1935,15 +1931,14 @@ typedef struct ix86_args { store_by_pieces of 16/32/64 bytes. */ #define STORE_MAX_PIECES \ (TARGET_INTER_UNIT_MOVES_TO_VEC \ - ? ((TARGET_AVX512F && ix86_store_max == PVW_AVX512) \ + ? ((TARGET_AVX512F && ix86_move_max == PVW_AVX512) \ ? 64 \ - : ((TARGET_AVX \ - && ix86_store_max >= PVW_AVX256) \ + : ((TARGET_AVX && ix86_move_max >= PVW_AVX256) \ ? 32 \ : ((TARGET_SSE2 \ && TARGET_SSE_UNALIGNED_STORE_OPTIMAL) \ - ? 16 : UNITS_PER_WORD))) \ - : UNITS_PER_WORD) + ? 16 : UNITS_PER_WORD))) \ + : UNITS_PER_WORD) /* If a memory-to-memory move would take MOVE_RATIO or more simple move-instruction pairs, we will do a cpymem or libcall instead. diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 6bda22f..1192176 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -644,8 +644,7 @@ Target RejectNegative Joined Var(ix86_move_max) Enum(prefer_vector_width) Init(P Maximum number of bits that can be moved from memory to memory efficiently. mstore-max= -Target RejectNegative Joined Var(ix86_store_max) Enum(prefer_vector_width) Init(PVW_NONE) Save -Maximum number of bits that can be stored to memory efficiently. +Target RejectNegative Joined Uncoumented Var(ix86_move_max) Enum(prefer_vector_width) Init(PVW_NONE) Warn(%<-mstore-max=%> is deprecated; use %<-mmove-max=%> instead) mnoreturn-no-callee-saved-registers Target Var(ix86_noreturn_no_callee_saved_registers) diff --git a/gcc/config/i386/x86-tune.def b/gcc/config/i386/x86-tune.def index 255ea4a..3627312 100644 --- a/gcc/config/i386/x86-tune.def +++ b/gcc/config/i386/x86-tune.def @@ -619,21 +619,11 @@ DEF_TUNE (X86_TUNE_AVX512_SPLIT_REGS, "avx512_split_regs", m_ZNVER4) DEF_TUNE (X86_TUNE_AVX256_MOVE_BY_PIECES, "avx256_move_by_pieces", m_CORE_HYBRID | m_CORE_AVX2 | m_ZNVER1 | m_ZNVER2 | m_ZNVER3) -/* X86_TUNE_AVX256_STORE_BY_PIECES: Optimize store_by_pieces with 256-bit - AVX instructions. */ -DEF_TUNE (X86_TUNE_AVX256_STORE_BY_PIECES, "avx256_store_by_pieces", - m_CORE_HYBRID | m_CORE_AVX2 | m_ZNVER1 | m_ZNVER2 | m_ZNVER3) - /* X86_TUNE_AVX512_MOVE_BY_PIECES: Optimize move_by_pieces with 512-bit AVX instructions. */ DEF_TUNE (X86_TUNE_AVX512_MOVE_BY_PIECES, "avx512_move_by_pieces", m_ZNVER4 | m_ZNVER5) -/* X86_TUNE_AVX512_STORE_BY_PIECES: Optimize store_by_pieces with 512-bit - AVX instructions. */ -DEF_TUNE (X86_TUNE_AVX512_STORE_BY_PIECES, "avx512_store_by_pieces", - m_ZNVER4 | m_ZNVER5) - /* X86_TUNE_AVX512_TWO_EPILOGUES: Use two vector epilogues for 512-bit vectorized loops. */ DEF_TUNE (X86_TUNE_AVX512_TWO_EPILOGUES, "avx512_two_epilogues", diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 60ff869..98b48ff 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,14 @@ +2025-09-27 Jason Merrill <jason@redhat.com> + + PR c++/112632 + * pt.cc (convert_template_argument): Also force IMPLICIT_CONV_EXPR + if the argument is value-dependent. + +2025-09-27 Jason Merrill <jason@redhat.com> + + PR c++/122048 + * pt.cc (tsubst_expr): Don't use a lambda current_class_ptr. + 2025-09-25 Nathaniel Shead <nathanieloshead@gmail.com> PR c++/122015 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 4427f6a..31a19ed 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2025-09-27 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/87908 + * interface.cc (check_interface0): Revert changes. + 2025-09-26 Harald Anlauf <anlauf@gcc.gnu.org> PR fortran/122002 diff --git a/gcc/pretty-print.cc b/gcc/pretty-print.cc index d79a828..b4d6910 100644 --- a/gcc/pretty-print.cc +++ b/gcc/pretty-print.cc @@ -38,11 +38,18 @@ along with GCC; see the file COPYING3. If not see #include <iconv.h> #endif +static int +decode_utf8_char (const unsigned char *, size_t len, unsigned int *); + #ifdef __MINGW32__ /* Replacement for fputs() that handles ANSI escape codes on Windows NT. Contributed by: Liu Hao (lh_mouse at 126 dot com) + Extended by: Peter Damianov + Converts UTF-8 to UTF-16 if outputting to a console, so that emojis and + various other unicode characters don't get mojibak'd. + XXX: This file is compiled into libcommon.a that will be self-contained. It looks like that these functions can be put nowhere else. */ @@ -50,11 +57,132 @@ along with GCC; see the file COPYING3. If not see #define WIN32_LEAN_AND_MEAN 1 #include <windows.h> +/* Convert UTF-8 string to UTF-16. + Returns true if conversion was performed, false if string is pure ASCII. + + If the string contains only ASCII characters, returns false + without allocating any memory. Otherwise, a buffer that the caller + must free is allocated and the string is converted into it. */ +static bool +mingw_utf8_str_to_utf16_str (const char *utf8_str, size_t utf8_len, wchar_t **utf16_str, + size_t *utf16_len) +{ + if (utf8_len == 0) + { + *utf16_str = NULL; + *utf16_len = 0; + return false; /* No conversion needed for empty string. */ + } + + /* First pass: scan for non-ASCII and count UTF-16 code units needed. */ + size_t utf16_count = 0; + const unsigned char *p = (const unsigned char *) utf8_str; + const unsigned char *end = p + utf8_len; + bool found_non_ascii = false; + + while (p < end) + { + if (*p <= 127) + { + /* ASCII character - count as 1 UTF-16 unit and advance. */ + utf16_count++; + p++; + } + else + { + /* Non-ASCII character - decode UTF-8 sequence. */ + found_non_ascii = true; + unsigned int codepoint; + int utf8_char_len = decode_utf8_char (p, end - p, &codepoint); + + if (utf8_char_len == 0) + return false; /* Invalid UTF-8. */ + + if (codepoint <= 0xFFFF) + utf16_count += 1; /* Single UTF-16 unit. */ + else + utf16_count += 2; /* Surrogate pair. */ + + p += utf8_char_len; + } + } + + /* If string is pure ASCII, no conversion needed. */ + if (!found_non_ascii) + return false; + + *utf16_str = (wchar_t *) xmalloc (utf16_count * sizeof (wchar_t)); + *utf16_len = utf16_count; + + /* Second pass: convert UTF-8 to UTF-16. */ + wchar_t *out = *utf16_str; + p = (const unsigned char *) utf8_str; + + while (p < end) + { + if (*p <= 127) + { + /* ASCII character. */ + *out++ = (wchar_t) *p++; + } + else + { + /* Non-ASCII character - decode and convert. */ + unsigned int codepoint; + int utf8_char_len = decode_utf8_char (p, end - p, &codepoint); + + if (codepoint <= 0xFFFF) + { + *out++ = (wchar_t) codepoint; + } + else + { + /* Convert to UTF-16 surrogate pair. */ + codepoint -= 0x10000; + *out++ = (wchar_t) (0xD800 + (codepoint >> 10)); + *out++ = (wchar_t) (0xDC00 + (codepoint & 0x3FF)); + } + + p += utf8_char_len; + } + } + + return true; +} + +/* Check if the handle is a console. */ +static bool +is_console_handle (HANDLE h) +{ + DWORD mode; + return GetConsoleMode (h, &mode); +} + /* Write all bytes in [s,s+n) into the specified stream. - Errors are ignored. */ + If outputting to a Windows console, convert UTF-8 to UTF-16 if needed. + Errors are ignored. */ static void write_all (HANDLE h, const char *s, size_t n) { + /* If writing to console, try to convert from UTF-8 to UTF-16 and use + WriteConsoleW. utf8_to_utf16 will return false if the string is pure + ASCII, in which case we fall back to the regular WriteFile path. */ + if (is_console_handle (h)) + { + wchar_t *utf16_str; + size_t utf16_len; + + if (mingw_utf8_str_to_utf16_str (s, n, &utf16_str, &utf16_len)) + { + DWORD written; + WriteConsoleW (h, utf16_str, utf16_len, &written, NULL); + free (utf16_str); + return; + } + /* If UTF-8 conversion returned false, fall back to WriteFile. */ + } + + /* WriteFile for regular files or when UTF-16 conversion is not needed. */ size_t rem = n; DWORD step; @@ -712,8 +840,6 @@ mingw_ansi_fputs (const char *str, FILE *fp) #endif /* __MINGW32__ */ -static int -decode_utf8_char (const unsigned char *, size_t len, unsigned int *); static void pp_quoted_string (pretty_printer *, const char *, size_t = -1); extern void diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0642410..6d8bd67 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,48 @@ +2025-09-27 YunQiang Su <syq@gcc.gnu.org> + + * gcc.target/mips/mips16e2.c: Use isa_rev=2 instead of >=2. + * gcc.target/mips/mips16e2-cache.c: Ditto. + * gcc.target/mips/mips16e2-cmov.c: Ditto. + * gcc.target/mips/mips16e2-gp.c: Ditto. + +2025-09-27 ChengLulu <chenglulu@loongson.cn> + + PR target/99217 + * gcc.target/mips/pr99217.c: New test. + +2025-09-27 Jason Merrill <jason@redhat.com> + + PR c++/112632 + * g++.dg/cpp2a/concepts-conv4.C: New test. + +2025-09-27 Jason Merrill <jason@redhat.com> + + PR c++/121854 + * g++.dg/cpp23/explicit-obj-lambda19.C: New test. + +2025-09-27 Jason Merrill <jason@redhat.com> + + PR c++/122048 + * g++.dg/cpp1y/lambda-generic-this6.C: New test. + +2025-09-27 Jie Mei <jie.mei@oss.cipunited.com> + + * gcc.target/mips/mips16e2-cache.c: Use isa_rev>=2 instead of + -mips32r2 and remove -mips16 option. + * gcc.target/mips/mips16e2-cmov.c: Add isa_rev>=2 and remove + -mips16 option. + * gcc.target/mips/mips16e2-gp.c: Same as above. + * gcc.target/mips/mips16e2.c: Same as above. + +2025-09-27 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/87908 + * gfortran.dg/pr87908.f90: Delete. + +2025-09-27 Jie Mei <jie.mei@oss.cipunited.com> + + * gcc.target/mips/mips-msubf.c: New tests for MIPSr6. + 2025-09-26 Alejandro Colomar <alx@kernel.org> * gcc.dg/Wmultiple-parameter-fwd-decl-lists.c: New test. diff --git a/gcc/testsuite/g++.target/i386/pr80566-1.C b/gcc/testsuite/g++.target/i386/pr80566-1.C index 2a8031c..4e6d96a 100644 --- a/gcc/testsuite/g++.target/i386/pr80566-1.C +++ b/gcc/testsuite/g++.target/i386/pr80566-1.C @@ -1,5 +1,5 @@ // { dg-do compile } -// { dg-options "-O2 -march=haswell -mtune-ctrl=avx256_store_by_pieces" } +// { dg-options "-O2 -march=haswell -mtune-ctrl=avx256_move_by_pieces" } // { dg-skip-if "requires hosted libstdc++ for cstring" { ! hostedlib } } #include <cstring> diff --git a/gcc/testsuite/gcc.target/i386/pieces-memcmp-2.c b/gcc/testsuite/gcc.target/i386/pieces-memcmp-2.c index 6061c91..d4dd0a5 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memcmp-2.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memcmp-2.c @@ -1,5 +1,5 @@ /* { dg-do compile { target ia32 } } */ -/* { dg-options "-O2 -mavx2 -mmove-max=128 -mstore-max=128" } */ +/* { dg-options "-O2 -mavx2 -mmove-max=128" } */ int foo(char *a) { diff --git a/gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c index a5b5b61..de9757f 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-19.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=sapphirerapids -mmove-max=128 -mstore-max=128" } */ +/* { dg-options "-O2 -march=sapphirerapids -mmove-max=128" } */ extern char *dst, *src; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c b/gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c index 1feff48..cb96fba 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memcpy-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=sapphirerapids -mmove-max=256 -mstore-max=256" } */ +/* { dg-options "-O2 -march=sapphirerapids -mmove-max=256" } */ extern char *dst, *src; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-11.c b/gcc/testsuite/gcc.target/i386/pieces-memset-11.c index 3802eb7..fbf76d0 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-11.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-11.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-14.c b/gcc/testsuite/gcc.target/i386/pieces-memset-14.c index 10bc085..cb940f6 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-14.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-14.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-2.c b/gcc/testsuite/gcc.target/i386/pieces-memset-2.c index 4ebfc4d..53498f9 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-2.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-20.c b/gcc/testsuite/gcc.target/i386/pieces-memset-20.c index 1dc4db1..09c9def 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-20.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-23.c b/gcc/testsuite/gcc.target/i386/pieces-memset-23.c index 9232864..f692ff0 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-23.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-23.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-29.c b/gcc/testsuite/gcc.target/i386/pieces-memset-29.c index 3b07a64..8499907 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-29.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-29.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-30.c b/gcc/testsuite/gcc.target/i386/pieces-memset-30.c index 59595e6..c9c4459 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-30.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-30.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-33.c b/gcc/testsuite/gcc.target/i386/pieces-memset-33.c index 6864622..b88988f 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-33.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-33.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-34.c b/gcc/testsuite/gcc.target/i386/pieces-memset-34.c index 52a16a0..b6a6c3d 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-34.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-34.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-37.c b/gcc/testsuite/gcc.target/i386/pieces-memset-37.c index 5cc4d77..7b9845f 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-37.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-37.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx512f -mavx2 -mtune-ctrl=avx256_move_by_pieces" } */ void foo (int a1, int a2, int a3, int a4, int a5, int a6, int x, char *dst) diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-44.c b/gcc/testsuite/gcc.target/i386/pieces-memset-44.c index 5986f8e..94552be 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-44.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-44.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-45.c b/gcc/testsuite/gcc.target/i386/pieces-memset-45.c index e8ce7c2..d0822a7 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-45.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-45.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mavx512f -mtune-ctrl=avx512_store_by_pieces" } */ +/* { dg-options "-O2 -march=x86-64 -mavx512f -mtune-ctrl=avx512_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-47.c b/gcc/testsuite/gcc.target/i386/pieces-memset-47.c index 78d3290..99d6abe 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-47.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-47.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=sapphirerapids -mstore-max=128" } */ +/* { dg-warning ".-mstore-max=. is deprecated; use .-mmove-max=. instead" "" { target *-*-* } 0 } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-48.c b/gcc/testsuite/gcc.target/i386/pieces-memset-48.c index 6342dbb..be12fbb 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-48.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-48.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=sapphirerapids -mstore-max=256" } */ +/* { dg-options "-O2 -march=sapphirerapids -mmove-max=256" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pieces-memset-5.c b/gcc/testsuite/gcc.target/i386/pieces-memset-5.c index e2379df..7fc824c 100644 --- a/gcc/testsuite/gcc.target/i386/pieces-memset-5.c +++ b/gcc/testsuite/gcc.target/i386/pieces-memset-5.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -mno-avx2 -mavx -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pr100865-10a.c b/gcc/testsuite/gcc.target/i386/pr100865-10a.c index 3bc0f1a..04129f5 100644 --- a/gcc/testsuite/gcc.target/i386/pr100865-10a.c +++ b/gcc/testsuite/gcc.target/i386/pr100865-10a.c @@ -1,5 +1,5 @@ /* { dg-do compile { target int128 } } */ -/* { dg-options "-O3 -march=skylake -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O3 -march=skylake -mtune-ctrl=avx256_move_by_pieces" } */ extern __int128 array[16]; diff --git a/gcc/testsuite/gcc.target/i386/pr100865-4a.c b/gcc/testsuite/gcc.target/i386/pr100865-4a.c index 8009e5c..5817f78 100644 --- a/gcc/testsuite/gcc.target/i386/pr100865-4a.c +++ b/gcc/testsuite/gcc.target/i386/pr100865-4a.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_move_by_pieces" } */ /* { dg-additional-options "-fno-PIE" { target ia32 } } */ extern char array[64]; diff --git a/gcc/testsuite/gcc.target/i386/pr104610.c b/gcc/testsuite/gcc.target/i386/pr104610.c index 5173fc8..fec9fcb 100644 --- a/gcc/testsuite/gcc.target/i386/pr104610.c +++ b/gcc/testsuite/gcc.target/i386/pr104610.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mavx -mmove-max=256 -mstore-max=256 -fno-stack-protector" } */ +/* { dg-options "-O2 -mavx -mmove-max=256 -fno-stack-protector" } */ /* { dg-final { scan-assembler-times {(?n)vptest.*ymm} 1 } } */ /* { dg-final { scan-assembler-times {sete} 1 } } */ /* { dg-final { scan-assembler-not {(?n)je.*L[0-9]} } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr121410.c b/gcc/testsuite/gcc.target/i386/pr121410.c index 04bab91..93cb39b 100644 --- a/gcc/testsuite/gcc.target/i386/pr121410.c +++ b/gcc/testsuite/gcc.target/i386/pr121410.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=x86-64 -mavx512f -mstore-max=128" } */ +/* { dg-options "-O2 -march=x86-64 -mavx512f -mmove-max=128" } */ extern unsigned _BitInt(3719) a; extern _BitInt(465) g; diff --git a/gcc/testsuite/gcc.target/i386/pr90773-20.c b/gcc/testsuite/gcc.target/i386/pr90773-20.c index 884a550..3286d33 100644 --- a/gcc/testsuite/gcc.target/i386/pr90773-20.c +++ b/gcc/testsuite/gcc.target/i386/pr90773-20.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pr90773-21.c b/gcc/testsuite/gcc.target/i386/pr90773-21.c index 0d620ff..56ec843 100644 --- a/gcc/testsuite/gcc.target/i386/pr90773-21.c +++ b/gcc/testsuite/gcc.target/i386/pr90773-21.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pr90773-22.c b/gcc/testsuite/gcc.target/i386/pr90773-22.c index 245a436..5fc70c3 100644 --- a/gcc/testsuite/gcc.target/i386/pr90773-22.c +++ b/gcc/testsuite/gcc.target/i386/pr90773-22.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/gcc/testsuite/gcc.target/i386/pr90773-23.c b/gcc/testsuite/gcc.target/i386/pr90773-23.c index b7369e8..120f2d9 100644 --- a/gcc/testsuite/gcc.target/i386/pr90773-23.c +++ b/gcc/testsuite/gcc.target/i386/pr90773-23.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_store_by_pieces" } */ +/* { dg-options "-O2 -march=skylake -mtune-ctrl=avx256_move_by_pieces" } */ extern char *dst; diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b27c82c..b215b3a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,61 @@ +2025-09-27 Jonathan Wakely <jwakely@redhat.com> + + * testsuite/20_util/allocator_traits/members/allocate_hint.cc: + Value-initialize variables to avoid -Wmaybe-uninitialized + warning. + * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc: + Likewise. + * testsuite/20_util/duration/114244.cc: Likewise. + * testsuite/20_util/duration/io.cc: Likewise. + +2025-09-27 Jonathan Wakely <jwakely@redhat.com> + + * include/bits/deque.tcc (deque::_M_shrink_to_fit): Cast + difference_type to size_type to avoid -Wsign-compare warning. + * include/std/spanstream (basic_spanbuf::seekoff): Cast + streamoff to size_t to avoid -Wsign-compare warning. + +2025-09-27 Jonathan Wakely <jwakely@redhat.com> + + * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc: + Fix assignment used instead of equality comparison. + * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc: + Likewise. + * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc: + Likewise. + * testsuite/23_containers/map/cons/from_range.cc: Fix is_equal + function and expected value of comparison functions after + construction. + * testsuite/23_containers/multimap/cons/from_range.cc: Likewise. + * testsuite/23_containers/multiset/cons/from_range.cc: Likewise. + * testsuite/23_containers/set/cons/from_range.cc: Likewise. + * testsuite/23_containers/unordered_map/cons/from_range.cc: Fix + is_equal functions. + * testsuite/23_containers/unordered_multimap/cons/from_range.cc: + Likewise. + * testsuite/23_containers/unordered_multiset/cons/from_range.cc: + Likewise. + * testsuite/23_containers/unordered_set/cons/from_range.cc: + Likewise. + * testsuite/25_algorithms/minmax/constrained.cc: Fix assignment + used instead of equality comparison. + * testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc: + Likewise. + 2025-09-26 Jonathan Wakely <jwakely@redhat.com> * include/bits/stl_algobase.h (__search, __is_permutation): diff --git a/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc b/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc index 214be6a..94c3fbd 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint.cc @@ -74,7 +74,7 @@ void test02() { typedef std::allocator_traits<unhintable_allocator<X>> traits_type; traits_type::allocator_type a; - traits_type::const_void_pointer v; + traits_type::const_void_pointer v = nullptr; X* p __attribute__((unused)) = traits_type::allocate(a, 1, v); VERIFY( a.called ); } diff --git a/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc b/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc index 32bbf2b..c305b67 100644 --- a/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc +++ b/libstdc++-v3/testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc @@ -58,7 +58,7 @@ void test01() { typedef std::allocator_traits<Alloc<int>> traits_type; traits_type::allocator_type a; - traits_type::const_void_pointer v; + traits_type::const_void_pointer v = nullptr; traits_type::pointer p = traits_type::allocate(a, 1, v); traits_type::deallocate(a, p, 1); } diff --git a/libstdc++-v3/testsuite/20_util/duration/114244.cc b/libstdc++-v3/testsuite/20_util/duration/114244.cc index 55a7670..12701bf 100644 --- a/libstdc++-v3/testsuite/20_util/duration/114244.cc +++ b/libstdc++-v3/testsuite/20_util/duration/114244.cc @@ -13,8 +13,8 @@ test_pr114244() { using namespace std::chrono; seconds s; - milliseconds ms; - microseconds us; + milliseconds ms{}; + microseconds us{}; std::istringstream is; diff --git a/libstdc++-v3/testsuite/20_util/duration/io.cc b/libstdc++-v3/testsuite/20_util/duration/io.cc index 0117673..6ada4fc 100644 --- a/libstdc++-v3/testsuite/20_util/duration/io.cc +++ b/libstdc++-v3/testsuite/20_util/duration/io.cc @@ -193,8 +193,8 @@ test_parse() { using namespace std::chrono; seconds s; - milliseconds ms; - microseconds us; + milliseconds ms{}; + microseconds us{}; std::istringstream is(" 2023-07-24 13:05"); VERIFY( is >> parse(" %Y-%m-%d %H:%M", s) ); @@ -289,13 +289,13 @@ test_parse() is.clear(); is.str("0.5"); - std::chrono::duration<double> ds; + std::chrono::duration<double> ds{}; VERIFY( is >> parse("%S", ds) ); VERIFY( ds == 0.5s ); is.clear(); is.str("0.125"); - std::chrono::duration<double, std::milli> dms; + std::chrono::duration<double, std::milli> dms{}; VERIFY( is >> parse("%S", dms) ); VERIFY( dms == 0.125s ); } |