http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47222

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-08 18:20:58 
UTC ---
(In reply to comment #2)
> 
> Hmm, this does not seem to be dependent on plugin implementation, but it seems
> like
> bug in 32bit only testcase.  The testcase seems to use:
> 
> int g_edi=INIT_EDI, g_esi=INIT_ESI, g_ebx=INIT_EBX;
> int g_ebp, g_ebp_save, g_esp, g_esp_save;
> int n_error;
> 
> and
> 
>         __asm__ __volatile__ (
>         "movl %ebp," ASMNAME("g_ebp_save")"\n\t"
>         "movl %esp," ASMNAME("g_esp_save")"\n\t"
>         );
> 
> I guess either g_ebp_save needs externally_visible attribute or the asm
> statement needs to be modified to use g_ebp_save as an destination.

I tried

diff --git a/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h
b/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h
index b07b27c..ff56027 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h
+++ b/gcc/testsuite/g++.dg/torture/stackalign/test-unwind.h
@@ -47,8 +47,13 @@ copy (char *p, int size)
   __builtin_strncpy (p, "good", size);
 }

-int g_edi=INIT_EDI, g_esi=INIT_ESI, g_ebx=INIT_EBX; 
-int g_ebp, g_ebp_save, g_esp, g_esp_save;
+int g_edi __attribute__((externally_visible)) =INIT_EDI;
+int g_esi __attribute__((externally_visible)) =INIT_ESI;
+int g_ebx __attribute__((externally_visible)) = INIT_EBX; 
+int g_ebp __attribute__((externally_visible));
+int g_esp __attribute__((externally_visible));
+int g_ebp_save __attribute__((externally_visible));
+int g_esp_save __attribute__((externally_visible));
 int n_error;

 int

and it doesn't make a difference.

> I think this testcase is "yours", so perhaps you can fix it?
> Was there some reason to use the ASMNAME hack instead of memory output
> constraint?

We want to verify the contents of registers.

Reply via email to