public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context
@ 2020-10-04 11:27 euloanty at live dot com
  2020-10-05  6:23 ` [Bug c++/97284] " marxin at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: euloanty at live dot com @ 2020-10-04 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97284
           Summary: internal compiler error: 'global_options' are modified
                    in local context
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: euloanty at live dot com
  Target Milestone: ---

This happens when I build qtbase.

/usr/local/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/pmmintrin.h:129:9:
internal compiler error: 'global_options' are modified in local context
  129 | #pragma GCC pop_options
      |         ^~~
g++ -c -include .pch/Qt5Core -pipe -O3 -std=c++1z -fvisibility=hidden
-fvisibility-inlines-hidden -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2
-Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT
-fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_USING_NAMESPACE
-DQT_NO_FOREACH -DQFLOAT16_INCLUDE_FAST
-DELF_INTERPRETER=\"/lib64/ld-linux-x86-64.so.2\"
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT
-DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT
-DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS
-DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/corelib -I. -Iglobal
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/md5
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/md4
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/sha3
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/double-conversion/include
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/harfbuzz/src
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/forkfd
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/3rdparty/tinycbor/src
-I.rcc -I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/include
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/include/QtCore -I../../include
-I../../include/QtCore
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/include/QtCore/5.15.1
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/include/QtCore/5.15.1/QtCore
-I../../include/QtCore/5.15.1 -I../../include/QtCore/5.15.1/QtCore -I.moc
-I.tracegen -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/mkspecs/linux-g++ -o
.obj/qrunnable.o
/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/corelib/thread/qrunnable.cpp
0xa28421 cp_parser_pragma
        ../../gcc/gcc/cp/parser.c:44093
0xa28421 cp_parser_pragma
        ../../gcc/gcc/cp/parser.c:44093
0xa5957b cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4793
0xa5957b cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4793
0xa5957b c_parse_file()
        ../../gcc/gcc/cp/parser.c:44152
0xa5957b c_parse_file()
        ../../gcc/gcc/cp/parser.c:44152
0xb76cdd c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1188
0xb76cdd c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [Makefile:22373: .obj/qendian.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:22979: .obj/qfloat16.o] Error 1
0xf75bdb cl_optimization_compare(gcc_options*, gcc_options*)
        /home/cqwrteur/myhome/gcc_build/gcc/options-save.c:11304
0xb790dd handle_pragma_pop_options
        ../../gcc/gcc/c-family/c-pragma.c:1093
0xa28421 cp_parser_pragma
        ../../gcc/gcc/cp/parser.c:44093
0xa5957b cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4793
0xa5957b c_parse_file()
        ../../gcc/gcc/cp/parser.c:44152
0xb76cdd c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1188
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make[2]: *** [Makefile:23464: .obj/qrandom.o] Error 1
In file included from
/usr/local/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/immintrin.h:33,
                 from
/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/include/QtCore/5.15.1/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191,
                 from
/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/include/QtCore/5.15.1/QtCore/private/qsimd_p.h:1,
                 from
/home/cqwrteur/qt/qtbase-everywhere-src-5.15.1/src/corelib/global/qlogging.cpp:61:
/usr/local/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include/pmmintrin.h:129:9:
internal compiler error: 'global_options' are modified in local context
  129 | #pragma GCC pop_options
      |         ^~~
0xf75bdb cl_optimization_compare(gcc_options*, gcc_options*)
        /home/cqwrteur/myhome/gcc_build/gcc/options-save.c:11304
0xb790dd handle_pragma_pop_options
        ../../gcc/gcc/c-family/c-pragma.c:1093
0xa28421 cp_parser_pragma
        ../../gcc/gcc/cp/parser.c:44093
0xa5957b cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4793
0xa5957b c_parse_file()
        ../../gcc/gcc/cp/parser.c:44152
0xb76cdd c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1188
Please submit a full bug report,

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
@ 2020-10-05  6:23 ` marxin at gcc dot gnu.org
  2021-01-12  7:51 ` ville.voutilainen at gmail dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-05  6:23 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
                 CC|                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2020-10-05

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Please provide a pre-processed soure file (-E option).

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
  2020-10-05  6:23 ` [Bug c++/97284] " marxin at gcc dot gnu.org
@ 2021-01-12  7:51 ` ville.voutilainen at gmail dot com
  2021-01-12  8:11 ` ville.voutilainen at gmail dot com
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

