diff options
39 files changed, 368 insertions, 59 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/mips/mips.cc b/gcc/config/mips/mips.cc index fa9ac07..1fa7ba8 100644 --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc @@ -7476,6 +7476,9 @@ static void mips_start_function_definition (const char *name, bool mips16_p, tree decl ATTRIBUTE_UNUSED) { + unsigned HOST_WIDE_INT patch_area_size = crtl->patch_area_size; + unsigned HOST_WIDE_INT patch_area_entry = crtl->patch_area_entry; + if (mips16_p) fprintf (asm_out_file, "\t.set\tmips16\n"); else @@ -7488,6 +7491,10 @@ mips_start_function_definition (const char *name, bool mips16_p, fprintf (asm_out_file, "\t.set\tnomicromips\n"); #endif + /* Emit the patching area before the entry label, if any. */ + if (patch_area_entry > 0) + default_print_patchable_function_entry (asm_out_file, + patch_area_entry, true); if (!flag_inhibit_size_directive) { fputs ("\t.ent\t", asm_out_file); @@ -7499,6 +7506,13 @@ mips_start_function_definition (const char *name, bool mips16_p, /* Start the definition proper. */ ASM_OUTPUT_FUNCTION_LABEL (asm_out_file, name, decl); + + /* And the area after the label. Record it if we haven't done so yet. */ + if (patch_area_size > patch_area_entry) + default_print_patchable_function_entry (asm_out_file, + patch_area_size + - patch_area_entry, + patch_area_entry == 0); } /* End a function definition started by mips_start_function_definition. */ @@ -23350,6 +23364,21 @@ mips_bit_clear_p (enum machine_mode mode, unsigned HOST_WIDE_INT m) return false; } +/* define TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY */ + +/* The MIPS function start is implemented in the prologue function. + TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY needs to be inserted + before or after the function name, so this function does not + use a public implementation. This function is implemented in + mips_start_function_definition. */ + +void +mips_print_patchable_function_entry (FILE *file ATTRIBUTE_UNUSED, + unsigned HOST_WIDE_INT + patch_area_size ATTRIBUTE_UNUSED, + bool record_p ATTRIBUTE_UNUSED) +{} + /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP #define TARGET_ASM_ALIGNED_HI_OP "\t.half\t" @@ -23663,6 +23692,10 @@ mips_bit_clear_p (enum machine_mode mode, unsigned HOST_WIDE_INT m) #undef TARGET_DOCUMENTATION_NAME #define TARGET_DOCUMENTATION_NAME "MIPS" +#undef TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY +#define TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY \ +mips_print_patchable_function_entry + struct gcc_target targetm = TARGET_INITIALIZER; #include "gt-mips.h" 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/gcc.target/mips/mips16e2-cache.c b/gcc/testsuite/gcc.target/mips/mips16e2-cache.c index 8caacb1..c791575 100644 --- a/gcc/testsuite/gcc.target/mips/mips16e2-cache.c +++ b/gcc/testsuite/gcc.target/mips/mips16e2-cache.c @@ -1,4 +1,4 @@ -/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev>=2 -mmips16e2" } */ +/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev=2 -mmips16e2" } */ /* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */ /* Test cache. */ diff --git a/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c b/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c index a8a28a4..8d71e88 100644 --- a/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c +++ b/gcc/testsuite/gcc.target/mips/mips16e2-cmov.c @@ -1,4 +1,4 @@ -/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev>=2 -mmips16e2 -mbranch-cost=2" } */ +/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev=2 -mmips16e2 -mbranch-cost=2" } */ /* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */ /* Test MOVN. */ diff --git a/gcc/testsuite/gcc.target/mips/mips16e2-gp.c b/gcc/testsuite/gcc.target/mips/mips16e2-gp.c index 70d6230..5fab454 100644 --- a/gcc/testsuite/gcc.target/mips/mips16e2-gp.c +++ b/gcc/testsuite/gcc.target/mips/mips16e2-gp.c @@ -1,4 +1,4 @@ -/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev>=2 -mmips16e2" } */ +/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev=2 -mmips16e2" } */ /* { dg-skip-if "per-function expected output" { *-*-* } { "-flto" } { "" } } */ /* Generate GP-relative ADDIU. */ diff --git a/gcc/testsuite/gcc.target/mips/mips16e2.c b/gcc/testsuite/gcc.target/mips/mips16e2.c index 1b4b840..33c4bb5 100644 --- a/gcc/testsuite/gcc.target/mips/mips16e2.c +++ b/gcc/testsuite/gcc.target/mips/mips16e2.c @@ -1,4 +1,4 @@ -/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev>=2 -mmips16e2" } */ +/* { dg-options "-mno-abicalls -mgpopt -G8 -mabi=32 isa_rev=2 -mmips16e2" } */ /* { dg-skip-if "per-function expected output" { *-*-* } { "-flto" } { "" } } */ /* ANDI is a two operand instruction. Hence, it won't be generated if src and diff --git a/gcc/testsuite/gcc.target/mips/pr99217.c b/gcc/testsuite/gcc.target/mips/pr99217.c new file mode 100644 index 0000000..ac1e27b --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr99217.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-fpatchable-function-entry=1" } */ +/* { dg-final { scan-assembler "foo:\n.*.LPFE0:\n\t.set\tnoreorder\n\tnop\n\t.set\treorder" } } */ + +/* Test the placement of the .LPFE0 label. */ + +void +foo (void) +{ +} 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/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc index c15b046..20b23ff 100644 --- a/libstdc++-v3/include/bits/deque.tcc +++ b/libstdc++-v3/include/bits/deque.tcc @@ -381,7 +381,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER const difference_type __back_capacity = (this->_M_impl._M_finish._M_last - this->_M_impl._M_finish._M_cur); - if (__front_capacity + __back_capacity < _S_buffer_size()) + if (size_type(__front_capacity + __back_capacity) < _S_buffer_size()) return false; return std::__shrink_to_fit_aux<deque>::_S_do_it(*this); diff --git a/libstdc++-v3/include/std/spanstream b/libstdc++-v3/include/std/spanstream index 23a340a..fbb40ff 100644 --- a/libstdc++-v3/include/std/spanstream +++ b/libstdc++-v3/include/std/spanstream @@ -152,7 +152,7 @@ template<typename _CharT, typename _Traits> if (__way == ios_base::beg) { - if (0 <= __off && __off <= _M_buf.size()) + if (0 <= __off && (size_t)__off <= _M_buf.size()) { if (__which & ios_base::in) this->setg(this->eback(), this->eback() + __off, this->egptr()); @@ -188,7 +188,7 @@ template<typename _CharT, typename _Traits> if (__builtin_add_overflow(__base, __off, &__off)) [[unlikely]] return __ret; - if (__off < 0 || __off > _M_buf.size()) [[unlikely]] + if (__off < 0 || (size_t)__off > _M_buf.size()) [[unlikely]] return __ret; if (__which & ios_base::in) 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 ); } diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc index 9fc143c..4d2a8ba 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc @@ -86,7 +86,7 @@ test01() } VERIFY( test ); VERIFY( i1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc index 85d5e6d..55e39dd 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc @@ -86,7 +86,7 @@ test01() } VERIFY( test ); VERIFY( l1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc index a698bae..5b23d6c 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc @@ -87,7 +87,7 @@ test01() } VERIFY( test ); VERIFY( ll1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc index 47c20ce..00afc94 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc @@ -86,7 +86,7 @@ test01() } VERIFY( test ); VERIFY( ul1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc index ad81b67..f44eb1d 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc @@ -87,7 +87,7 @@ test01() } VERIFY( test ); VERIFY( ull1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc index 88e1da7..1aec77f 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc @@ -88,7 +88,7 @@ test01() } VERIFY( test ); VERIFY( i1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc index 98388f9..41e9d66 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc @@ -88,7 +88,7 @@ test01() } VERIFY( test ); VERIFY( l1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc index d7a49f5..5c7a25b 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc @@ -88,7 +88,7 @@ test01() } VERIFY( test ); VERIFY( ll1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc index b553796..d33289a 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc @@ -88,7 +88,7 @@ test01() } VERIFY( test ); VERIFY( ul1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc index 503101f..67c9639 100644 --- a/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc +++ b/libstdc++-v3/testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc @@ -88,7 +88,7 @@ test01() } VERIFY( test ); VERIFY( ull1 == 7 ); - VERIFY( idx1 = 1 ); + VERIFY( idx1 == 1 ); try { diff --git a/libstdc++-v3/testsuite/23_containers/map/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/map/cons/from_range.cc index 3a9fede..1453900 100644 --- a/libstdc++-v3/testsuite/23_containers/map/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/map/cons/from_range.cc @@ -61,7 +61,7 @@ constexpr bool is_equal(std::less<T>, std::less<U>) { return true; } constexpr bool is_equal(StateCmp lhs, StateCmp rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } constexpr auto get0 = [](auto const& t) { using std::get; @@ -103,12 +103,12 @@ do_test(Alloc alloc, Cmp cmp) std::map<K, V, Cmp, Alloc> m4(std::from_range, Range(a, a+4), cmp); VERIFY( eq(m4, {a, 4}) ); VERIFY( m4.get_allocator() == Alloc() ); - VERIFY( is_equal(m4.key_comp(), Cmp()) ); + VERIFY( is_equal(m4.key_comp(), cmp) ); std::map<K, V, Cmp, Alloc> m9(std::from_range, Range(a, a+9), alloc); VERIFY( eq(m9, {a, 9}) ); VERIFY( m9.get_allocator() == alloc ); - VERIFY( is_equal(m9.key_comp(), cmp) ); + VERIFY( is_equal(m9.key_comp(), Cmp()) ); std::map<K, V, Cmp, Alloc> mr(std::from_range, Range(a, a+14), cmp, alloc); VERIFY( eq(mr, {a, 9}) ); diff --git a/libstdc++-v3/testsuite/23_containers/multimap/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/multimap/cons/from_range.cc index 5907bab..bb79720 100644 --- a/libstdc++-v3/testsuite/23_containers/multimap/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/multimap/cons/from_range.cc @@ -61,7 +61,7 @@ constexpr bool is_equal(std::less<T>, std::less<U>) { return true; } constexpr bool is_equal(StateCmp lhs, StateCmp rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } constexpr auto get0 = [](auto const& t) { using std::get; @@ -103,12 +103,12 @@ do_test(Alloc alloc, Cmp cmp) std::multimap<K, V, Cmp, Alloc> m4(std::from_range, Range(a, a+4), cmp); VERIFY( eq(m4, {a, 4}) ); VERIFY( m4.get_allocator() == Alloc() ); - VERIFY( is_equal(m4.key_comp(), Cmp()) ); + VERIFY( is_equal(m4.key_comp(), cmp) ); std::multimap<K, V, Cmp, Alloc> m9(std::from_range, Range(a, a+9), alloc); VERIFY( eq(m9, {a, 9}) ); VERIFY( m9.get_allocator() == alloc ); - VERIFY( is_equal(m9.key_comp(), cmp) ); + VERIFY( is_equal(m9.key_comp(), Cmp()) ); std::multimap<K, V, Cmp, Alloc> mr(std::from_range, Range(a, a+14), cmp, alloc); VERIFY( eq(mr, {a, 14}) ); diff --git a/libstdc++-v3/testsuite/23_containers/multiset/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/multiset/cons/from_range.cc index cdba7eb..aa9be9c 100644 --- a/libstdc++-v3/testsuite/23_containers/multiset/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/multiset/cons/from_range.cc @@ -48,7 +48,7 @@ constexpr bool is_equal(std::less<T>, std::less<U>) { return true; } constexpr bool is_equal(StateCmp lhs, StateCmp rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } template<typename Range, typename Alloc, typename Cmp> constexpr void @@ -82,12 +82,12 @@ do_test(Alloc alloc, Cmp cmp) std::set<V, Cmp, Alloc> s4(std::from_range, Range(a, a+4), cmp); VERIFY( eq(s4, {a, 4}) ); VERIFY( s4.get_allocator() == Alloc() ); - VERIFY( is_equal(s4.key_comp(), Cmp()) ); + VERIFY( is_equal(s4.key_comp(), cmp) ); std::set<V, Cmp, Alloc> s9(std::from_range, Range(a, a+9), alloc); VERIFY( eq(s9, {a, 9}) ); VERIFY( s9.get_allocator() == alloc ); - VERIFY( is_equal(s9.key_comp(), cmp) ); + VERIFY( is_equal(s9.key_comp(), Cmp()) ); std::set<V, Cmp, Alloc> sr(std::from_range, Range(a, a+14), cmp, alloc); VERIFY( eq(sr, {a, 9}) ); diff --git a/libstdc++-v3/testsuite/23_containers/set/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/set/cons/from_range.cc index efde05d..23922bf 100644 --- a/libstdc++-v3/testsuite/23_containers/set/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/set/cons/from_range.cc @@ -47,7 +47,7 @@ constexpr bool is_equal(std::less<T>, std::less<U>) { return true; } constexpr bool is_equal(StateCmp lhs, StateCmp rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } template<typename Range, typename Alloc, typename Cmp> constexpr void @@ -81,12 +81,12 @@ do_test(Alloc alloc, Cmp cmp) std::set<V, Cmp, Alloc> s4(std::from_range, Range(a, a+4), cmp); VERIFY( eq(s4, {a, 4}) ); VERIFY( s4.get_allocator() == Alloc() ); - VERIFY( is_equal(s4.key_comp(), Cmp()) ); + VERIFY( is_equal(s4.key_comp(), cmp) ); std::set<V, Cmp, Alloc> s9(std::from_range, Range(a, a+9), alloc); VERIFY( eq(s9, {a, 9}) ); VERIFY( s9.get_allocator() == alloc ); - VERIFY( is_equal(s9.key_comp(), cmp) ); + VERIFY( is_equal(s9.key_comp(), Cmp()) ); std::set<V, Cmp, Alloc> sr(std::from_range, Range(a, a+14), cmp, alloc); VERIFY( eq(sr, {a, 9}) ); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/from_range.cc index 04479a5e..cad102e 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/from_range.cc @@ -100,10 +100,10 @@ constexpr bool is_equal(std::equal_to<T>, std::equal_to<U>) { return true; } constexpr bool is_equal(StateHash lhs, StateHash rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } constexpr bool is_equal(StateEq lhs, StateEq rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } template<typename Range, typename Alloc, typename Hash, typename Equal> constexpr void diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/from_range.cc index 4567bd8..ab30e3c 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/from_range.cc @@ -114,10 +114,10 @@ constexpr bool is_equal(std::equal_to<T>, std::equal_to<U>) { return true; } constexpr bool is_equal(StateHash lhs, StateHash rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } constexpr bool is_equal(StateEq lhs, StateEq rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } template<typename Range, typename Alloc, typename Hash, typename Equal> constexpr void diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/from_range.cc index d44598d..ff05471 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/from_range.cc @@ -85,11 +85,11 @@ constexpr bool is_equal(std::equal_to<T>, std::equal_to<U>) { return true; } constexpr bool is_equal(StateHash lhs, StateHash rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } constexpr bool is_equal(StateEq lhs, StateEq rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } template<typename Range, typename Alloc, typename Hash, typename Equal> constexpr void diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/from_range.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/from_range.cc index 8259be8..e00e2fb 100644 --- a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/from_range.cc +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/from_range.cc @@ -84,11 +84,11 @@ constexpr bool is_equal(std::equal_to<T>, std::equal_to<U>) { return true; } constexpr bool is_equal(StateHash lhs, StateHash rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } constexpr bool is_equal(StateEq lhs, StateEq rhs) -{ return lhs.state = rhs.state; } +{ return lhs.state == rhs.state; } template<typename Range, typename Alloc, typename Hash, typename Equal> constexpr void diff --git a/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc b/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc index 270fd45..8f8df43 100644 --- a/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc +++ b/libstdc++-v3/testsuite/25_algorithms/minmax/constrained.cc @@ -101,26 +101,26 @@ test04() auto p = ranges::minmax({1,2}, counted_less{}); VERIFY( counter == 1 ); - VERIFY( p.min = 1 ); - VERIFY( p.max = 2 ); + VERIFY( p.min == 1 ); + VERIFY( p.max == 2 ); counter = 0; p = ranges::minmax({1,2,3}, counted_less{}); VERIFY( counter == 3 ); - VERIFY( p.min = 1 ); - VERIFY( p.max = 3 ); + VERIFY( p.min == 1 ); + VERIFY( p.max == 3 ); counter = 0; p = ranges::minmax({1,2,3,4,5,6,7,8,9,10}, counted_less{}); VERIFY( counter <= 15 ); - VERIFY( p.min = 1 ); - VERIFY( p.max = 10 ); + VERIFY( p.min == 1 ); + VERIFY( p.max == 10 ); counter = 0; p = ranges::minmax({10,9,8,7,6,5,4,3,2,1}, counted_less{}); VERIFY( counter <= 15 ); - VERIFY( p.min = 1 ); - VERIFY( p.max = 10 ); + VERIFY( p.min == 1 ); + VERIFY( p.max == 10 ); } void diff --git a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc index 0f37282..ee3e84d 100644 --- a/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/27_io/manipulators/extended/get_time/wchar_t/1.cc @@ -36,8 +36,8 @@ void test01() tm time1; iss >> get_time(&time1, L"%H:%M:%S %Y"); VERIFY( static_cast<bool>(iss) ); - VERIFY(time1.tm_hour = 12); - VERIFY(time1.tm_min = 1); + VERIFY(time1.tm_hour == 12); + VERIFY(time1.tm_min == 1); VERIFY(time1.tm_sec == 30); VERIFY(time1.tm_year == 71); } |