Bug 1986836

Summary: Update GCC from upstream 11.2 release
Product: Red Hat Enterprise Linux 9 Reporter: Marek Polacek <mpolacek>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: system-version QA Contact: Martin Cermak <mcermak>
Status: CLOSED CURRENTRELEASE Docs Contact: Jacob Taylor Valdez <jvaldez>
Severity: unspecified    
Priority: unspecified CC: ahajkova, dbayly, fweimer, jakub, jvaldez, lkuprova, mcermak, ohudlick, vkadlcik
Version: 9.0Keywords: Bugfix, Triaged
Target Milestone: betaFlags: lkuprova: needinfo? (dbayly)
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-11.2.1-2.1.el9 Doc Type: Enhancement
Doc Text:
.GCC 11.2.1 is available RHEL 9 is distributed with GCC version 11.2.1. Notable bug fixes and enhancements include: *General improvements* * GCC now defaults to the DWARF Version 5 debugging format. * Column numbers shown in diagnostics represent real column numbers by default and respect multicolumn characters. * The straight-line code vectorizer considers the whole function when vectorizing. * A series of conditional expressions that compare the same variable can be transformed into a switch statement if each of them contains a comparison expression. * Interprocedural optimization improvements: ** A new IPA-modref pass, controlled by the `-fipa-modref` option, tracks side effects of function calls and improves the precision of points-to analysis. ** The identical code folding pass, controlled by the `-fipa-icf` option, was significantly improved to increase the number of unified functions and reduce compile-time memory use. * Link-time optimization improvements: ** Link-time optimization (LTO) enables the compiler to perform various optimizations across all translation units of your program by using its intermediate representation at link time. For more information, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/developing_c_and_cpp_applications_in_rhel_9/index#ref_link-time-optimization_using-libraries-with-gcc[Link time optimization]. ** Memory allocation during linking was improved to reduce peak memory use. * Using a new `GCC_EXTRA_DIAGNOSTIC_OUTPUT` environment variable in IDEs, you can request machine-readable “fix-it hints” without adjusting build flags. * The static analyzer, run by the `-fanalyzer` option, is improved significantly with numerous bug fixes and enhancements provided. *Language-specific improvements* *C family* * C and C++ compilers support non-rectangular loop nests in OpenMP constructs and the allocator routines of the OpenMP 5.0 specification. * Attributes: ** The new `no_stack_protector` attribute marks functions that should not be instrumented with stack protection (`-fstack-protector`). ** The improved `malloc` attribute can be used to identify allocator and deallocator API pairs. * New warnings: ** `-Wsizeof-array-div`, enabled by the `-Wall` option, warns about divisions of two `sizeof` operators when the first one is applied to an array and the divisor does not equal the size of the array element. ** `-Wstringop-overread`, enabled by default, warns about calls to string functions that try to read past the end of the arrays passed to them as arguments. * Enhanced warnings: ** `-Wfree-nonheap-object` detects more instances of calls to deallocation functions with pointers not returned from a dynamic memory allocation function. ** `-Wmaybe-uninitialized` diagnoses the passing of pointers and references to uninitialized memory to functions that take `const`-qualified arguments. ** `-Wuninitialized` detects reads from uninitialized dynamically allocated memory. *C* * Several new features from the upcoming C2X revision of the ISO C standard are supported with the `-std=c2x` and `-std=gnu2x` options. For example: ** The `[[nodiscard]]` standard attribute is supported. ** The `__has_c_attribute` preprocessor operator is supported. ** Labels may appear before declarations and at the end of a compound statement. *C++* * The default mode is changed to `-std=gnu++17`. * The pass:[C++] library `pass:[libstdc++]` has improved C++17 support now. * Several new pass:[C++20] features are implemented. Note that pass:[C++20] support is experimental. + For more information about the features, see link:https://gcc.gnu.org/projects/cxx-status.html#cxx20[C++20 Language Features]. * The pass:[C++] front end has experimental support for some of the upcoming pass:[C++23] draft features. * New warnings: ** `-Wctad-maybe-unsupported`, disabled by default, warns about performing class template argument deduction on a type with no deduction guides. ** `-Wrange-loop-construct`, enabled by `-Wall`, warns when a range-based for loop is creating unnecessary and resource inefficient copies. ** `-Wmismatched-new-delete`, enabled by `-Wall`, warns about calls to operator delete with pointers returned from mismatched forms of operator new or from other mismatched allocation functions. ** `-Wvexing-parse`, enabled by default, warns about the most vexing parse rule: the cases when a declaration looks like a variable definition, but the C++ language requires it to be interpreted as a function declaration. *Architecture-specific improvements* *The 64-bit ARM architecture* * The Armv8-R architecture is supported through the `-march=armv8-r` option. * GCC can autovectorize operations performing addition, subtraction, multiplication, and the accumulate and subtract variants on complex numbers. *AMD and Intel 64-bit architectures* //* The following Intel CPUs are recognized: Sapphire Rapids, Alder Lake, and Rocket Lake. * New ISA extension support for Intel AVX-VNNI is added. The `-mavxvnni` compiler switch controls the AVX-VNNI intrinsics. * AMD CPUs based on the znver3 core are supported with the new `-march=znver3` option. * Three microarchitecture levels defined in link:https://gitlab.com/x86-psABIs/x86-64-ABI[the x86-64 psABI supplement] are supported with the new `-march=x86-64-v2`, `-march=x86-64-v3`, and `-march=x86-64-v4` options. *IBM Z architectures* * GCC 11.2.1 defaults to the IBM z14 processor. *IBM Power Systems* * GCC 11.2.1 defaults to the IBM POWER9 processor. * The GCC compiler now supports POWER10 instructions with the new `-mcpu=power10` command-line option
Story Points: ---
Clone Of:
: 1986838 1986841 (view as bug list) Environment:
Last Closed: 2021-12-07 21:30:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1986838, 1986841, 1988950    

Description Marek Polacek 2021-07-28 12:36:29 UTC
GCC 11.2 is a bug-fix release from the GCC 11 branch containing important
fixes for regressions and serious bugs in GCC 11.1 with more than 95 bugs
fixed since the previous release.

Comment 1 Marek Polacek 2021-07-29 16:49:41 UTC
I see some new FAILs:

FAIL: 17_intro/headers/c++1998/49745.cc (test for excess errors)

then some
 gcc.dg/analyzer/*

and 
FAIL: g++.dg/asan/asan_test.C

Probably not a blocker, but at least the 49745.cc I'd like to understand.

Comment 2 Marek Polacek 2021-07-29 16:51:18 UTC
(In reply to Marek Polacek from comment #1)
> I see some new FAILs:
> 
> FAIL: 17_intro/headers/c++1998/49745.cc (test for excess errors)
> 
> then some
>  gcc.dg/analyzer/*
> 
> and 
> FAIL: g++.dg/asan/asan_test.C
> 
> Probably not a blocker, but at least the 49745.cc I'd like to understand.

...which is in Fedora too:
https://kojipkgs.fedoraproject.org//packages/gcc/11.2.1/1.fc35/data/logs/x86_64/build.log

Comment 4 Florian Weimer 2021-08-02 07:00:59 UTC
gcc-11.2.1-2.1.el9 with this change is in gating, via rhel-9.0.0-beta-build-sidetag-86604-stack-gate.