From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 18F343840C2A for ; Thu, 18 Jun 2020 15:40:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 18F343840C2A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mliska@suse.cz X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 62583AF21; Thu, 18 Jun 2020 15:40:17 +0000 (UTC) Subject: Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified. To: Luis Machado , law@redhat.com, Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, Jan Hubicka References: <20200319090931.GP2156@tucnak> <8847e7b1-4f65-1109-7014-086a763d3e94@suse.cz> <312fd3c4-cc7c-5389-4ae7-615aad0761f3@gmail.com> <63194d6e-cd33-8563-03fc-f2a86b4bf4ca@suse.cz> <20200320154357.GW2156@tucnak> <313d9009-038e-654d-056e-a95b3695efd2@suse.cz> <4142bd038cd10606a1d9dabcc46ebe6a9a7e3662.camel@redhat.com> <4ee4da50-70b6-9a27-1e54-693a1a6ba390@linaro.org> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <98b743ce-b5b4-7d9c-91c5-d5528b31b518@suse.cz> Date: Thu, 18 Jun 2020 17:40:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <4ee4da50-70b6-9a27-1e54-693a1a6ba390@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 15:40:20 -0000 I see the following ICE for aarch64 kernel build: $ cat neon.i #pragma GCC push_options #pragma GCC target "arch=armv8.2-a+bf16" #pragma GCC pop_options $ ./xgcc -B. ~/Programming/testcases/neon.i -c -mbranch-protection=pac-ret /home/marxin/Programming/testcases/neon.i:3:9: internal compiler error: ‘global_options’ are modified in local context 3 | #pragma GCC pop_options | ^~~ 0x1111f73 cl_optimization_compare(gcc_options*, gcc_options*) /dev/shm/objdir3/gcc/options-save.c:11996 0xb02ff4 handle_pragma_pop_options /home/marxin/Programming/gcc/gcc/c-family/c-pragma.c:1090 0xb03953 c_invoke_pragma_handler(unsigned int) /home/marxin/Programming/gcc/gcc/c-family/c-pragma.c:1512 0xa5ae39 c_parser_pragma /home/marxin/Programming/gcc/gcc/c/c-parser.c:12544 0xa3f9fc c_parser_external_declaration /home/marxin/Programming/gcc/gcc/c/c-parser.c:1754 0xa3f5c8 c_parser_translation_unit /home/marxin/Programming/gcc/gcc/c/c-parser.c:1646 0xa7db4d c_parse_file() /home/marxin/Programming/gcc/gcc/c/c-parser.c:21822 0xafd0b6 c_common_parse_file() /home/marxin/Programming/gcc/gcc/c-family/c-opts.c:1190 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. #1 0x0000000001111f74 in cl_optimization_compare (ptr1=0x2d5e3f0, ptr2=0x2cc7760 ) at options-save.c:11996 11996 internal_error ("% are modified in local context"); (gdb) p ptr2->x_aarch64_branch_protection_string $2 = 0x2cf52e0 "pac-ret" (gdb) p ptr1->x_aarch64_branch_protection_string $3 = 0x2d3c190 "pac-ret" │11995 if (ptr1->x_aarch64_branch_protection_string != ptr2->x_aarch64_branch_protection_string) >│11996 internal_error ("% are modified in local context"); This is bogus as these are 2 strings that are equal. Let me fix it. Martin