Ville Voutilainen <ville.voutilainen at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ville.voutilainen at gmail dot com

--- Comment #2 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
(In reply to Martin Liška from comment #1)
> Please provide a pre-processed soure file (-E option).

The output of gcc -E for this build is empty, so sure looks like the crash
is in the preprocessor.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
  2020-10-05  6:23 ` [Bug c++/97284] " marxin at gcc dot gnu.org
  2021-01-12  7:51 ` ville.voutilainen at gmail dot com
@ 2021-01-12  8:11 ` ville.voutilainen at gmail dot com
  2021-01-12  8:29 ` ville.voutilainen at gmail dot com
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
..or maybe I'm just too dumb to invoke g++ -E properly, and the rest of the
options confuse the compiler.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (2 preceding siblings ...)
  2021-01-12  8:11 ` ville.voutilainen at gmail dot com
@ 2021-01-12  8:29 ` ville.voutilainen at gmail dot com
  2021-01-12  9:13 ` marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Created attachment 49943
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49943&action=edit
Output of gcc -E

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (3 preceding siblings ...)
  2021-01-12  8:29 ` ville.voutilainen at gmail dot com
@ 2021-01-12  9:13 ` marxin at gcc dot gnu.org
  2021-01-12  9:20 ` ville.voutilainen at gmail dot com
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-12  9:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Still can't reproduce it.
Please send me also output of --verbose.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (4 preceding siblings ...)
  2021-01-12  9:13 ` marxin at gcc dot gnu.org
@ 2021-01-12  9:20 ` ville.voutilainen at gmail dot com
  2021-01-12  9:21 ` ville.voutilainen at gmail dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12  9:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Created attachment 49946
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49946&action=edit
Output of --verbose

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (5 preceding siblings ...)
  2021-01-12  9:20 ` ville.voutilainen at gmail dot com
@ 2021-01-12  9:21 ` ville.voutilainen at gmail dot com
  2021-01-12  9:28 ` ville.voutilainen at gmail dot com
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
(In reply to Martin Liška from comment #5)
> Still can't reproduce it.
> Please send me also output of --verbose.

Yeah, I fed that output to g++, and then it compiles just fine. But when it's
in the actual build with all the -MD -MT -MF flags, it doesn't. Those are, btw,
in case it's of any help,
-MD -MT qtbase/qmake/CMakeFiles/qmake.dir/__/src/corelib/global/qendian.cpp.o
-MF qtbase/qmake/CMakeFiles/qmake.dir/__/src/corelib/global/qendian.cpp.o.d -o
qtbase/qmake/CMakeFiles/qmake.dir/__/src/corelib/global/qendian.cpp.o

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (6 preceding siblings ...)
  2021-01-12  9:21 ` ville.voutilainen at gmail dot com
@ 2021-01-12  9:28 ` ville.voutilainen at gmail dot com
  2021-01-12  9:38 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Also, you can just try the actual build, if you follow
https://wiki.qt.io/Building_Qt_6_from_Git

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (7 preceding siblings ...)
  2021-01-12  9:28 ` ville.voutilainen at gmail dot com
@ 2021-01-12  9:38 ` marxin at gcc dot gnu.org
  2021-01-12 11:12 ` ville.voutilainen at gmail dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-12  9:38 UTC (permalink / raw)
  To: gcc-bugs

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,
      |                    ^~~~~~~~

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (8 preceding siblings ...)
  2021-01-12  9:38 ` marxin at gcc dot gnu.org
@ 2021-01-12 11:12 ` ville.voutilainen at gmail dot com
  2021-01-12 11:37 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: ville.voutilainen at gmail dot com @ 2021-01-12 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Ville Voutilainen <ville.voutilainen at gmail dot com> ---
Right - that's the Qt bug I'm hoping to fix, but I don't get far because of the
ICE. :) The libstdc++ headers have been reorganized, so Qt's expectations that
numeric_limits is available without including <limits> are no longer valid with
GCC 11.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (9 preceding siblings ...)
  2021-01-12 11:12 ` ville.voutilainen at gmail dot com
@ 2021-01-12 11:37 ` marxin at gcc dot gnu.org
  2021-01-12 11:58 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-12 11:37 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org

--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
Good, I placed a couple of '#include <limits>' and I can reproduce it now.
Thanks for the report.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (10 preceding siblings ...)
  2021-01-12 11:37 ` marxin at gcc dot gnu.org
@ 2021-01-12 11:58 ` marxin at gcc dot gnu.org
  2021-01-12 12:22 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Martin Liška <marxin at gcc dot gnu.org> ---
So it's caused by PCH:

$ cat qt.ii
[empty]

$ cat q.ii
#pragma GCC pch_preprocess "cmake_pch.hxx.gch"
#pragma GCC push_options
#pragma GCC target ""
#pragma GCC pop_options

$ g++ -x c++-header qt.ii -o cmake_pch.hxx.gch && g++ q.ii -c
q.ii:4:9: internal compiler error: ‘global_options’ are modified in local
context
    4 | #pragma GCC pop_options
      |         ^~~
0x115df28 cl_optimization_compare(gcc_options*, gcc_options*)
        /dev/shm/objdir/gcc/options-save.c:15271
0xcbc30e handle_pragma_pop_options
        /home/marxin/Programming/gcc/gcc/c-family/c-pragma.c:1092
0xcbcdb7 c_invoke_pragma_handler(unsigned int)
        /home/marxin/Programming/gcc/gcc/c-family/c-pragma.c:1515
0xb346ad cp_parser_pragma
        /home/marxin/Programming/gcc/gcc/cp/parser.c:45062
0xb693ab cp_parser_toplevel_declaration
        /home/marxin/Programming/gcc/gcc/cp/parser.c:14096
0xb693ab cp_parser_translation_unit
        /home/marxin/Programming/gcc/gcc/cp/parser.c:4936
0xb693ab c_parse_file()
        /home/marxin/Programming/gcc/gcc/cp/parser.c:45121
0xcb4669 c_common_parse_file()
        /home/marxin/Programming/gcc/gcc/c-family/c-opts.c:1211
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (11 preceding siblings ...)
  2021-01-12 11:58 ` marxin at gcc dot gnu.org
@ 2021-01-12 12:22 ` marxin at gcc dot gnu.org
  2021-01-12 13:04 ` cvs-commit at gcc dot gnu.org
  2021-01-12 13:05 ` marxin at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-12 12:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Martin Liška <marxin at gcc dot gnu.org> ---
I've got a patch candidate, testing right now.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (12 preceding siblings ...)
  2021-01-12 12:22 ` marxin at gcc dot gnu.org
@ 2021-01-12 13:04 ` cvs-commit at gcc dot gnu.org
  2021-01-12 13:05 ` marxin at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-12 13:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:e91910d3576eeac714c93ec25ea3b15012007903

commit r11-6612-ge91910d3576eeac714c93ec25ea3b15012007903
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Jan 12 13:20:18 2021 +0100

    options: properly compare string arguments

    Similarly to 7f967bd2a7ba156ede3fbb147e66dea5fb7137a6, we need to
    compare string with strcmp.

    gcc/ChangeLog:

            PR c++/97284
            * optc-save-gen.awk: Compare also n_target_save vars with
            strcmp.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug c++/97284] internal compiler error: 'global_options' are modified in local context
  2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
                   ` (13 preceding siblings ...)
  2021-01-12 13:04 ` cvs-commit at gcc dot gnu.org
@ 2021-01-12 13:05 ` marxin at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-12 13:05 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #15 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-01-12 13:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-04 11:27 [Bug c++/97284] New: internal compiler error: 'global_options' are modified in local context euloanty at live dot com
2020-10-05  6:23 ` [Bug c++/97284] " marxin at gcc dot gnu.org
2021-01-12  7:51 ` ville.voutilainen at gmail dot com
2021-01-12  8:11 ` ville.voutilainen at gmail dot com
2021-01-12  8:29 ` ville.voutilainen at gmail dot com
2021-01-12  9:13 ` marxin at gcc dot gnu.org
2021-01-12  9:20 ` ville.voutilainen at gmail dot com
2021-01-12  9:21 ` ville.voutilainen at gmail dot com
2021-01-12  9:28 ` ville.voutilainen at gmail dot com
2021-01-12  9:38 ` marxin at gcc dot gnu.org
2021-01-12 11:12 ` ville.voutilainen at gmail dot com
2021-01-12 11:37 ` marxin at gcc dot gnu.org
2021-01-12 11:58 ` marxin at gcc dot gnu.org
2021-01-12 12:22 ` marxin at gcc dot gnu.org
2021-01-12 13:04 ` cvs-commit at gcc dot gnu.org
2021-01-12 13:05 ` marxin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).