Bug 2140266

Summary: gcc: Incorrect always_inline diagnostic in LTO mode with #pragma GCC target("cpu=power10")
Product: Red Hat Enterprise Linux 9 Reporter: Orion Poplawski <orion>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: system-version QA Contact: Václav Kadlčík <vkadlcik>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ahajkova, fweimer, jakub, logans, mpolacek, ohudlick, sergio, sipoyare, tdawson, vkadlcik
Version: 9.0Keywords: Bugfix, Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-11.3.1-4.el9 Doc Type: No Doc Update
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:21:38 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:

Description Orion Poplawski 2022-11-05 03:22:45 UTC
Description of problem:

openbabel fails with:

[ 19%] Building CXX object src/CMakeFiles/openbabel.dir/math/align.cpp.o
cd /builddir/build/BUILD/openbabel-openbabel-3-1-1/ppc64le-redhat-linux-gnu/src && /usr/bin/g++ -DHAVE_EIGEN -DHAVE_EIGEN3 -DHAVE_LIBZ -DHAVE_RADPIJSON -DHAVE_SHARED_POINTER -DHAVE_WXWIDGETS -DMAKE_OBDLL -DUSING_DYNAMIC_LIBS -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/builddir/build/BUILD/openbabel-openbabel-3-1-1/ppc64le-redhat-linux-gnu/include -I/builddir/build/BUILD/openbabel-openbabel-3-1-1/data -I/builddir/build/BUILD/openbabel-openbabel-3-1-1/include -I/usr/include/eigen3 -isystem /usr/lib64/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mcpu=power9 -mtune=power9 -fasynchronous-unwind-tables -fstack-clash-protection -pthread -DNDEBUG -O3 -DNDEBUG -fPIC -std=gnu++11 -MD -MT src/CMakeFiles/openbabel.dir/math/align.cpp.o -MF CMakeFiles/openbabel.dir/math/align.cpp.o.d -o CMakeFiles/openbabel.dir/math/align.cpp.o -c /builddir/build/BUILD/openbabel-openbabel-3-1-1/src/math/align.cpp
make[2]: Leaving directory '/builddir/build/BUILD/openbabel-openbabel-3-1-1/ppc64le-redhat-linux-gnu'
In file included from /usr/include/eigen3/Eigen/Core:286,
                 from /builddir/build/BUILD/openbabel-openbabel-3-1-1/include/openbabel/math/align.h:26,
                 from /builddir/build/BUILD/openbabel-openbabel-3-1-1/src/math/align.cpp:24:
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h: In function 'Eigen::internal::storeAccumulator<Eigen::internal::blas_data_mapper<double, long, 0, 0, 1>, long, double __vector(2), 2l>(long, long, Eigen::internal::blas_data_mapper<double, long, 0, 0, 1> const&, double __vector(2) const&, __vector_quad*)void':
/usr/include/eigen3/Eigen/src/Core/util/BlasUtil.h:227:46: error: inlining failed in call to 'always_inline' 'Eigen::internal::blas_data_mapper<double, long, 0, 0, 1>::storePacketBlock<double __vector(2), 4>(long, long, Eigen::internal::PacketBlock<double __vector(2), 4> const&) constvoid': target specific option mismatch
  227 |   EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE void storePacketBlock(Index i, Index j, const PacketBlock<SubPacket, n> &block) const {
      |                                              ^~~~~~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProduct.h:38,
                 from /usr/include/eigen3/Eigen/Core:350,
                 from /builddir/build/BUILD/openbabel-openbabel-3-1-1/include/openbabel/math/align.h:26,
                 from /builddir/build/BUILD/openbabel-openbabel-3-1-1/src/math/align.cpp:24:
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h:43:44: note: called from here
   43 |   data.template storePacketBlock<Packet, 4>(i, j, tRes);
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:350,
                 from /builddir/build/BUILD/openbabel-openbabel-3-1-1/include/openbabel/math/align.h:26,
                 from /builddir/build/BUILD/openbabel-openbabel-3-1-1/src/math/align.cpp:24:

Version-Release number of selected component (if applicable):
11.3.1-2.1.el9

This has been resolved in upstream gcc

Comment 1 Marek Polacek 2022-11-07 14:11:31 UTC
Should be fixed by the planned rebase of RHEL 9 gcc.

Comment 8 Orion Poplawski 2023-01-04 03:26:29 UTC
digikam is still failing with 11.3.1-4:

/usr/include/eigen3/Eigen/src/Core/util/BlasUtil.h:227:46: error: inlining failed in call to 'always_inline' 'Eigen::internal::blas_data_mapper<double, long, 0, 0, 1>::storePacketBlock<double __vector(2), 4>(long, long, Eigen::internal::PacketBlock<double __vector(2), 4> const&) constvoid': target specific option mismatch

See https://koji.fedoraproject.org/koji/taskinfo?taskID=95750885

Comment 10 Václav Kadlčík 2023-01-09 14:46:56 UTC
I'm moving the digikam failure into a separate bug - bz2159428.
Orion, I hope you don't mind. I've added you to CC there.

Comment 11 Orion Poplawski 2023-01-10 01:31:14 UTC
That seems like a good idea, thanks.

Comment 12 Sergio Basto 2023-03-20 00:56:15 UTC
(In reply to Marek Polacek from comment #1)
> Should be fixed by the planned rebase of RHEL 9 gcc.


I getting a similar error on epel 8 build highway package 

/builddir/build/BUILD/highway-1.0.4/hwy/ops/shared-inl.h:37:22: error: invalid cpu 'power10' for #pragma GCC target 'cpu=power10'
 HWY_BEFORE_NAMESPACE();

Comment 14 errata-xmlrpc 2023-05-09 08:21:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gcc bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2525