From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by sourceware.org (Postfix) with ESMTP id CA2183938805 for ; Thu, 19 Mar 2020 15:48:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CA2183938805 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-419-gCXPxsVTPaWbkuXRGnGDlA-1; Thu, 19 Mar 2020 11:48:00 -0400 X-MC-Unique: gCXPxsVTPaWbkuXRGnGDlA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 871C5189D6C0; Thu, 19 Mar 2020 15:47:58 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-22.ams2.redhat.com [10.36.112.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE39F84D90; Thu, 19 Mar 2020 15:47:57 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 02JFltAS031887; Thu, 19 Mar 2020 16:47:55 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 02JFlsVS031886; Thu, 19 Mar 2020 16:47:54 +0100 Date: Thu, 19 Mar 2020 16:47:54 +0100 From: Jakub Jelinek To: Martin =?utf-8?B?TGnFoWth?= Cc: gcc-patches@gcc.gnu.org, Jan Hubicka Subject: Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified. Message-ID: <20200319154754.GR2156@tucnak> Reply-To: Jakub Jelinek References: <20200319090931.GP2156@tucnak> <8847e7b1-4f65-1109-7014-086a763d3e94@suse.cz> MIME-Version: 1.0 In-Reply-To: <8847e7b1-4f65-1109-7014-086a763d3e94@suse.cz> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS 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, 19 Mar 2020 15:48:04 -0000 On Thu, Mar 19, 2020 at 04:32:05PM +0100, Martin Li=C5=A1ka wrote: > + gcc_options *saved_global_options =3D NULL; > + if (flag_checking) > +=09{ > +=09 saved_global_options =3D (gcc_options *) xmalloc (sizeof (gcc_optio= ns)); XNEW (gcc_options) please. > + p->saved_global_options =3D (gcc_options *) xmalloc (sizeof (gcc_o= ptions)); Ditto. > + *p->saved_global_options =3D global_options; =09Jakub