aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/extend.texi194
-rw-r--r--gcc/doc/gm2.texi73
-rw-r--r--gcc/doc/install.texi49
-rw-r--r--gcc/doc/invoke.texi209
-rw-r--r--gcc/doc/libgdiagnostics/topics/compatibility.rst9
-rw-r--r--gcc/doc/libgdiagnostics/topics/physical-locations.rst16
-rw-r--r--gcc/doc/md.texi4
-rw-r--r--gcc/doc/options.texi6
-rw-r--r--gcc/doc/riscv-ext.texi4
-rw-r--r--gcc/doc/riscv-mcpu.texi69
-rw-r--r--gcc/doc/riscv-mtune.texi59
-rw-r--r--gcc/doc/sourcebuild.texi8
-rw-r--r--gcc/doc/standards.texi5
-rw-r--r--gcc/doc/tm.texi29
-rw-r--r--gcc/doc/tm.texi.in22
15 files changed, 578 insertions, 178 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 224d619..3c11928 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -6798,6 +6798,11 @@ Enable/disable the generation of RCPSS, RCPPS, RSQRTSS and RSQRTPS
instructions followed an additional Newton-Raphson step instead of
doing a floating-point division.
+@cindex @code{target("80387")} function attribute, x86
+@item 80387
+@itemx no-80387
+Generate code containing 80387 instructions for floating point.
+
@cindex @code{target("general-regs-only")} function attribute, x86
@item general-regs-only
Generate code which uses only the general registers.
@@ -7135,78 +7140,6 @@ align them on any target.
The @code{aligned} attribute can also be used for functions
(@pxref{Common Function Attributes}.)
-@cindex @code{counted_by} variable attribute
-@item counted_by (@var{count})
-The @code{counted_by} attribute may be attached to the C99 flexible array
-member of a structure. It indicates that the number of the elements of the
-array is given by the field "@var{count}" in the same structure as the
-flexible array member.
-
-This attribute is available only in C for now.
-In C++ this attribute is ignored.
-
-GCC may use this information to improve detection of object size information
-for such structures and provide better results in compile-time diagnostics
-and runtime features like the array bound sanitizer and
-the @code{__builtin_dynamic_object_size}.
-
-For instance, the following code:
-
-@smallexample
-struct P @{
- size_t count;
- char other;
- char array[] __attribute__ ((counted_by (count)));
-@} *p;
-@end smallexample
-
-@noindent
-specifies that the @code{array} is a flexible array member whose number of
-elements is given by the field @code{count} in the same structure.
-
-The field that represents the number of the elements should have an
-integer type. Otherwise, the compiler reports an error and ignores
-the attribute.
-
-When the field that represents the number of the elements is assigned a
-negative integer value, the compiler treats the value as zero.
-
-An explicit @code{counted_by} annotation defines a relationship between
-two objects, @code{p->array} and @code{p->count}, and there are the
-following requirements on the relationship between this pair:
-
-@itemize @bullet
-@item
-@code{p->count} must be initialized before the first reference to
-@code{p->array};
-
-@item
-@code{p->array} has @emph{at least} @code{p->count} number of elements
-available all the time. This relationship must hold even after any of
-these related objects are updated during the program.
-@end itemize
-
-It's the programmer's responsibility to make sure the above requirements to
-be kept all the time. Otherwise the compiler reports warnings and
-the results of the array bound sanitizer and the
-@code{__builtin_dynamic_object_size} built-in are undefined.
-
-One important feature of the attribute is that a reference to the flexible
-array member field uses the latest value assigned to the field that
-represents the number of the elements before that reference. For example,
-
-@smallexample
- p->count = val1;
- p->array[20] = 0; // ref1 to p->array
- p->count = val2;
- p->array[30] = 0; // ref2 to p->array
-@end smallexample
-
-@noindent
-In the above, @code{ref1} uses @code{val1} as the number of the elements in
-@code{p->array}, and @code{ref2} uses @code{val2} as the number of elements
-in @code{p->array}.
-
@cindex @code{alloc_size} variable attribute
@item alloc_size (@var{position})
@itemx alloc_size (@var{position-1}, @var{position-2})
@@ -7286,6 +7219,109 @@ but not attributes that affect a symbol's linkage or visibility such as
attribute is also not copied. @xref{Common Function Attributes}.
@xref{Common Type Attributes}.
+@cindex @code{counted_by} variable attribute
+@item counted_by (@var{count})
+The @code{counted_by} attribute may be attached to the C99 flexible array
+member, or a pointer field of a structure. It indicates that the number
+of the elements of the array that is held by the flexible array member
+field, or is pointed to by the pointer field, is given by the field
+"@var{count}" in the same structure as the flexible array member or the
+pointer field.
+
+This attribute is available only in C for now.
+In C++ this attribute is ignored.
+
+GCC may use this information to improve detection of object size information
+for such structures and provide better results in compile-time diagnostics
+and runtime features like the array bound sanitizer and
+the @code{__builtin_dynamic_object_size}.
+
+For instance, the following code:
+
+@smallexample
+struct P @{
+ size_t count;
+ char other;
+ char array[] __attribute__ ((counted_by (count)));
+@} *p;
+@end smallexample
+
+@noindent
+specifies that the @code{array} is a flexible array member whose number
+of elements is given by the field @code{count} in the same structure.
+
+@smallexample
+struct PP @{
+ size_t count2;
+ char other1;
+ char *array2 __attribute__ ((counted_by (count2)));
+ int other2;
+@} *pp;
+@end smallexample
+
+@noindent
+specifies that the @code{array2} is an array that is pointed by the
+pointer field, and its number of elements is given by the field
+@code{count2} in the same structure.
+
+The field that represents the number of the elements should have an
+integer type. Otherwise, the compiler reports an error and ignores
+the attribute.
+
+When the field that represents the number of the elements is assigned a
+negative integer value, the compiler treats the value as zero.
+
+The @code{counted_by} attribute is not allowed for a pointer to @code{void},
+a pointer to function, or a pointer to a structure or union that includes
+a flexible array member. However, it is allowed for a pointer to
+non-void incomplete structure or union types, as long as the type could
+be completed before the first reference to the pointer.
+
+An explicit @code{counted_by} annotation defines a relationship between
+two objects, @code{p->array} and @code{p->count}, and there are the
+following requirements on the relationship between this pair:
+
+@itemize @bullet
+@item
+@code{p->count} must be initialized before the first reference to
+@code{p->array};
+
+@item
+@code{p->array} has @emph{at least} @code{p->count} number of elements
+available all the time. This relationship must hold even after any of
+these related objects are updated during the program.
+@end itemize
+
+In addition to the above requirements, there is one more requirement
+between this pair if and only if @code{p->array} is an array that is
+pointed by the pointer field:
+
+@code{p->array} and @code{p->count} can only be changed by changing the
+whole structure at the same time.
+
+It's the programmer's responsibility to make sure the above requirements to
+be kept all the time. Otherwise the compiler reports warnings and
+the results of the array bound sanitizer and the
+@code{__builtin_dynamic_object_size} built-in are undefined.
+
+One important feature of the attribute is that a reference to the flexible
+array member field uses the latest value assigned to the field that
+represents the number of the elements before that reference. For example,
+
+@smallexample
+ p->count = val1;
+ p->array[20] = 0; // ref1 to p->array
+ p->count = val2;
+ p->array[30] = 0; // ref2 to p->array
+@end smallexample
+
+@noindent
+In the above, @code{ref1} uses @code{val1} as the number of the elements in
+@code{p->array}, and @code{ref2} uses @code{val2} as the number of elements
+in @code{p->array}.
+
+Note, however, the above feature is not valid for the pointer field.
+
@cindex @code{deprecated} variable attribute
@item deprecated
@itemx deprecated (@var{msg})
@@ -16487,8 +16523,9 @@ invoke undefined behavior at run time. Warnings for out of bound
accesses for vector subscription can be enabled with
@option{-Warray-bounds}.
-Vector comparison is supported with standard comparison
-operators: @code{==, !=, <, <=, >, >=}. Comparison operands can be
+Vector comparison is supported with standard comparison operators:
+@code{==}, @code{!=}, @code{<}, @code{<=}, @code{>}, and
+@code{>=}. Comparison operands can be
vector expressions of integer-type or real-type. Comparison between
integer-type vectors and real-type vectors are not supported. The
result of the comparison is a vector of the same width and number of
@@ -17216,7 +17253,8 @@ is computed.
@smallexample
struct V @{ char buf1[10]; int b; char buf2[10]; @} var;
-char *p = &var.buf1[1], *q = &var.b;
+char *p = &var.buf1[1];
+int *q = &var.b;
/* Here the object p points to is var. */
assert (__builtin_object_size (p, 0) == sizeof (var) - 1);
@@ -30815,6 +30853,12 @@ A binary type trait: @code{true} whenever the @var{type1} and
@var{type2} refer to the same type.
@enddefbuiltin
+@defbuiltin{size_t __builtin_structured_binding_size (@var{type})}
+This trait returns the structured binding size ([dcl.struct.bind])
+of @var{type}. If a type does not have a structured binding size,
+an error is diagnosed unless it is used in SFINAE contexts.
+@enddefbuiltin
+
@node Deprecated Features
@section Deprecated Features
diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi
index 9bd0f0d..d908aea 100644
--- a/gcc/doc/gm2.texi
+++ b/gcc/doc/gm2.texi
@@ -143,11 +143,7 @@ available and access to assembly programming is achieved using the
same syntax as that used by GCC.
The gm2 driver allows third party libraries to be installed alongside
-gm2 libraries. For example if the user specifies library @code{foo}
-using @code{-flibs=foo} the driver will check the standard GCC install
-directory for a sub directory @code{foo} containing the library
-contents. The library module search path is altered accordingly
-for compile and link.
+gm2 libraries. @xref{Module Search Path}.
@node Development, Features, Why use GNU Modula-2, Overview
@section How to get source code using git
@@ -229,6 +225,7 @@ such as the AVR and the ARM).
* Standard procedures:: Permanently accessible base procedures.
* High procedure function:: Behavior of the high procedure function.
* Dialect:: GNU Modula-2 supported dialects.
+* Module Search Path:: How to add library modules.
* Exceptions:: Exception implementation
* Semantic checking:: How to detect run time problems at compile time.
* Extensions:: GNU Modula-2 language extensions.
@@ -525,6 +522,15 @@ following include paths.
for internal use only: used by the driver to copy the user facing @samp{-I}
option.
+@item -fm2-pathname-root=@file{pathroot}
+add search paths derived from the specified @file{pathroot}.
+@xref{Module Search Path} for examples.
+
+@item -fm2-pathname-rootI
+for internal use only: used by the driver to copy every user
+@samp{-fm2-pathname-root=} facing option in order with all other
+@samp{-I} options.
+
@item -fm2-plugin
insert plugin to identify run time errors at compile time (default on).
@@ -1379,7 +1385,7 @@ Actual parameter | HIGH (a) | a[HIGH (a)] = nul
str3 | 3 | TRUE
@end example
-@node Dialect, Exceptions, High procedure function, Using
+@node Dialect, Module Search Path, High procedure function, Using
@section GNU Modula-2 supported dialects
This section describes the dialects understood by GNU Modula-2.
@@ -1444,6 +1450,43 @@ implemented as above, apart from the exception calling in the ISO
dialect. Instead of exception handling the results are the same as the
PIM4 dialect. This is a temporary implementation situation.
+@node Module Search Path, Exceptions, Dialect, Using
+@section Module Search Path
+
+This section describes the default module search path and how this
+might be changed. By default the compiler will search the current
+directory, local include dir, prefix include dir, gcc version specific
+modules and lastly native system header dir. The exact location and
+whether all these directories are used depends upon the configuration
+options used when building GCC.
+
+The @samp{-I} option option can be used to introduce new directories
+in the module search path and for convenience the options @samp{-flibs=}
+and @samp{-fm2-pathname-root=} are also provided.
+
+The site wide modules are typically located at
+@var{prefix}@file{/include/m2}
+whereas the version specific modules are located in
+@var{libsubdir}@file{/m2}. Both of these @file{/m2} directories
+are organized such that the non dialect specific modules are at the
+top and dialect specific modules are in subdirectories.
+
+The @samp{-fm2-pathname-root=} option is equivalent to adding a
+@samp{-I} path for every library dialect. For example if the library
+dialect order is selected by @samp{-flibs=pim,iso,log} and
+@samp{-fm2-pathname-root=foo} is supplied then this is equivalent to
+the following pairs of options:
+
+@example
+-fm2-pathname=m2pim -I@file{foo/m2/m2pim}
+-fm2-pathname=m2iso -I@file{foo/m2/m2iso}
+-fm2-pathname=m2log -I@file{foo/m2/m2log}
+-fm2-pathname=- -I@file{foo/m2}
+@end example
+
+The option @samp{-fsources} will show the source module, path and
+pathname for each module parsed.
+
@node Exceptions, Semantic checking, Dialect, Using
@section Exception implementation
@@ -2023,7 +2066,7 @@ CONST
VAR
head: List ;
-@end group
+@end group
@end example
@example
@@ -2034,13 +2077,13 @@ VAR
BEGIN
p := head^.next ;
printf ("\nunique data\n");
- printf ("===========\n");
+ printf ("===========\n");
WHILE p # NIL DO
printf ("%d\n", p^.value);
p := p^.next
END
END Display ;
-@end group
+@end group
@end example
@example
@@ -2053,7 +2096,7 @@ BEGIN
next := NIL
END
END Add ;
-@end group
+@end group
@end example
@example
@@ -2075,17 +2118,17 @@ EXCEPT
THEN
printf ("list was empty, add sentinal\n");
Add (head, -1) ;
- RETRY (* Jump back to the begin statement. *)
+ RETRY (* Jump back to the begin statement. *)
ELSIF p^.next = NIL
THEN
printf ("growing the list\n");
Add (p^.next, val) ;
RETRY (* Jump back to the begin statement. *)
ELSE
- printf ("should never reach here!\n");
+ printf ("should never reach here!\n");
END
END Unique ;
-@end group
+@end group
@end example
@example
@@ -2104,7 +2147,7 @@ BEGIN
head := NIL ;
unique
END lazyunique.
-@end group
+@end group
@end example
@example
@@ -2127,7 +2170,7 @@ unique data
0
2
1
-@end group
+@end group
@end example
@node Unbounded by reference, Building a shared library, Exception handling, Using
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index 09ea87a..c399b1f 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -302,7 +302,7 @@ released on 2017-05-06.
The gcobol documentation is maintained as manpages using troff
mdoc. GNU groff is required to convert them to PDF format. Conversion
to HTML is done with mandoc, available at
-@uref{http://mdocml.bsd.lv/}.
+@uref{https://mandoc.bsd.lv}.
Because ISO COBOL defines strict requirements for numerical precision,
gcobol requires hardware with 128-bit computation instructions. This
@@ -393,7 +393,7 @@ Note binutils 2.35 or newer is required for LTO to work correctly
with GNU libtool that includes doing a bootstrap with LTO enabled.
@item gzip version 1.2.4 (or later) or
-@itemx bzip2 version 1.0.2 (or later)
+@itemx xz version 5.0 (or later)
Necessary to uncompress GCC @command{tar} files when source code is
obtained via HTTPS mirror sites.
@@ -1254,6 +1254,9 @@ descriptor-based dialect.
For RISC-V targets, possible values for @var{dialect} are @code{trad} or
@code{desc}, which select between the traditional GNU dialect and the GNU TLS
descriptor-based dialect.
+For i386, x86-64 targets, possible values for @var{dialect} are @code{gnu} or
+@code{gnu2}, which select between the original GNU dialect and the GNU TLS
+descriptor-based dialect.
@item --enable-multiarch
Specify whether to enable or disable multiarch support. The default is
@@ -1558,23 +1561,23 @@ for riscv*-*-elf*. The accepted values and meanings are given below.
Every config is constructed with four components: architecture string, ABI,
reuse rule with architecture string and reuse rule with sub-extension.
-Example 1: Add multi-lib suppport for rv32i with ilp32.
+Example 1: Add multi-lib support for rv32i with ilp32.
@smallexample
rv32i-ilp32--
@end smallexample
-Example 2: Add multi-lib suppport for rv32i with ilp32 and rv32imafd with ilp32.
+Example 2: Add multi-lib support for rv32i with ilp32 and rv32imafd with ilp32.
@smallexample
rv32i-ilp32--;rv32imafd-ilp32--
@end smallexample
-Example 3: Add multi-lib suppport for rv32i with ilp32; rv32im with ilp32 and
+Example 3: Add multi-lib support for rv32i with ilp32; rv32im with ilp32 and
rv32ic with ilp32 will reuse this multi-lib set.
@smallexample
rv32i-ilp32-rv32im-c
@end smallexample
-Example 4: Add multi-lib suppport for rv64ima with lp64; rv64imaf with lp64,
+Example 4: Add multi-lib support for rv64ima with lp64; rv64imaf with lp64,
rv64imac with lp64 and rv64imafc with lp64 will reuse this multi-lib set.
@smallexample
rv64ima-lp64--f,c,fc
@@ -1585,13 +1588,13 @@ rv64ima-lp64--f,c,fc
config options, @var{val} is a comma separated list of possible code model,
currently we support medlow and medany.
-Example 5: Add multi-lib suppport for rv64ima with lp64; rv64ima with lp64 and
+Example 5: Add multi-lib support for rv64ima with lp64; rv64ima with lp64 and
medlow code model
@smallexample
rv64ima-lp64--;--cmodel=medlow
@end smallexample
-Example 6: Add multi-lib suppport for rv64ima with lp64; rv64ima with lp64 and
+Example 6: Add multi-lib support for rv64ima with lp64; rv64ima with lp64 and
medlow code model; rv64ima with lp64 and medany code model
@smallexample
rv64ima-lp64--;--cmodel=medlow,medany
@@ -1720,7 +1723,7 @@ libraries. This option is only supported on Epiphany targets.
@item --with-fpmath=@var{isa}
This options sets @option{-mfpmath=sse} by default and specifies the default
-ISA for floating-point arithmetics. You can select either @samp{sse} which
+ISA for floating-point arithmetic. You can select either @samp{sse} which
enables @option{-msse2} or @samp{avx} which enables @option{-mavx} by default.
This option is only supported on i386 and x86-64 targets.
@@ -1887,8 +1890,8 @@ Produce code conforming to version 20191213.
In the absence of this configuration option the default version is 20191213.
@item --enable-__cxa_atexit
-Define if you want to use @code{__cxa_atexit}, rather than atexit, to
-register C++ destructors for local statics and global objects.
+Define if you want to use @code{__cxa_atexit}, rather than @code{atexit},
+to register C++ destructors for local statics and global objects.
This is essential for fully standards-compliant handling of
destructors, but requires @code{__cxa_atexit} in libc. This option is
currently only available on systems with GNU libc. When enabled, this
@@ -3800,8 +3803,7 @@ Microsoft Windows:
@item
The @uref{https://sourceware.org/cygwin/,,Cygwin} project;
@item
-The @uref{https://osdn.net/projects/mingw/,,MinGW} and
-@uref{https://www.mingw-w64.org/,,mingw-w64} projects.
+the @uref{https://www.mingw-w64.org/,,mingw-w64} project.
@end itemize
@item
@@ -4062,9 +4064,15 @@ AMD GCN GPU target.
Instead of GNU Binutils, you need to install LLVM and copy
@file{bin/llvm-mc} to @file{amdgcn-amdhsa/bin/as},
@file{bin/lld} to @file{amdgcn-amdhsa/bin/ld},
+@file{bin/llvm-objdump} to @file{amdgcn-amdhsa/bin/objdump},
@file{bin/llvm-nm} to @file{amdgcn-amdhsa/bin/nm}, and
@file{bin/llvm-ar} to both @file{bin/amdgcn-amdhsa-ar} and
-@file{bin/amdgcn-amdhsa-ranlib}.
+@file{bin/amdgcn-amdhsa-ranlib}. The LLVM version is required for the
+assembler (llvm-mc) and linker (lld); however, for the others, the respective
+GNU Binutils counterpart can be used instead. While all mentioned programs are
+required when building GCC, the installed GCC compiler only needs the assembler
+and linker; @code{nm}, @code{ar}, and @code{ranlib} are required when installing
+@code{gcc-nm}, @code{gcc-ar}, and @code{gcc-ranlib}.
The required version of LLVM depends on the devices that you want to support.
As the list of ISAs is long, GCC by default only builds a subset of the
@@ -4088,12 +4096,12 @@ ISA targets @code{gfx9-generic}, @code{gfx10-3-generic}, and
@code{gfx11-generic} reduce the number of required multilibs but note
that @code{gfx9-generic} does not include @code{gfx908} or @code{gfx90a},
that linking specific ISA code with generic code is currently not supported,
-and that only a future ROCm release (newer than 6.3.3) will be able to execute
-generic code.
+and that only ROCm 6.4.0 or newer is able to execute generic code.
Use Newlib (4.3.0 or newer; 4.4.0 contains some improvements and 4.5.0 fixes
the device console output for GFX10 and GFX11 devices; post-4.5.0
-commit 2ef1a37e7 [Mar 25, 2025] fixes a SIMD math issue).
+commits 2ef1a37e7 [Mar 25, 2025], f13e8e215 [Aug 8, 2025], and
+bd409f3c1 [Aug 27, 2025] fix SIMD math issues).
To run the binaries, install the HSA Runtime from the
@uref{https://rocm.docs.amd.com/,,ROCm Platform}, and use
@@ -5164,13 +5172,6 @@ respects, this target is the same as the
@anchor{windows}
@heading Microsoft Windows
-@subheading Intel 16-bit versions
-The 16-bit versions of Microsoft Windows, such as Windows 3.1, are not
-supported.
-
-However, the 32-bit port has limited support for Microsoft
-Windows 3.11 in the Win32s environment, as a target only. See below.
-
@subheading Intel 32-bit versions
The 32-bit versions of Windows, including Windows 95, Windows NT, Windows
XP, and Windows Vista, are supported by several different target
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 0980230..c0b7aab 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -268,7 +268,7 @@ in the following sections.
-Wrange-loop-construct -Wredundant-move -Wredundant-tags
-Wreorder -Wregister -Wno-sfinae-incomplete
-Wstrict-null-sentinel -Wno-subobject-linkage -Wtemplates
--Wno-non-template-friend -Wold-style-cast
+-Wno-non-c-typedef-for-linkage -Wno-non-template-friend -Wold-style-cast
-Woverloaded-virtual -Wno-pmf-conversions -Wself-move -Wsign-promo
-Wsized-deallocation -Wsuggest-final-methods
-Wsuggest-final-types -Wsuggest-override -Wno-template-body
@@ -322,6 +322,9 @@ Objective-C and Objective-C++ Dialects}.
-fno-diagnostics-show-cwe
-fno-diagnostics-show-rules
-fno-diagnostics-show-highlight-colors
+-fno-diagnostics-show-nesting
+-fno-diagnostics-show-nesting-locations
+-fdiagnostics-show-nesting-levels
-fdiagnostics-minimum-margin-width=@var{width}
-fdiagnostics-parseable-fixits -fdiagnostics-generate-patch
-fdiagnostics-show-template-tree -fno-elide-type
@@ -331,7 +334,8 @@ Objective-C and Objective-C++ Dialects}.
-fdiagnostics-column-unit=@r{[}display@r{|}byte@r{]}
-fdiagnostics-column-origin=@var{origin}
-fdiagnostics-escape-format=@r{[}unicode@r{|}bytes@r{]}
--fdiagnostics-text-art-charset=@r{[}none@r{|}ascii@r{|}unicode@r{|}emoji@r{]}}
+-fdiagnostics-text-art-charset=@r{[}none@r{|}ascii@r{|}unicode@r{|}emoji@r{]}
+-fdiagnostics-show-context@r{[}=@var{depth}@r{]}}
@item Warning Options
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@@ -388,6 +392,7 @@ Objective-C and Objective-C++ Dialects}.
-Winit-self -Winline -Wno-int-conversion -Wint-in-bool-context
-Wno-int-to-pointer-cast -Wno-invalid-memory-model
-Winvalid-pch -Winvalid-utf8 -Wno-unicode -Wjump-misses-init
+-Wkeyword-macro
-Wlarger-than=@var{byte-size} -Wleading-whitespace=@var{kind}
-Wlogical-not-parentheses -Wlogical-op
-Wlong-long -Wno-lto-type-mismatch -Wmain -Wmaybe-uninitialized
@@ -915,7 +920,7 @@ Objective-C and Objective-C++ Dialects}.
@emph{AVR Options} (@ref{AVR Options})
@gccoptlist{-mmcu=@var{mcu} -mabsdata -maccumulate-args -mcvt
-mbranch-cost=@var{cost} -mfuse-add=@var{level} -mfuse-move=@var{level}
--mcall-prologues -mgas-isr-prologues -mint8 -mflmap
+-mfuse-move2 -mcall-prologues -mgas-isr-prologues -mint8 -mflmap
-mdouble=@var{bits} -mlong-double=@var{bits} -mno-call-main
-mn_flash=@var{size} -mfract-convert-truncate -mno-interrupts
-mmain-is-OS_task -mrelax -mrmw -mstrict-X -mtiny-stack
@@ -1098,7 +1103,8 @@ Objective-C and Objective-C++ Dialects}.
-mcmodel=@var{code-model} -mrelax -mpass-mrelax-to-as
-mrecip -mrecip=@var{opt} -mfrecipe -mno-frecipe -mdiv32 -mno-div32
-mlam-bh -mno-lam-bh -mlamcas -mno-lamcas -mld-seq-sa -mno-ld-seq-sa
--mtls-dialect=@var{opt} -mannotate-tablejump -mno-annotate-tablejump}
+-mscq -mno-scq -mtls-dialect=@var{opt}
+-mannotate-tablejump -mno-annotate-tablejump}
@emph{M32C Options} (@ref{M32C Options})
@gccoptlist{-mcpu=@var{cpu} -msim -memregs=@var{number}}
@@ -1259,7 +1265,7 @@ See RS/6000 and PowerPC Options.
@emph{PRU Options} (@ref{PRU Options})
@gccoptlist{-mmcu=@var{mcu} -minrt -mno-relax -mloop
--mabi=@var{variant}}
+-mmul -mfillzero -mabi=@var{variant}}
@emph{RISC-V Options} (@ref{RISC-V Options})
@gccoptlist{-mbranch-cost=@var{N-instruction}
@@ -3016,8 +3022,9 @@ Version 20, which first appeared in G++ 15, fixes manglings of lambdas
in static data member initializers.
Version 21, which first appeared in G++ 16, fixes unnecessary captures
-in noexcept lambdas (c++/119764) and layout of a base class
-with all explicitly defaulted constructors (c++/120012).
+in noexcept lambdas (c++/119764), layout of a base class with all explicitly
+defaulted constructors (c++/120012), and mangling of class and array
+objects with implicitly zero-initialized non-trailing subobjects (c++/121231).
See also @option{-Wabi}.
@@ -4489,6 +4496,28 @@ to @code{__null}. Although it is a null pointer constant rather than a
null pointer, it is guaranteed to be of the same size as a pointer.
But this use is not portable across different compilers.
+@opindex Wno-non-c-typedef-for-linkage
+@opindex Wnon-c-typedef-for-linkage
+@item -Wno-non-c-typedef-for-linkage @r{(C++ and Objective-C++ only)}
+Disable pedwarn for unnamed classes with a typedef name for linkage purposes
+containing C++ specific members, base classes, default member initializers
+or lambda expressions, including those on nested member classes.
+
+@smallexample
+typedef struct @{
+ int a; // non-static data members are ok
+ struct T @{ int b; @}; // member classes too
+ enum E @{ E1, E2, E3 @}; // member enumerations as well
+ int c = 42; // default member initializers are not ok
+ struct U : A @{ int c; @}; // classes with base classes are not ok
+ typedef int V; // typedef is not ok
+ using W = int; // using declaration is not ok
+ decltype([]()@{@}) x; // lambda expressions not ok
+@} S;
+@end smallexample
+
+In all these cases, the tag name S should be added after the struct keyword.
+
@opindex Wno-non-template-friend
@opindex Wnon-template-friend
@item -Wno-non-template-friend @r{(C++ and Objective-C++ only)}
@@ -5427,7 +5456,8 @@ options:
-fdiagnostics-urls=never
-fdiagnostics-path-format=separate-events
-fdiagnostics-text-art-charset=none
--fno-diagnostics-show-event-links}
+-fno-diagnostics-show-event-links
+-fno-diagnostics-show-nesting}
In the future, if GCC changes the default appearance of its diagnostics, the
corresponding option to disable the new behavior will be added to this list.
@@ -5764,6 +5794,22 @@ left margin.
This option controls the minimum width of the left margin printed by
@option{-fdiagnostics-show-line-numbers}. It defaults to 6.
+@opindex fdiagnostics-show-context
+@item -fdiagnostics-show-context[=@var{depth}]
+@itemx -fno-diagnostics-show-context
+With this option, the compiler might print the interesting control flow
+chain that guards the basic block of the statement which has the warning.
+@var{depth} is the maximum depth of the control flow chain.
+Currently, The list of the impacted warning options includes:
+@option{-Warray-bounds}, @option{-Wstringop-overflow},
+@option{-Wstringop-overread}, @option{-Wstringop-truncation}.
+and @option{-Wrestrict}.
+More warning options might be added to this list in future releases.
+The forms @option{-fdiagnostics-show-context} and
+@option{-fno-diagnostics-show-context} are aliases for
+@option{-fdiagnostics-show-context=1} and
+@option{-fdiagnostics-show-context=0}, respectively.
+
@opindex fdiagnostics-parseable-fixits
@item -fdiagnostics-parseable-fixits
Emit fix-it hints in a machine-parseable format, suitable for consumption
@@ -6049,6 +6095,40 @@ emoji variant of the character).
The default is @samp{emoji}, except when the environment variable @env{LANG}
is set to @samp{C}, in which case the default is @samp{ascii}.
+@opindex fno-diagnostics-show-nesting
+@opindex fdiagnostics-show-nesting
+@item -fno-diagnostics-show-nesting
+Some GCC diagnostics have an internal tree-like structure of nested
+sub-diagnostics, such as for problems when instantiating C++ templates.
+
+By default GCC uses indentation and bullet points in its text output to
+show the nesting structure of these diagnostics, moves location
+information to separate lines to make the structure clearer, and
+eliminates redundant repeated information.
+
+Selecting @option{-fno-diagnostics-show-nesting} suppresses this
+indentation, reformatting, and elision, restoring an older `look'' for the
+diagnostics.
+
+@opindex fno-diagnostics-show-nesting-locations
+@opindex fdiagnostics-show-nesting-locations
+@item -fno-diagnostics-show-nesting-locations
+
+When @option{fdiagnostics-show-nesting} is enabled, file names and
+line- and column- numbers are displayed on separate lines from the
+messages. This location information can be disabled altogether with
+@option{-fno-diagnostics-show-nesting-locations}.
+This option exists for use by GCC developers, for writing DejaGnu test cases.
+
+@opindex fdiagnostics-show-nesting-levels
+@opindex fno-diagnostics-show-nesting-levels
+@item -fdiagnostics-show-nesting-levels
+When @option{fdiagnostics-show-nesting} is enabled, use
+@option{fdiagnostics-show-nesting-levels} to also display numbers
+showing the depth of the nesting.
+This option exists for use by GCC developers for debugging nested
+diagnostics, but may be of use to plugin authors.
+
@opindex fdiagnostics-format
@item -fdiagnostics-format=@var{FORMAT}
Select a different format for printing diagnostics.
@@ -6097,18 +6177,18 @@ Supported keys are:
Override colorization settings from @option{-fdiagnostics-color} for this
text output.
-@item experimental-nesting=@r{[}yes@r{|}no@r{]}
-Enable an experimental mode that emphasizes hierarchical relationships
-within diagnostics messages, displaying location information on separate
-lines.
+@item show-nesting=@r{[}yes@r{|}no@r{]}
+Enable a mode that emphasizes hierarchical relationships
+within diagnostics messages, as per @option{-fdiagnostics-show-nesting}.
+Defaults to @code{yes}.
-@item experimental-nesting-show-locations=@r{[}yes@r{|}no@r{]}
-If @code{experimental-nesting=yes}, then by default locations are
+@item show-nesting-locations=@r{[}yes@r{|}no@r{]}
+If @code{show-nesting=yes}, then by default locations are
shown; set this key to @code{no} to disable printing such locations.
This exists for use by GCC developers, for writing DejaGnu test cases.
-@item experimental-nesting-show-levels=@r{[}yes@r{|}no@r{]}
-This is a debugging option for use with @code{experimental-nesting=yes}.
+@item show-nesting-levels=@r{[}yes@r{|}no@r{]}
+This is a debugging option for use with @code{show-nesting=yes}.
Set this key to @code{yes} to print explicit nesting levels in the output.
This exists for use by GCC developers.
@@ -10398,6 +10478,14 @@ Do not warn if certain built-in macros are redefined. This suppresses
warnings for redefinition of @code{__TIMESTAMP__}, @code{__TIME__},
@code{__DATE__}, @code{__FILE__}, and @code{__BASE_FILE__}.
+@opindex Wkeyword-macro
+@opindex Wno-keyword-macro
+@item -Wkeyword-macro
+Warn if a keyword is defined as a macro or undefined.
+For C++ identifiers with special meaning or standard attribute identifiers
+are diagnosed as well. This warning is enabled by default for C++26
+if @code{-Wpedantic} and emits a pedwarn in that case.
+
@opindex Wfree-labels
@opindex Wno-free-labels
@item -Wfree-labels @r{(C and Objective-C only)}
@@ -15563,7 +15651,7 @@ If omitted, it defaults to @file{fbdata.afdo} in the current directory.
Producing an AutoFDO profile data file requires running your program
with the @command{perf} utility on a supported GNU/Linux target system.
-For more information, see @uref{https://perf.wiki.kernel.org/}.
+For more information, see @uref{https://perfwiki.github.io/main/}.
E.g.
@smallexample
@@ -17784,6 +17872,9 @@ Instructions number above which STFL stall penalty can be compensated.
The maximum number of use and def visits when discovering a STV chain before
the discovery is aborted.
+@item ix86-vect-unroll-limit
+Limit how much the autovectorizer may unroll a loop.
+
@end table
@end table
@@ -20612,18 +20703,22 @@ LTO output files.
@opindex fdump-rtl-@var{pass}
@item -d@var{letters}
@itemx -fdump-rtl-@var{pass}
-@itemx -fdump-rtl-@var{pass}=@var{filename}
+@itemx -fdump-rtl-@var{pass}-@var{options}
+@itemx -fdump-rtl-@var{pass}-@var{options}=@var{filename}
Says to make debugging dumps during compilation at times specified by
-@var{letters}. This is used for debugging the RTL-based passes of the
+@var{letters} when using @option{-d} or by @var{pass} when using
+@option{-fdump-rtl}. This is used for debugging the RTL-based passes of the
compiler.
Some @option{-d@var{letters}} switches have different meaning when
@option{-E} is used for preprocessing. @xref{Preprocessor Options},
for information about preprocessor-specific dump options.
-Debug dumps can be enabled with a @option{-fdump-rtl} switch or some
-@option{-d} option @var{letters}. Here are the possible
-letters for use in @var{pass} and @var{letters}, and their meanings:
+The @samp{-@var{options}} form allows greater control over the details of the
+dump. See @option{-fdump-tree}.
+
+Here are actual instances of command-line options following these patterns and
+their meanings:
@table @gcctabopt
@@ -21150,8 +21245,7 @@ GraphViz to @file{@var{file}.@var{passid}.@var{pass}.dot}. Each function in
the file is pretty-printed as a subgraph, so that GraphViz can render them
all in a single plot.
-This option currently only works for RTL dumps, and the RTL is always
-dumped in slim form.
+RTL is always dumped in slim form.
@item vops
Enable showing virtual operands for every statement.
@item lineno
@@ -22846,7 +22940,7 @@ Compile for the CDNA3 gfx950 devices. (Experimental)
@item gfx9-generic
Compile generic code for Vega devices, executable on the following subset of
-GFX9 devices: gfx900, gfx902, gfx904, gfx906, gfx909 and gfx90c. (Experimental)
+GFX9 devices: gfx900, gfx902, gfx904, gfx906, gfx909 and gfx90c.
@item gfx9-4-generic
Compile generic code for CDNA3 devices, executable on the following subset of
@@ -22875,7 +22969,7 @@ Compile for RDNA2 gfx1036 devices (GFX10 series).
@item gfx10-3-generic
Compile generic code for GFX10-3 devices, executable on gfx1030,
-gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, and gfx1036. (Experimental)
+gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, and gfx1036.
@item gfx1100
Compile for RDNA3 gfx1100 devices (GFX11 series).
@@ -22903,7 +22997,7 @@ Compile for RDNA3 gfx1153 devices (GFX11 series). (Experimental)
@item gfx11-generic
Compile generic code for GFX11 devices, executable on gfx1100, gfx1101,
-gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, and gfx1153. (Experimental)
+gfx1102, gfx1103, gfx1150, gfx1151, gfx1152, and gfx1153.
@end table
@opindex msram-ecc
@@ -25110,6 +25204,10 @@ Valid values for @var{level} are in the range @code{0} @dots{} @code{23}
which is a 3:2:2:2 mixed radix value. Each digit controls some
aspect of the optimization.
+@opindex mfuse-move2
+@item -mfuse-move2
+Run a post combine optimization pass that tries to fuse move instructions.
+
@opindex mstrict-X
@item -mstrict-X
Use address register @code{X} in a way proposed by the hardware. This means
@@ -28496,6 +28594,14 @@ Whether a same-address load-load barrier (@code{dbar 0x700}) is needed. When
build with @option{-march=la664}, it is enabled by default. The default is
@option{-mno-ld-seq-sa}, the load-load barrier is needed.
+@opindex mscq
+@opindex mno-scq
+@item -mscq
+@item -mno-scq
+Use (do not use) the 16-byte conditional store instruction @code{sc.q}.
+The default is @option{-mscq} if the machine type specified with
+@option{-march=} supports this instruction, @option{-mno-scq} otherwise.
+
@opindex mtls-dialect
@item -mtls-dialect=@var{opt}
This option controls which tls dialect may be used for general dynamic and
@@ -31219,6 +31325,14 @@ instead of the @option{--relax} option.
@item -mloop
Allow (or do not allow) GCC to use the LOOP instruction.
+@opindex mmul
+@item -mmul
+Allow (or do not allow) GCC to use the PRU multiplier unit.
+
+@opindex mfillzero
+@item -mfillzero
+Allow (or do not allow) GCC to use the FILL and ZERO instructions.
+
@opindex mabi
@item -mabi=@var{variant}
Specify the ABI variant to output code for. @option{-mabi=ti} selects the
@@ -31329,7 +31443,7 @@ The default is @option{-misa-spec=20191213} unless GCC has been configured
with @option{--with-isa-spec=} specifying a different default version.
@opindex march
-@item -march=@var{ISA-string|Profiles|Profile_ISA-string}
+@item -march=@var{ISA-string|Profiles|Profile_ISA-string|help|unset}
Generate code for given RISC-V ISA or Profiles or a combination of them
(e.g.@: @samp{rv64im} @samp{rvi20u64} @samp{rvi20u64_zbb}). ISA strings and
Profiles must be lower-case. Examples include @samp{rv64i}, @samp{rv32g},
@@ -31340,6 +31454,12 @@ at the beginning of the option, then use underline connect ISA-string (e.g.@:
@option{help} (@option{-march=help}) is accepted to list all supported
extensions.
+@samp{-march=unset} causes the compiler to ignore any @samp{-march=@dots{}} options
+that appear earlier on the command line, behaving as if the option was never
+passed. This is useful for ensuring that the architecture is taken from the
+@samp{-mcpu} option, and it will result in an error if no @samp{-mcpu} option
+is given when @samp{-march=unset} is used.
+
The syntax of the ISA string is defined as follows:
@table @code
@@ -31370,31 +31490,14 @@ When the RISC-V specifications define an extension as depending on other
extensions, GCC will implicitly add the dependent extensions to the enabled
extension set if they weren't added explicitly.
-@opindex mcpu
-@item -mcpu=@var{processor-string}
-Use architecture of and optimize the output for the given processor, specified
-by particular CPU name.
-Permissible values for this option are: @samp{mips-p8700}, @samp{sifive-e20},
-@samp{sifive-e21}, @samp{sifive-e24}, @samp{sifive-e31}, @samp{sifive-e34},
-@samp{sifive-e76}, @samp{sifive-s21}, @samp{sifive-s51}, @samp{sifive-s54},
-@samp{sifive-s76}, @samp{sifive-u54}, @samp{sifive-u74}, @samp{sifive-x280},
-@samp{sifive-xp450}, @samp{sifive-x670}, @samp{thead-c906}, @samp{tt-ascalon-d8},
-@samp{xiangshan-nanhu}, @samp{xiangshan-kunminghu}, @samp{xt-c908}, @samp{xt-c908v},
-@samp{xt-c910}, @samp{xt-c910v2}, @samp{xt-c920}, @samp{xt-c920v2}.
+@include riscv-mcpu.texi
Note that @option{-mcpu} does not override @option{-march} or @option{-mtune}.
-@opindex mtune
-@item -mtune=@var{processor-string}
-Optimize the output for the given processor, specified by microarchitecture or
-particular CPU name. Permissible values for this option are:
-@samp{generic-ooo}, @samp{mips-p8700}, @samp{rocket}, @samp{sifive-3-series},
-@samp{sifive-5-series}, @samp{sifive-7-series}, @samp{size},
-@samp{sifive-p400-series}, @samp{sifive-p600-series}, and all valid options for
-@option{-mcpu=}.
+@include riscv-mtune.texi
When @option{-mtune=} is not specified, use the setting from @option{-mcpu},
-the default is @samp{rocket} if both are not specified.
+the default is @samp{generic} if both are not specified.
The @samp{size} choice is not intended for use by end-users. This is used
when @option{-Os} is specified. It overrides the instruction cost info
@@ -37804,6 +37907,16 @@ compilation which is to be used as input to the next stage: for example,
the output of the preprocessor, which is the input to the compiler
proper.
+@vindex GCC_DIAGNOSTICS_LOG
+@item GCC_DIAGNOSTICS_LOG
+If @env{GCC_DIAGNOSTICS_LOG} is set, then additional information
+about the diagnostics subsystem will be emitted. If it is set to an empty
+value, then the information will be written to stderr; otherwise, GCC will
+attempt to open that file and write the information there.
+
+The precise content and format of the information is subject to change;
+it is intended for use by GCC developers, rather than end-users.
+
@vindex GCC_COMPARE_DEBUG
@item GCC_COMPARE_DEBUG
Setting @env{GCC_COMPARE_DEBUG} is nearly equivalent to passing
diff --git a/gcc/doc/libgdiagnostics/topics/compatibility.rst b/gcc/doc/libgdiagnostics/topics/compatibility.rst
index 0ca41a3..ccf1236 100644
--- a/gcc/doc/libgdiagnostics/topics/compatibility.rst
+++ b/gcc/doc/libgdiagnostics/topics/compatibility.rst
@@ -262,3 +262,12 @@ working with :type:`diagnostic_message_buffer`.
* :func:`diagnostic_add_location_with_label_via_msg_buf`
* :func:`diagnostic_execution_path_add_event_via_msg_buf`
+
+.. _LIBGDIAGNOSTICS_ABI_5:
+
+``LIBGDIAGNOSTICS_ABI_5``
+-------------------------
+
+``LIBGDIAGNOSTICS_ABI_5`` covers the addition of this function:
+
+ * :func:`diagnostic_manager_set_debug_physical_locations`
diff --git a/gcc/doc/libgdiagnostics/topics/physical-locations.rst b/gcc/doc/libgdiagnostics/topics/physical-locations.rst
index be8e7eb..fcd81a0 100644
--- a/gcc/doc/libgdiagnostics/topics/physical-locations.rst
+++ b/gcc/doc/libgdiagnostics/topics/physical-locations.rst
@@ -304,3 +304,19 @@ This diagnostic has three locations
.. code-block:: c
#ifdef LIBDIAGNOSTICS_HAVE_diagnostic_message_buffer
+
+.. function:: void diagnostic_manager_set_debug_physical_locations (diagnostic_manager *mgr, \
+ int value)
+
+ Calling ``diagnostic_manager_set_debug_physical_locations (mgr, 1);``
+ will lead to debugging information being printed to ``stderr`` when
+ creating :type:`diagnostic_physical_location` instances.
+
+ The precise format of these messages is subject to change.
+
+ This function was added in :ref:`LIBGDIAGNOSTICS_ABI_5`; you can
+ test for its presence using
+
+ .. code-block:: c
+
+ #ifdef LIBDIAGNOSTICS_HAVE_diagnostic_manager_set_debug_physical_locations
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index aba93f6..70a2755 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -8595,7 +8595,7 @@ If this pattern is not defined, a call to the library function
@cindex @code{spaceship@var{m}4} instruction pattern
@item @samp{spaceship@var{m}4}
-Initialize output operand 0 with mode of integer type to -1, 0, 1 or 2
+Initialize output operand 0 with mode of integer type to -1, 0, 1 or -128
if operand 1 with mode @var{m} compares less than operand 2, equal to
operand 2, greater than operand 2 or is unordered with operand 2.
Operand 3 should be @code{const0_rtx} if the result is used in comparisons,
@@ -8603,7 +8603,7 @@ Operand 3 should be @code{const0_rtx} if the result is used in comparisons,
is integral unsigned, @code{constm1_rtx} if the result is used as integer
value and the comparison is integral signed and some other @code{CONST_INT}
if the result is used as integer value and the comparison is floating point.
-In the last case, instead of setting output operand 0 to 2 for unordered,
+In the last case, instead of setting output operand 0 to -128 for unordered,
set it to operand 3.
@var{m} should be a scalar floating point mode.
diff --git a/gcc/doc/options.texi b/gcc/doc/options.texi
index b46b997..25cd2bc 100644
--- a/gcc/doc/options.texi
+++ b/gcc/doc/options.texi
@@ -529,6 +529,12 @@ code generation.
@item Param
This is an option that is a parameter.
+@item NoOffload
+This option will not be passed through from the host compiler to any offload
+target compilers via the LTO mechanism. It is intended for use with
+optimization tuning parameters where settings appropriate for the host system
+are likely to harm the performance of the offload device.
+
@item Undocumented
The option is deliberately missing documentation and should not
be included in the @option{--help} output.
diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi
index 572b70e..185084e 100644
--- a/gcc/doc/riscv-ext.texi
+++ b/gcc/doc/riscv-ext.texi
@@ -718,4 +718,8 @@
@tab 1.0
@tab Mips conditional move extension
+@item xmipscbop
+@tab 1.0
+@tab Mips Prefetch extension
+
@end multitable
diff --git a/gcc/doc/riscv-mcpu.texi b/gcc/doc/riscv-mcpu.texi
new file mode 100644
index 0000000..6753e51
--- /dev/null
+++ b/gcc/doc/riscv-mcpu.texi
@@ -0,0 +1,69 @@
+@c Copyright (C) 2025 Free Software Foundation, Inc.
+@c This is part of the GCC manual.
+@c For copying conditions, see the file gcc/doc/include/fdl.texi.
+
+@c This file is generated automatically using
+@c gcc/config/riscv/gen-riscv-mcpu-texi.cc from:
+@c gcc/config/riscv/riscv-cores.def
+
+@c Please *DO NOT* edit manually.
+
+@samp{Core Name}
+
+@opindex mcpu
+@item -mcpu=@var{processor-string}
+Use architecture of and optimize the output for the given processor, specified
+by particular CPU name. Permissible values for this option are:
+
+
+@samp{sifive-e20},
+
+@samp{sifive-e21},
+
+@samp{sifive-e24},
+
+@samp{sifive-e31},
+
+@samp{sifive-e34},
+
+@samp{sifive-e76},
+
+@samp{sifive-s21},
+
+@samp{sifive-s51},
+
+@samp{sifive-s54},
+
+@samp{sifive-s76},
+
+@samp{sifive-u54},
+
+@samp{sifive-u74},
+
+@samp{sifive-x280},
+
+@samp{sifive-p450},
+
+@samp{sifive-p670},
+
+@samp{thead-c906},
+
+@samp{xt-c908},
+
+@samp{xt-c908v},
+
+@samp{xt-c910},
+
+@samp{xt-c910v2},
+
+@samp{xt-c920},
+
+@samp{xt-c920v2},
+
+@samp{tt-ascalon-d8},
+
+@samp{xiangshan-nanhu},
+
+@samp{xiangshan-kunminghu},
+
+@samp{mips-p8700}.
diff --git a/gcc/doc/riscv-mtune.texi b/gcc/doc/riscv-mtune.texi
new file mode 100644
index 0000000..a2a4d3e
--- /dev/null
+++ b/gcc/doc/riscv-mtune.texi
@@ -0,0 +1,59 @@
+@c Copyright (C) 2025 Free Software Foundation, Inc.
+@c This is part of the GCC manual.
+@c For copying conditions, see the file gcc/doc/include/fdl.texi.
+
+@c This file is generated automatically using
+@c gcc/config/riscv/gen-riscv-mtune-texi.cc from:
+@c gcc/config/riscv/riscv-cores.def
+
+@c Please *DO NOT* edit manually.
+
+@samp{Tune Name}
+
+@opindex mtune
+@item -mtune=@var{processor-string}
+Optimize the output for the given processor, specified by microarchitecture or
+particular CPU name. Permissible values for this option are:
+
+
+@samp{generic},
+
+@samp{rocket},
+
+@samp{sifive-3-series},
+
+@samp{sifive-5-series},
+
+@samp{sifive-7-series},
+
+@samp{sifive-p400-series},
+
+@samp{sifive-p600-series},
+
+@samp{tt-ascalon-d8},
+
+@samp{thead-c906},
+
+@samp{xt-c908},
+
+@samp{xt-c908v},
+
+@samp{xt-c910},
+
+@samp{xt-c910v2},
+
+@samp{xt-c920},
+
+@samp{xt-c920v2},
+
+@samp{xiangshan-nanhu},
+
+@samp{xiangshan-kunminghu},
+
+@samp{generic-ooo},
+
+@samp{size},
+
+@samp{mips-p8700},
+
+and all valid options for @option{-mcpu=}.
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index a919304..c001e8e 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 2002-2025 Free Software Foundation, Inc.
+cc Copyright (C) 2002-2025 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -2563,6 +2563,12 @@ Test system has an integer register width of 64 bits.
@item riscv_a
Test target architecture has support for the A extension.
+@item riscv_b_ok
+Test target architecture can execute code with B extension enabled.
+
+@item riscv_v_ok
+Test target architecture can execute code with V extension enabled.
+
@item riscv_zaamo
Test target architecture has support for the zaamo extension.
diff --git a/gcc/doc/standards.texi b/gcc/doc/standards.texi
index 0d765b1..c7c6f28 100644
--- a/gcc/doc/standards.texi
+++ b/gcc/doc/standards.texi
@@ -314,9 +314,8 @@ works with the Apple/NeXT Objective-C runtime library.
There is no formal written standard for Objective-C or Objective-C++@.
The authoritative manual on traditional Objective-C (1.0) is
-``Object-Oriented Programming and the Objective-C Language'':
-@uref{https://gnustep.github.io/@/resources/@/documentation/@/ObjectivCBook.pdf}
-is the original NeXTstep document.
+``Object-Oriented Programming and the Objective-C Language''
+(@uref{https://www.gnustep.org/@/resources/@/documentation/@/ObjectivCBook.pdf}).
The Objective-C exception and synchronization syntax (that is, the
keywords @code{@@try}, @code{@@throw}, @code{@@catch},
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 928578b..3764268 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -37,6 +37,8 @@ through the macros defined in the @file{.h} file.
* Trampolines:: Code set up at run time to enter a nested function.
* Library Calls:: Controlling how library routines are implicitly called.
* Addressing Modes:: Defining addressing modes valid for memory operands.
+* Vectorization:: Controlling how the vectorizer operates.
+* OpenMP and OpenACC:: Defining how OpenMP and OpenACC features should work.
* Anchored Addresses:: Defining how @option{-fsection-anchors} should work.
* Condition Code:: Defining how insns update the condition code.
* Costs:: Defining relative costs of different operations.
@@ -1424,10 +1426,10 @@ the smaller of @var{computed} and @code{BIGGEST_ALIGNMENT}
@defmac MAX_FIXED_MODE_SIZE
An integer expression for the size in bits of the largest integer
-machine mode that should actually be used. All integer machine modes of
-this size or smaller can be used for structures and unions with the
-appropriate sizes. If this macro is undefined, @code{GET_MODE_BITSIZE
-(DImode)} is assumed.
+machine mode that should actually be used by GCC internally.
+All integer machine modes of this size or smaller can be used for
+structures and unions with the appropriate sizes. If this macro is
+undefined, @code{MAX (BITS_PER_WORD * 2, 64)} is assumed.
@end defmac
@defmac STACK_SAVEAREA_MODE (@var{save_level})
@@ -6282,6 +6284,10 @@ reciprocal of the machine-specific builtin function @var{fndecl}, or
@code{NULL_TREE} if such a function is not available.
@end deftypefn
+@node Vectorization
+@section Vectorization
+@cindex Vectorization
+
@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD (void)
This hook should return the DECL of a function @var{f} that given an
address @var{addr} as an argument returns a mask @var{m} that can be
@@ -6513,6 +6519,19 @@ The default is @code{NULL_TREE} which means to not vectorize scatter
stores.
@end deftypefn
+@deftypefn {Target Hook} bool TARGET_VECTORIZE_PREFER_GATHER_SCATTER (machine_mode @var{mode}, int @var{scale}, unsigned int @var{group_size})
+This hook returns TRUE if gather loads or scatter stores are cheaper on
+this target than a sequence of elementwise loads or stores. The @var{mode}
+and @var{scale} correspond to the @code{gather_load} and
+@code{scatter_store} instruction patterns. The @var{group_size} is the
+number of scalar elements in each scalar loop iteration that are to be
+combined into the vector.
+@end deftypefn
+
+@node OpenMP and OpenACC
+@section OpenMP and OpenACC
+@cindex OpenMP and OpenACC
+
@deftypefn {Target Hook} int TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN (struct cgraph_node *@var{}, struct cgraph_simd_clone *@var{}, @var{tree}, @var{int}, @var{bool})
This hook should set @var{vecsize_mangle}, @var{vecsize_int}, @var{vecsize_float}
fields in @var{simd_clone} structure pointed by @var{clone_info} argument and also
@@ -12862,7 +12881,7 @@ At preset, this feature does not support address spaces. It also requires
@code{Pmode} to be the same as @code{ptr_mode}.
@end deftypefn
-@deftypefn {Target Hook} uint8_t TARGET_MEMTAG_TAG_SIZE ()
+@deftypefn {Target Hook} uint8_t TARGET_MEMTAG_TAG_BITSIZE ()
Return the size of a tag (in bits) for this platform.
The default returns 8.
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index eccc4d8..c3ed9a9 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -37,6 +37,8 @@ through the macros defined in the @file{.h} file.
* Trampolines:: Code set up at run time to enter a nested function.
* Library Calls:: Controlling how library routines are implicitly called.
* Addressing Modes:: Defining addressing modes valid for memory operands.
+* Vectorization:: Controlling how the vectorizer operates.
+* OpenMP and OpenACC:: Defining how OpenMP and OpenACC features should work.
* Anchored Addresses:: Defining how @option{-fsection-anchors} should work.
* Condition Code:: Defining how insns update the condition code.
* Costs:: Defining relative costs of different operations.
@@ -1251,10 +1253,10 @@ the smaller of @var{computed} and @code{BIGGEST_ALIGNMENT}
@defmac MAX_FIXED_MODE_SIZE
An integer expression for the size in bits of the largest integer
-machine mode that should actually be used. All integer machine modes of
-this size or smaller can be used for structures and unions with the
-appropriate sizes. If this macro is undefined, @code{GET_MODE_BITSIZE
-(DImode)} is assumed.
+machine mode that should actually be used by GCC internally.
+All integer machine modes of this size or smaller can be used for
+structures and unions with the appropriate sizes. If this macro is
+undefined, @code{MAX (BITS_PER_WORD * 2, 64)} is assumed.
@end defmac
@defmac STACK_SAVEAREA_MODE (@var{save_level})
@@ -4273,6 +4275,10 @@ address; but often a machine-dependent strategy can generate better code.
@hook TARGET_BUILTIN_RECIPROCAL
+@node Vectorization
+@section Vectorization
+@cindex Vectorization
+
@hook TARGET_VECTORIZE_BUILTIN_MASK_FOR_LOAD
@hook TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST
@@ -4311,6 +4317,12 @@ address; but often a machine-dependent strategy can generate better code.
@hook TARGET_VECTORIZE_BUILTIN_SCATTER
+@hook TARGET_VECTORIZE_PREFER_GATHER_SCATTER
+
+@node OpenMP and OpenACC
+@section OpenMP and OpenACC
+@cindex OpenMP and OpenACC
+
@hook TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN
@hook TARGET_SIMD_CLONE_ADJUST
@@ -8124,7 +8136,7 @@ maintainer is familiar with.
@hook TARGET_MEMTAG_CAN_TAG_ADDRESSES
-@hook TARGET_MEMTAG_TAG_SIZE
+@hook TARGET_MEMTAG_TAG_BITSIZE
@hook TARGET_MEMTAG_GRANULE_SIZE