[Bug c++/97284] internal compiler error: 'global_options' are modified in local context

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 12 09:38:10 GMT 2021


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

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Ville Voutilainen from comment #8)
> Also, you can just try the actual build, if you follow
> https://wiki.qt.io/Building_Qt_6_from_Git

I tried, but it fails quite fast with:

/home/marxin/bin/gcc/bin/c++ -DHAVE_CONFIG_H -DPCRE2_CODE_UNIT_WIDTH=16
-DPCRE2_DISABLE_JIT -DQT_BOOTSTRAPPED -DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_USE_QSTRINGBUILDER
-DQT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=0 -DQT_VERSION_PATCH=1
-DQT_VERSION_STR=\"6.0.1\" -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
-I../qtbase/src/tools/bootstrap/../../3rdparty/pcre2/src
-Iqtbase/src/corelib/Core_autogen/include -Iqtbase/include
-Iqtbase/include/QtCore -I../qtbase/src/corelib -Iqtbase/src/corelib
-Iqtbase/src/corelib/global -I../qtbase/src/corelib/../3rdparty/tinycbor/src
-Iqtbase/include/QtCore/6.0.1 -Iqtbase/include/QtCore/6.0.1/QtCore
-I../qtbase/src/corelib/../3rdparty/forkfd -Iqtbase/src/corelib/.rcc
-I../qtbase/mkspecs/linux-g++ -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -Iqtbase/src/xml/Xml_autogen/include
-Iqtbase/include/QtXml -I../qtbase/src/xml -Iqtbase/src/xml
-Iqtbase/include/QtXml/6.0.1 -Iqtbase/include/QtXml/6.0.1/QtXml
-I../qtbase/src/tools/bootstrap/..
-I../qtbase/src/tools/bootstrap/../../3rdparty/tinycbor/src -DNDEBUG -O2 -fPIC
-fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra
-ffunction-sections -fdata-sections -Wsuggest-override -std=gnu++17 -MD -MT
qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/global/qfloat16.cpp.o
-MF
qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/global/qfloat16.cpp.o.d
-o
qtbase/src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/global/qfloat16.cpp.o
-c ../qtbase/src/corelib/global/qfloat16.cpp
In file included from qtbase/include/QtCore/qanystringview.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qstring.h:56,
                 from qtbase/include/QtCore/qstring.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qhashfunctions.h:44,
                 from qtbase/include/QtCore/qhashfunctions.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qvarlengtharray.h:47,
                 from qtbase/include/QtCore/qvarlengtharray.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/kernel/qmetatype.h:49,
                 from qtbase/include/QtCore/qmetatype.h:1,
                 from ../qtbase/src/corelib/global/qfloat16.h:45,
                 from ../qtbase/src/corelib/global/qfloat16.cpp:41:
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:250:46:
error: ‘numeric_limits’ is not a member of ‘std’
  250 |     static constexpr size_t SizeMask =
(std::numeric_limits<size_t>::max)() / 4;
      |                                              ^~~~~~~~~~~~~~
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:250:67:
error: expected primary-expression before ‘>’ token
  250 |     static constexpr size_t SizeMask =
(std::numeric_limits<size_t>::max)() / 4;
      |                                                                   ^
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:250:70:
error: ‘::max’ has not been declared; did you mean ‘std::max’?
  250 |     static constexpr size_t SizeMask =
(std::numeric_limits<size_t>::max)() / 4;
      |                                                                     
^~~
      |                                                                     
std::max
In file included from /home/marxin/bin/gcc/include/c++/11.0.0/algorithm:62,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/global/qglobal.h:126,
                 from qtbase/include/QtCore/qglobal.h:1,
                 from ../qtbase/src/corelib/global/qfloat16.h:44,
                 from ../qtbase/src/corelib/global/qfloat16.cpp:41:
/home/marxin/bin/gcc/include/c++/11.0.0/bits/stl_algo.h:3467:5: note:
‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from qtbase/include/QtCore/qanystringview.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qstring.h:56,
                 from qtbase/include/QtCore/qstring.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qhashfunctions.h:44,
                 from qtbase/include/QtCore/qhashfunctions.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qvarlengtharray.h:47,
                 from qtbase/include/QtCore/qvarlengtharray.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/kernel/qmetatype.h:49,
                 from qtbase/include/QtCore/qmetatype.h:1,
                 from ../qtbase/src/corelib/global/qfloat16.h:45,
                 from ../qtbase/src/corelib/global/qfloat16.cpp:41:
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:253:46:
error: ‘numeric_limits’ is not a member of ‘std’
  253 |     static constexpr size_t TypeMask =
(std::numeric_limits<size_t>::max)() & ~SizeMask;
      |                                              ^~~~~~~~~~~~~~
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:253:67:
error: expected primary-expression before ‘>’ token
  253 |     static constexpr size_t TypeMask =
(std::numeric_limits<size_t>::max)() & ~SizeMask;
      |                                                                   ^
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:253:70:
error: ‘::max’ has not been declared; did you mean ‘std::max’?
  253 |     static constexpr size_t TypeMask =
(std::numeric_limits<size_t>::max)() & ~SizeMask;
      |                                                                     
^~~
      |                                                                     
std::max
In file included from /home/marxin/bin/gcc/include/c++/11.0.0/algorithm:62,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/global/qglobal.h:126,
                 from qtbase/include/QtCore/qglobal.h:1,
                 from ../qtbase/src/corelib/global/qfloat16.h:44,
                 from ../qtbase/src/corelib/global/qfloat16.cpp:41:
/home/marxin/bin/gcc/include/c++/11.0.0/bits/stl_algo.h:3467:5: note:
‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from qtbase/include/QtCore/qanystringview.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qstring.h:56,
                 from qtbase/include/QtCore/qstring.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qhashfunctions.h:44,
                 from qtbase/include/QtCore/qhashfunctions.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/tools/qvarlengtharray.h:47,
                 from qtbase/include/QtCore/qvarlengtharray.h:1,
                 from
qtbase/include/QtCore/../../../../qtbase/src/corelib/kernel/qmetatype.h:49,
                 from qtbase/include/QtCore/qmetatype.h:1,
                 from ../qtbase/src/corelib/global/qfloat16.h:45,
                 from ../qtbase/src/corelib/global/qfloat16.cpp:41:
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:254:28:
error: non-constant condition for static assertion
  254 |     static_assert(TypeMask == (Latin1Flag|TwoByteCodePointFlag));
      |                   ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:264:20:
error: enumerator value for ‘Latin1’ is not an integer constant
  264 |         Latin1   = Latin1Flag,
      |                    ^~~~~~~~~~
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:265:20:
error: enumerator value for ‘Utf16’ is not an integer constant
  265 |         Utf16    = TwoByteCodePointFlag,
      |                    ^~~~~~~~~~~~~~~~~~~~
qtbase/include/QtCore/../../../../qtbase/src/corelib/text/qanystringview.h:266:20:
error: enumerator value for ‘Unused’ is not an integer constant
  266 |         Unused   = TypeMask,
      |                    ^~~~~~~~


More information about the Gcc-bugs mailing list