Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-05 Thread Martin Liška
On 11/5/21 11:23, Richard Biener wrote: OK if you add a comment like /* Make sure to process -gtoggle only once. */ Sure, added and installed as 14c7041a1f00ef4ee9a036e0b369c97646db5b5c. Cheers, Martin

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-05 Thread Richard Biener via Gcc-patches
On Thu, Nov 4, 2021 at 4:11 PM Martin Liška wrote: > > On 11/4/21 14:09, Richard Biener wrote: > > But we shouldn't start with the current global options but with ones > > we saved for > > optimize attribute/pragma processing, no? > > We hit the issue when we combine cmdline and pragma optimize op

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-04 Thread Martin Liška
On 11/4/21 14:09, Richard Biener wrote: But we shouldn't start with the current global options but with ones we saved for optimize attribute/pragma processing, no? We hit the issue when we combine cmdline and pragma optimize options. Problem of -gtoggle is that it does not directly influenc

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-04 Thread Richard Biener via Gcc-patches
On Thu, Nov 4, 2021 at 1:51 PM Martin Liška wrote: > > On 11/2/21 17:45, Richard Biener wrote: > > On Tue, Nov 2, 2021 at 4:11 PM Martin Liška wrote: > >> > >> On 11/2/21 15:33, Richard Biener wrote: > >>> I think -gtoggle matches a Defered option and thus should be processed > >>> in handle_comm

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-04 Thread Martin Liška
On 11/2/21 17:45, Richard Biener wrote: On Tue, Nov 2, 2021 at 4:11 PM Martin Liška 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_defe

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-02 Thread Andrew Pinski via Gcc-patches
On Tue, Nov 2, 2021 at 7:11 AM Martin Liška wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin > > When doing flip based on -gtoggle, record it. Otherwise, we will > apply it for the second time in finish_options. > >

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-02 Thread Richard Biener via Gcc-patches
On Tue, Nov 2, 2021 at 4:11 PM Martin Liška 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 called > after

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-02 Thread Martin Liška
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 called after decode_options (that calls finish_options). Note there's direct d

Re: [PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-02 Thread Richard Biener via Gcc-patches
On Tue, Nov 2, 2021 at 3:11 PM Martin Liška wrote: > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? I think -gtoggle matches a Defered option and thus should be processed in handle_common_deferred_options. I'd argue that --help printing should

[PATCH] Record that -gtoggle is already used in gcc_options.

2021-11-02 Thread Martin Liška
Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin When doing flip based on -gtoggle, record it. Otherwise, we will apply it for the second time in finish_options. PR debug/102955 gcc/ChangeLog: * common.opt: Add new gt