https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116911

            Bug ID: 116911
           Summary: [15 regression] Building qtcore-5.15.14 fails
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Had a bunch of reports overnight (none last week) with this week's snapshot:
```
$ x86_64-pc-linux-gnu-g++ -c -o qglobal.o  -O3 -march=native
-fno-semantic-interposition -mtls-dialect=gnu2 -fdiagnostics-color=always
-Wa,-O2 -Wa,-mtune=znver4 -pipe -Werror=strict-aliasi
ng -Werror=lto-type-mismatch -Werror=odr -frecord-gcc-switches -ggdb3
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -std=c++11 -ffunction-sections
-fdata-sections  -I/var/tmp/portage/dev-qt/qtco
re-5.15.14/work/qtbase-everywhere-src-5.15.14/qmake
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/qmake/library
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/wor
k/qtbase-everywhere-src-5.15.14/qmake/generators
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/src/3rdparty/tinycbor/src
-I/var/tmp/portage/dev-qt/qtcore-5.
15.14/work/qtbase-everywhere-src-5.15.14/qmake/generators/unix
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/qmake/generators/win32
-I/var/tmp/portage/dev-q
t/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/qmake/generators/mac
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include
-I/var/tmp/portage/dev-qt/qtc
ore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/5.15.14
-I/var/tmp/portage/dev-qt
/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/5.15.14/QtCore
-I../src/corelib/global
-I/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/mkspe
cs/linux-g++ -DQT_VERSION_STR=\"5.15.14\" -DQT_VERSION_MAJOR=5
-DQT_VERSION_MINOR=15 -DQT_VERSION_PATCH=14 -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED
-DPROEVALUATOR_FULL -DQT_NO_FOREACH /var/tmp
/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/src/corelib/global/qglobal.cpp
In file included from
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/qglobalstatic.h:1,
                 from
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/../../src/corelib/global/qglobal.h:1310,
                 from
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/qglobal.h:1,
                 from
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/mkspecs/linux-g++/qplatformdefs.h:45,
                 from
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/src/corelib/global/qglobal.cpp:41:
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/../../src/corelib/global/qglobalstatic.h:159:42:
error: the value of ‘{anonymous}::Q_QGS_global_callback_table::guard’ is not
usable in a constant expression
  159 |                          Q_QGS_ ## NAME::guard> NAME;
      |                                          ^~~~~
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/../../src/corelib/global/qglobalstatic.h:162:5:
note: in expansion of macro ‘Q_GLOBAL_STATIC_WITH_ARGS’
  162 |     Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ())
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/src/corelib/global/qglobal.cpp:4316:1:
note: in expansion of macro ‘Q_GLOBAL_STATIC’
 4316 | Q_GLOBAL_STATIC(QInternal_CallBackTable, global_callback_table)
      | ^~~~~~~~~~~~~~~
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/../../src/corelib/global/qglobalstatic.h:154:25:
note: ‘{anonymous}::Q_QGS_global_callback_table::guard’ was not declared
‘constexpr’
  154 |         QBasicAtomicInt guard =
Q_BASIC_ATOMIC_INITIALIZER(QtGlobalStatic::Uninitialized); \
      |                         ^~~~~
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/include/QtCore/../../src/corelib/global/qglobalstatic.h:162:5:
note: in expansion of macro ‘Q_GLOBAL_STATIC_WITH_ARGS’
  162 |     Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ())
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-qt/qtcore-5.15.14/work/qtbase-everywhere-src-5.15.14/src/corelib/global/qglobal.cpp:4316:1:
note: in expansion of macro ‘Q_GLOBAL_STATIC’
 4316 | Q_GLOBAL_STATIC(QInternal_CallBackTable, global_callback_table)
      | ^~~~~~~~~~~~~~~
gmake: *** [Makefile:343: qglobal.o] Error 1
gmake: *** Waiting for unfinished jobs....
```

I haven't tried to look at it yet but my C++ isn't great either anyway.

---

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/15/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-15.0.0_pre20240929/work/gcc-15-20240929/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/15
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened
15.0.0_pre20240929 p13' --with-gcc-major-version-only --enable-libstdcxx-time
--enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --enable-cet
--disable-systemtap --disable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --with-zstd --without-isl --enable-default-pie
--enable-host-pie --enable-host-bind-now --enable-default-ssp
--disable-fixincludes --with-build-config='bootstrap-O3 bootstrap-lto
bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240929 (experimental) (Gentoo Hardened 15.0.0_pre20240929
p13)
```

Reply via email to