From: Jakub Jelinek <jakub@redhat.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org, rguenther@suse.de
Subject: Re: PR 55875 (IV wrapping issue)
Date: Tue, 08 Jan 2013 16:51:00 -0000 [thread overview]
Message-ID: <20130108165134.GL7269@tucnak.redhat.com> (raw)
In-Reply-To: <20130108164928.GA3891@kam.mff.cuni.cz>
On Tue, Jan 08, 2013 at 05:49:28PM +0100, Jan Hubicka wrote:
> --- testsuite/gcc.c-torture/execute/pr55875.c (revision 0)
> +++ testsuite/gcc.c-torture/execute/pr55875.c (revision 0)
> @@ -0,0 +1,17 @@
Please add
/* PR tree-optimization/55875 */
here.
> +int a[250];
> +__attribute__ ((noinline))
> +t(int i)
> +{
> + if (i==0)
> + exit(0);
> + if (i>255)
> + abort ();
> +}
> +main()
> +{
> + unsigned int i;
> + for (i=0;;i++)
> + {
> + a[i]=t((unsigned char)(i+5));
> + }
> +}
> Index: testsuite/g++.dg/torture/pr55875.C
> ===================================================================
> --- testsuite/g++.dg/torture/pr55875.C (revision 0)
> +++ testsuite/g++.dg/torture/pr55875.C (revision 0)
And
// PR tree-optimization/55875
// { dg-do run }
here, dg-do compile is the default.
> @@ -0,0 +1,53 @@
> +struct A
> +{
> + short int a1;
> + unsigned char a2;
> + unsigned int a3;
> +};
> +
> +struct B
> +{
> + unsigned short b1;
> + const A *b2;
> +};
> +
> +B b;
> +
> +__attribute__((noinline, noclone))
> +int foo (unsigned x)
> +{
> + __asm volatile ("" : "+r" (x) : : "memory");
> + return x;
> +}
> +
> +inline void
> +bar (const int &)
> +{
> +}
> +
> +__attribute__((noinline)) void
> +baz ()
> +{
> + const A *a = b.b2;
> + unsigned int i;
> + unsigned short n = b.b1;
> + for (i = 0; i < n; ++i)
> + if (a[i].a1 == 11)
> + {
> + if (i > 0 && (a[i - 1].a2 & 1))
> + continue;
> + bar (foo (2));
> + return;
There should be tabs on the 4 above lines, just bugzilla ate it.
Jakub
next prev parent reply other threads:[~2013-01-08 16:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 16:35 Jan Hubicka
2013-01-08 16:49 ` Jan Hubicka
2013-01-08 16:51 ` Jakub Jelinek [this message]
2013-01-08 20:28 ` Jan Hubicka
2013-01-09 9:05 ` Richard Biener
2013-01-09 13:57 ` Jan Hubicka
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=20130108165134.GL7269@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=rguenther@suse.de \
/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).