From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 696FA3858000 for ; Tue, 2 Nov 2021 16:45:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 696FA3858000 Received: by mail-ed1-x52e.google.com with SMTP id w1so24331571edd.10 for ; Tue, 02 Nov 2021 09:45:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=6mHqEd8r2f2h8KX1BJAr6df/+0fDd2X48aTsCKz4EFU=; b=BchqCV+yaA8j6pUt/ort7LX9IsHwAv6LpHKqUk4kLa87N6f4z5SHxRjIWwDD96N0n3 zI3uXb+gJvPfrs847UuYOXJUCuG+NDK7FncnaG84l9+eLfIce0JsQRLBZkBoTMINY90o f/XWIAVyswgfxOL9hUipHE/9l5KfsIBmB/Wo3EP7lolGYulFJfroOAqUgc0dKXa1aOc+ GBiWHECAfl53q6Y53XrIkx1BPleWlMDQpGhNBkkBHBW4PAZ0z+WczMjEOfCQ6ch6Q4Wd ky5n5tTY6ZuhSI5OQSlmnMD6ihuW+Oq14WZshLC0fCwRlRjxmkLNc1gpgWoOOhbDve6c dyXg== X-Gm-Message-State: AOAM533KXRqV1SGoq/MIA/ZS0LLdDKVzJXv+wBQIu9Cst/vmKe7C/g/N 49slLEwnK/PEZJWm1ZfJjlCR4YaUB8ashTuJ1uUeKYCO X-Google-Smtp-Source: ABdhPJwIupHXKl2XfIhOHZol5zNfSBUARKIqye9YqeoRhDuhoxeLYEkJTUwonrU4cEUdMlY8863PBKui3qLtuRgivGI= X-Received: by 2002:a17:907:3eaa:: with SMTP id hs42mr46262095ejc.429.1635871513448; Tue, 02 Nov 2021 09:45:13 -0700 (PDT) MIME-Version: 1.0 References: <435f9ee2-88c6-392e-3584-2337dd5dd9c1@suse.cz> <21589cd9-b57e-d0db-937b-230ce4626ea3@suse.cz> In-Reply-To: <21589cd9-b57e-d0db-937b-230ce4626ea3@suse.cz> From: Richard Biener Date: Tue, 2 Nov 2021 17:45:02 +0100 Message-ID: Subject: Re: [PATCH] Record that -gtoggle is already used in gcc_options. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 02 Nov 2021 16:45:15 -0000 On Tue, Nov 2, 2021 at 4:11 PM Martin Li=C5=A1ka wrote: > > On 11/2/21 15:33, Richard Biener wrote: > > I think -gtoggle matches a Defered option and thus should be processed > > in handle_common_deferred_options. > > Well, that's quite problematic as I handle_common_deferred_options is cal= led > after decode_options (that calls finish_options). > > Note there's direct dependency at very end of finish_options in between -= gtoggle > and debug_nonbind_markers_p: > > > if (flag_gtoggle) > { > if (debug_info_level =3D=3D DINFO_LEVEL_NONE) > { > debug_info_level =3D DINFO_LEVEL_NORMAL; > > if (write_symbols =3D=3D NO_DEBUG) > write_symbols =3D PREFERRED_DEBUGGING_TYPE; > } > else > debug_info_level =3D DINFO_LEVEL_NONE; > } > > if (!OPTION_SET_P (debug_nonbind_markers_p)) > debug_nonbind_markers_p > =3D (optimize > && debug_info_level >=3D DINFO_LEVEL_NORMAL > && dwarf_debuginfo_p () > && !(flag_selective_scheduling || flag_selective_scheduling2)); > > I don't see who you mean the possible fix? So at first I thought we might have a place that post-processes 'decoded_options' so we could reflect -gtoggle on those but out-of-order (removing/adding -g). But that's going to be mightly complicated as well. I wonder what the original issue is you fix? You say we ap;ly it for a second time but we should apply it onto the same state as previously since we restore that for optimize attribute processing? Richard. > > Martin