This page is a "brief" summary of some of the huge number of improvements in GCC 15. You may also want to check out our Porting to GCC 15 page
Note: GCC 15 has not been released yet, so this document is a work-in-progress.
-mabi=ilp32
) has
been deprecated and will be removed in a future release.
-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.
-ftime-report
now only reports monotonic run time instead of
system and user time. This reduces the overhead of the option significantly,
making it possible to use in standard build systems.
unified_shared_memory
clause to the requires
directive. For details,
see the offload-target specifics section in the
GNU Offloading and Multi Processing Runtime Library Manual.
GCC added ompx_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 for declare target
static aggregates are now handled.
unroll
and tile
loop-transformation constructs are now supported.
get_device_from_uid
and
omp_get_uid_from_device
API routines have been added.
musttail
statement attribute was added to enforce tail calls.#embed
preprocessing directive support
(as an extension enabled in C++ as well).unsequenced
and reproducible
attributes.__STDC_VERSION__
predefined macro value changed
for -std=c23
or -std=gnu23
to
202311L
.-std=c2y
and -std=gnu2y
. Some of these features are also
supported as extensions when compiling for older language versions.
++
and --
on complex values.alignof
of an incomplete array type.__builtin_stdc_rotate_left
and
__builtin_stdc_rotate_right
builtins for use in future
C library <stdbit.h>
headers).if
declarations.<stdlib.h>
headers).constexpr
generated strings,
analoguous to static_assert
.this->non_existent
, is now proactively diagnosed
when parsing a template.
-D_GLIBCXX_NO_ASSERTIONS
to override this.
views::concat
.visit
.std::format
args.selected_logical_kind
intrinsic function
and, in the ISO_FORTRAN_ENV
module, the named constants
logical{8,16,32,64}
and real16
were added.unsigned
integers, enabled by
-funsigned
; see gfortran documentation for details. These have been proposed
(J3/24-116)
for inclusion in the next Fortran standard.signal
and interrupt
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.noblock
function attribute.
It can be specified together with the signal
attribute to
indicate that the interrupt service routine should start with a
SEI
instruction to globally re-enable interrupts.
The difference to the interrupt
attribute is that the
noblock
attribute just acts like a flag and does not
impose a specific function name.__builtin_avr_mask1
built-in function. It can be used to compute some bit masks when
code like 1 << offset
is not fast enough.-mamx-avx512
compiler switch.
-mamx-fp8
compiler switch.
-mamx-movrs
compiler switch.
-mamx-tf32
compiler switch.
-mamx-transpose
compiler switch.
-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.
-mmovrs
compiler switch. 128- and 256- bit MOVRS intrinsics are available via
the -mmovrs -mavx10.2
compiler switch. 512-bit MOVRS
intrinsics are available via the -mmovrs -mavx10.2-512
compiler switch.
-msm4 -mavx10.2-512
compiler switch.
-march=diamondrapids
.
Based on Granite Rapids, the switch further enables the AMX-AVX512,
AMX-FP8, AMX-MOVRS, AMX-TF32, AMX-TRANSPOSE, APX_F, AVX10.2 with 512-bit
support, AVX-IFMA. AVX-NE-CONVERT, AVX-VNNI-INT16, AVX-VNNI-INT8,
CMPccXADD, MOVRS, SHA512, SM3, SM4 and USER_MSR ISA extensions.
-march=knl
,
-march=knm
, -mavx5124fmaps
,
-mavx5124vnniw
, -mavx512er
,
-mavx512pf
, -mprefetchwt1
,
-mtune=knl
, and -mtune=knm
compiler switches.
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.