From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 62A2E3858D28; Sat, 26 Feb 2022 20:59:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62A2E3858D28 From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBjLzEwNDcwNV0gTmV3OiBbMTIgcmVncmVzc2lvbl0gSUNF?= =?UTF-8?B?IOKAmGdsb2JhbF9vcHRpb25z4oCZIGFyZSBtb2RpZmllZCBpbiBsb2NhbCBj?= =?UTF-8?B?b250ZXh0IGluIGNsX29wdGltaXphdGlvbl9jb21wYXJl?= Date: Sat, 26 Feb 2022 20:59:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2022 20:59:19 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104705 Bug ID: 104705 Summary: [12 regression] ICE =E2=80=98global_options=E2=80=99 ar= e modified in local context in cl_optimization_compare Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org CC: mliska at suse dot cz Target Milestone: --- Tried to build ghc-HEAD with gcc-master today, got an ICE on pragmas in intrisics. Here is a small reproducer (I think I lost real "optimize" value during shrinking, does it matter much for this ICE?): //$ cat a.c #pragma GCC optimize "foo" #pragma GCC push_options #pragma GCC pop_options $ /tmp/bg/gcc/xgcc -B/tmp/bg/gcc -c a.c -O2 -Wall a.c:1:9: warning: bad option =E2=80=98-ffoo=E2=80=99 to pragma =E2=80=98opt= imize=E2=80=99 [-Wpragmas] 1 | #pragma GCC optimize "foo" | ^~~ a.c:3:9: internal compiler error: =E2=80=98global_options=E2=80=99 are modi= fied in local context 3 | #pragma GCC pop_options | ^~~ 0xccf111 cl_optimization_compare(gcc_options*, gcc_options*) /tmp/bg/gcc/options-save.cc:15919 0x7ca26f handle_pragma_pop_options /home/slyfox/dev/git/gcc/gcc/c-family/c-pragma.cc:1141 0x7cd42e c_invoke_pragma_handler(unsigned int) /home/slyfox/dev/git/gcc/gcc/c-family/c-pragma.cc:1569 0x72a4ca c_parser_pragma /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:12621 0x7555e7 c_parser_external_declaration /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:1760 0x75596a c_parser_translation_unit /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:1652 0x75596a c_parse_file() /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:23357 0x7c7e81 c_common_parse_file() /home/slyfox/dev/git/gcc/gcc/c-family/c-opts.cc:1238 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. $ /tmp/bg/gcc/xgcc -B/tmp/bg/gcc -v Reading specs from /tmp/bg/gcc/specs COLLECT_GCC=3D/tmp/bg/gcc/xgcc COLLECT_LTO_WRAPPER=3D/tmp/bg/gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib --disable-bootstrap --with-native-system-header-dir=3D/<>/glibc-2.33-108-dev/include --prefix=3D/tmp/bg/__td__ CFLAGS=3D'-O1 -ggdb3' CXXFLAGS=3D'-O1 -ggdb3' LDF= LAGS=3D'-O1 -ggdb3' Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.1 20220226 (experimental) (GCC)=