From: Richard Biener <richard.guenther@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] driver: drop flag_var_tracking_assignments flag
Date: Tue, 11 Apr 2023 10:26:20 +0200 [thread overview]
Message-ID: <CAFiYyc2NENNK9qjLKdMC1CJDE=y+k8p9mL=A7fcVc0G0MC_4Jg@mail.gmail.com> (raw)
In-Reply-To: <94fb1c9b-60bd-25f3-9eb7-cbac8213dfd0@suse.cz>
On Mon, Apr 3, 2023 at 10:46 AM Martin Liška <mliska@suse.cz> wrote:
>
> The revision r13-259-g76db543db88727 moved a condition from one
> file to another, but now we do not drop x_flag_var_tracking_assignments
> as it was done before the mentioned revision.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
OK.
> Thanks,
> Martin
>
> PR driver/108241
>
> gcc/ChangeLog:
>
> * opts.cc (finish_options): Drop also
> x_flag_var_tracking_assignments.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/pr108241.c: New test.
> * gcc.dg/pr79570.c: Add also -g option.
> ---
> gcc/opts.cc | 1 +
> gcc/testsuite/gcc.dg/pr108241.c | 63 +++++++++++++++++++++++++++++++++
> gcc/testsuite/gcc.dg/pr79570.c | 2 +-
> 3 files changed, 65 insertions(+), 1 deletion(-)
> create mode 100644 gcc/testsuite/gcc.dg/pr108241.c
>
> diff --git a/gcc/opts.cc b/gcc/opts.cc
> index f102c1328b9..fb2e5388ab1 100644
> --- a/gcc/opts.cc
> +++ b/gcc/opts.cc
> @@ -1384,6 +1384,7 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set,
> }
> opts->x_flag_var_tracking = 0;
> opts->x_flag_var_tracking_uninit = 0;
> + opts->x_flag_var_tracking_assignments = 0;
> }
>
> /* One could use EnabledBy, but it would lead to a circular dependency. */
> diff --git a/gcc/testsuite/gcc.dg/pr108241.c b/gcc/testsuite/gcc.dg/pr108241.c
> new file mode 100644
> index 00000000000..06d210fae68
> --- /dev/null
> +++ b/gcc/testsuite/gcc.dg/pr108241.c
> @@ -0,0 +1,63 @@
> +/* PR driver/108241 */
> +/* { dg-options "-Os -frounding-math -fvar-tracking-assignments -fno-dce -fno-trapping-math -fno-tree-dce -fno-tree-dse" } */
> +
> +long int n1;
> +int n2, n3, n4;
> +char n5;
> +
> +void
> +foo (long int x1, long int x2, int x3, int x4, int x5, char x6, char x7)
> +{
> + char a01 = n2, a02 = x4, a03 = 0;
> + short int a04;
> + unsigned short int a05 = x5;
> + int a06, a07, a08 = a05, a09 = x3, a10 = 0;
> + long int a11, a12 = x4;
> +
> + if (x1)
> + {
> + a07 = x6 + (float)0x1000001;
> + a03 = a12 = a01 = a06 = ~0;
> +
> + if (x5)
> + a11 = n5;
> + }
> + else
> + {
> + a10 = x3 = n3;
> + if (n3)
> + a06 = a05 = x7;
> + }
> +
> + if (n3 < n5)
> + {
> + n4 = (x2 == x4) + !n1;
> + if (n4 % (n1 % x3))
> + {
> + a04 = n4;
> + a02 = n2;
> + }
> +
> + if (x3)
> + {
> + a05 = !n1 % n2;
> + a08 = n1;
> + a04 = x5 + a06;
> + }
> +
> + if (a12)
> + a09 = n3 + n4;
> +
> + a12 = a07;
> + n3 = a11 % x1;
> + n5 += x6;
> + n1 = a04;
> + }
> +
> + n4 = x2 % x5 % a11;
> + a06 = a10 + a08 % a02 == n4;
> + a09 = a09 == a01 * x7;
> + n4 = x4;
> + a12 += x4 / 0xc000000000000000 + !a03;
> + a03 = !a05;
> +}
> diff --git a/gcc/testsuite/gcc.dg/pr79570.c b/gcc/testsuite/gcc.dg/pr79570.c
> index 00841b9487a..a15be9f201d 100644
> --- a/gcc/testsuite/gcc.dg/pr79570.c
> +++ b/gcc/testsuite/gcc.dg/pr79570.c
> @@ -1,6 +1,6 @@
> /* PR target/79570 */
> /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
> -/* { dg-options "-O2 -fselective-scheduling2 -fvar-tracking-assignments" } */
> +/* { dg-options "-O2 -fselective-scheduling2 -fvar-tracking-assignments -g" } */
> /* { dg-warning "changes selective scheduling" "" { target *-*-* } 0 } */
>
> #include "pr69956.c"
> --
> 2.40.0
>
prev parent reply other threads:[~2023-04-11 8:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 8:46 Martin Liška
2023-04-11 8:26 ` Richard Biener [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc2NENNK9qjLKdMC1CJDE=y+k8p9mL=A7fcVc0G0MC_4Jg@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mliska@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).