GCC 12.1 Compiler Released With AVX-512 FP16, Better RISC-V Support, More C++23 Features
With a year's worth of changes, GCC 12.1 is a big feature release with a lot of good stuff in it from new C/C++ features to continued work on other languages like Fortran and Ada, supporting the newest CPUs and ISA features across multiple architectures, and advancing GCC's more recent features like the built-in static analyzer and JIT library.
Some of the GCC 12.1 highlights include:
- Continued work on supporting C2X and C++23 and the next versions of C and C++, respectively, both for the compiler and C++ standard library. The C2X and C++23 support is still treated as experimental. The C++20 libstdc++ support has been improved too while still remaining experimental.
- GCC 12 has support for AVX-512 FP16 support for new Intel CPUs.
- Improved support for OpenMP 5.0 with various features added. Some OpenMP 5.1 functionality is also in place.
- OpenACC 2.6 support has continued to be improved upon, including worker parallelism for AMD GPUs.
- On the AMD Radeon GCN targeting front the limitation of only being able to use one wavefront per compute unit was addressed - now up to 40 workgroups per CU and 16 wavefronts per workgroup are supported.
- Ada 2022 language features implemented along with various Ada extensions.
- GCC's RISC-V CPU support continues improving with various new instruction set extensions now supported. RISC-V's vector and scalar crypto extensions were added along with zba, zbb, zbc, and zbs.
- New Arm CPU targets include the Cortex-A510, Ampere-1, Cortex-A710, and Cortex-X2.
- Vectorization is now enabled at the -O2 optimization level with the very-cheap cost model for enhancing performance at that commonly used optimization level.
- The GCC JIT library (libgccjit) has been further improved with various new entry points and new features.
- The new -ftrivial-auto-var-init allows for initializing stack variables implicitly to enhance security.
- There is x86 straight-line speculation (SLS) mitigation support available with the GCC 12 compiler. The Linux kernel is already prepared to make use of this new security option.
- GCC's Fortran "gfortran" front-end now fully supports TS 29113 for interoperability with the C programming language. TS 29113 is the technical specification for increasing interoperability of Fortran with C.
- GCC's static analyzer continues to be improved upon with many new warnings and capabilities.
See gcc.gnu.org for the full list of GCC 12.1 changes. The formal GCC 12.1 release announcement can be read on the GCC mailing list.