diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 21 | ||||
-rw-r--r-- | gcc/DATESTAMP | 2 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/pretty-print.cc | 132 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 45 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/mips16e2-cache.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/mips16e2-cmov.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/mips16e2-gp.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/mips16e2.c | 2 |
10 files changed, 216 insertions, 8 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/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 |