GCC 15 Release Series — Changes, New Features, and Fixes
GCC 15 Release Series
Changes, New Features, and Fixes
This page is a "brief" summary of some of the huge number of improvements in GCC 15. You may also want to check out ourPorting to GCC 15 page
Note: GCC 15 has not been released yet, so this document is a work-in-progress.
Caveats
- ...
General Improvements
- The default vectorizer cost model at
-O2
has been enhanced to handle unknown tripcount. But it still disables vectorization of loops when any runtime check for data dependence or alignment is required, it also disables vectorization of epilogue loops but otherwise is equal to the cheap cost model.
New Languages and Language specific improvements
- OpenMP
- Support for unified-shared memory has been added for some AMD and Nvidia GPU devices, enabled when using the
unified_shared_memory
clause to therequires
directive. For details, see the offload-target specifics section in theGNU Offloading and Multi Processing Runtime Library Manual. GCC addedompx_gnu_pinned_mem_alloc
as predefined allocator. On Nvidia GPUs, writing to the terminal from OpenMP target regions (but not from OpenACC compute regions) is now also supported in Fortran; in C/C++ and on AMD GPUs this was already supported before with both OpenMP and OpenACC. Constructors and destructors on the device side fordeclare target
static aggregates are now handled. - OpenMP 5.1: The
unroll
andtile
loop-transformation constructs are now supported. - OpenMP 6.0: The get_device_from_uid and omp_get_uid_from_device API routines have been added.
- Support for unified-shared memory has been added for some AMD and Nvidia GPU devices, enabled when using the
C family
- A musttail statement attribute was added to enforce tail calls.
C++
- Inline assembler statements now supportconstexpr generated strings, analoguous to
static_assert
. - Qualified name lookup failure into the current instantiation, e.g.
this->non_existent
, is now proactively diagnosed when parsing a template.
Runtime Library (libstdc++)
- Debug assertions are now enabled by default for unoptimized builds. Use
-D_GLIBCXX_NO_ASSERTIONS
to override this. - Improved experimental support for C++26, including:
views::concat
.- Member
visit
. - Type-checking
std::format
args.
- Improved experimental support for C++23, including:
- Clarify handling of encodings in localized formatting of chrono types.
Fortran
- Fortran 2023: The
selected_logical_kind
intrinsic function and, in theISO_FORTRAN_ENV
module, the named constantslogical{8,16,32,64}
andreal16
were added. - Experimental support for
unsigned
integers, enabled by-funsigned
; see gfortran documentation for details. These have been proposed (J3/24-116) for inclusion in the next Fortran standard.
New Targets and Target Specific Improvements
AMD Radeon (GCN)
- Support for Fiji (gfx803) devices has been removed (this was already deprecated in GCC 14).
AVR
- Support has been added for the
signal
andinterrupt
function attributes that allow to specify the interrupt vector number as an argument. It allows to use static functions as interrupt handlers, and also functions defined in a C++ namespace. - Support has been added for the
noblock
function attribute. It can be specified together with thesignal
attribute to indicate that the interrupt service routine should start with aSEI
instruction to globally re-enable interrupts. The difference to theinterrupt
attribute is that thenoblock
attribute just acts like a flag and does not impose a specific function name. - Support has been added for the
__builtin_avr_mask1
built-in function. It can be used to compute some bit masks when code like1 << offset
is not fast enough.
IA-32/x86-64
- New ISA extension support for Intel AVX10.2 was added. AVX10.2 intrinsics are available via the
-mavx10.2
or-mavx10.2-256
compiler switch with 256-bit vector size support. 512-bit vector size support for AVX10.2 intrinsics are available via the-mavx10.2-512
compiler switch. - Support for Xeon Phi CPUs (a.k.a. Knight Landing and Knight Mill) were removed in GCC 15. GCC will no longer accept
-march=knl
,-march=knm
,-mavx5124fmaps
,-mavx5124vnniw
,-mavx512er
,-mavx512pf
,-mprefetchwt1
,-mtune=knl
or-mtune=knm
compiler switches.
NVPTX
- GCC's nvptx target now supports constructors and destructors. For this, a recent version of nvptx-tools is required.
SH
- Bare metal
sh-elf
targets are now using the newer soft-fp library for improved performance of floating-point emulation on CPUs without hardware floating-point support.
Operating Systems
PowerPC Darwin
- Fortran's IEEE modules are now suppored on Darwin PowerPC.