From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by sourceware.org (Postfix) with ESMTPS id 4AA2F3840C2A for ; Thu, 18 Jun 2020 15:48:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4AA2F3840C2A Received: by mail-qk1-x742.google.com with SMTP id w1so5979881qkw.5 for ; Thu, 18 Jun 2020 08:48:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=f3wFOyIaMkEsjBcbsFVMIPt8pwwN2Wtl1eNjvu/OxMM=; b=m4zVQVWJSJkVVc53FrTSo3NC2K7WStbYD5/iw3E55kl0Y7RLPfdsFA33my1cyec6n2 za9593tftwdNl3eGNkBbgXKTGXgRYBJUXBrWYVftECS06iqKQOn85MZFHZugOGJIPxkU Qpc5UFymj3buSyPaFSXufANBEacUtRftW8H9AahCHaLxDh0JrWbiQWZBoBNCYdjPJlam 8vLbkYTuYWl7jRbfgK/J8LQ8n/ACF8rt/lKwLoYm287OC3WEXC3E8JRtJGwRlzj8vu8Z YzKc6G3RSBVbD2hMGmGjE6AR1avJAvGnewKJVD8cLjGQLg0BdffRRWIw/cZCtj4zv44s o+7Q== X-Gm-Message-State: AOAM532dk3wBlpUxLfEfcRH7vacnWwkp6kQAsosMiMqnBiDvCIrJWhBE e/iaTL9fKM39P1L/Ng+p8KNJ7Q== X-Google-Smtp-Source: ABdhPJwQM2PrOgv/NLfagGZJT5toguo6nBd3xTYC7mywO0pgO5c0V5nUXJA87xbAuDreRUQy59mZ+g== X-Received: by 2002:a37:a74a:: with SMTP id q71mr4498505qke.446.1592495280765; Thu, 18 Jun 2020 08:48:00 -0700 (PDT) Received: from [192.168.0.185] ([177.158.82.36]) by smtp.gmail.com with ESMTPSA id b24sm3283895qkj.0.2020.06.18.08.47.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2020 08:48:00 -0700 (PDT) Subject: Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified. To: =?UTF-8?Q?Martin_Li=c5=a1ka?= , 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> <98b743ce-b5b4-7d9c-91c5-d5528b31b518@suse.cz> From: Luis Machado Message-ID: <0dab380c-c68b-87e1-f4d3-4fcd40e93f80@linaro.org> Date: Thu, 18 Jun 2020 12:47:57 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <98b743ce-b5b4-7d9c-91c5-d5528b31b518@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, 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:48:02 -0000 On 6/18/20 12:40 PM, Martin Liška wrote: > 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 That's another one I noticed alongside the first one I reported. That's good that you managed to reproduce it.