Patchwork Add testcase for possible bug in gcc-4_4 ix86 branch

login
register
mail settings
Submitter asharif tools
Date Dec. 14, 2010, 7:32 p.m.
Message ID <AANLkTikO+hE7GQt-NHR-v_GbVUPL1-2mZQPAFxO1m5e-@mail.gmail.com>
Download mbox | patch
Permalink /patch/75525/
State New
Headers show

Comments

asharif tools - Dec. 14, 2010, 7:32 p.m.
Thanks for the quick replies, Ian and Jakub.

Replies inline and please find below an updated patch that is pretty
close to minimal. This patch passes on trunk but fails with
(http://gcc.gnu.org/viewcvs?view=revision&revision=153780):



On Mon, Dec 13, 2010 at 10:46 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Dec 13, 2010 at 08:20:38PM -0800, Ian Lance Taylor wrote:
>> You should be able to use "=r" and "r" instead of "=rbp" and "rbp".  If
>> that works, then this patch is OK.

I followed Jakub's suggestion to trim the testcase.

>
> Also, please try to trim the list of variables (c through i), if you can

The minimum number of integers needed to trigger this compilation failure is 8.

> still reproduce the problem with the testcase.  And you can probably use
> just "" instead of "addl %%rbp,%%rbp".

Done.

Comments/Suggestions?
asharif tools - Dec. 16, 2010, 12:16 a.m.
On Tue, Dec 14, 2010 at 11:32 AM, asharif tools <asharif.tools@gmail.com> wrote:
> Thanks for the quick replies, Ian and Jakub.
>
> Replies inline and please find below an updated patch that is pretty
> close to minimal. This patch passes on trunk but fails with
> (http://gcc.gnu.org/viewcvs?view=revision&revision=153780):
>
> Index: gcc/testsuite/gcc.target/i386/max-stack-align.c
> ===================================================================
> --- gcc/testsuite/gcc.target/i386/max-stack-align.c     (revision 0)
> +++ gcc/testsuite/gcc.target/i386/max-stack-align.c     (revision 0)
> @@ -0,0 +1,14 @@
> +/* { dg-do compile } */
> +/* { dg-options "-fomit-frame-pointer" } */
> +/* { dg-require-effective-target lp64 } */
> +
> +void foo()
> +{
> +  int a=0, b=0, c=0, e=0, f=0, g=0, h=0, i=0;
> +       __asm__ __volatile__ (""
> +               :
> +               :
> +               : "bp"
> +       );
> +}
> +
>
>
> On Mon, Dec 13, 2010 at 10:46 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> On Mon, Dec 13, 2010 at 08:20:38PM -0800, Ian Lance Taylor wrote:
>>> You should be able to use "=r" and "r" instead of "=rbp" and "rbp".  If
>>> that works, then this patch is OK.
>
> I followed Jakub's suggestion to trim the testcase.
>
>>
>> Also, please try to trim the list of variables (c through i), if you can
>
> The minimum number of integers needed to trigger this compilation failure is 8.
>
>> still reproduce the problem with the testcase.  And you can probably use
>> just "" instead of "addl %%rbp,%%rbp".
>
> Done.
>
> Comments/Suggestions?
>

Ping.

Is this OK for trunk?

I hope I have addressed your concerns/comments adequately.
Ian Taylor - Dec. 17, 2010, 4:48 p.m.
asharif tools <asharif.tools@gmail.com> writes:

> Thanks for the quick replies, Ian and Jakub.
>
> Replies inline and please find below an updated patch that is pretty
> close to minimal. This patch passes on trunk but fails with
> (http://gcc.gnu.org/viewcvs?view=revision&revision=153780):
>
> Index: gcc/testsuite/gcc.target/i386/max-stack-align.c
> ===================================================================
> --- gcc/testsuite/gcc.target/i386/max-stack-align.c	(revision 0)
> +++ gcc/testsuite/gcc.target/i386/max-stack-align.c	(revision 0)
> @@ -0,0 +1,14 @@
> +/* { dg-do compile } */
> +/* { dg-options "-fomit-frame-pointer" } */
> +/* { dg-require-effective-target lp64 } */
> +
> +void foo()
> +{
> +  int a=0, b=0, c=0, e=0, f=0, g=0, h=0, i=0;
> +	__asm__ __volatile__ (""
> +		:
> +		:
> +		: "bp"
> +	);
> +}

This is OK with a ChangeLog entry.

Thanks.

Ian

Patch

Index: gcc/testsuite/gcc.target/i386/max-stack-align.c
===================================================================
--- gcc/testsuite/gcc.target/i386/max-stack-align.c	(revision 0)
+++ gcc/testsuite/gcc.target/i386/max-stack-align.c	(revision 0)
@@ -0,0 +1,14 @@ 
+/* { dg-do compile } */
+/* { dg-options "-fomit-frame-pointer" } */
+/* { dg-require-effective-target lp64 } */
+
+void foo()
+{
+  int a=0, b=0, c=0, e=0, f=0, g=0, h=0, i=0;
+	__asm__ __volatile__ (""
+		:
+		:
+		: "bp"
+	);
+}
+