This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix three testcases for Darwin


Mike Stump wrote:
> On Dec 12, 2006, at 5:39 PM, Josh Conner wrote:
>> Darwin uses .weak_definition directives instead of .weak to declare
>> symbols as weak.  The attached patch changes three testcases to check
>> for the correct syntax when the target is darwin.  Verified that the
>> tests pass with patch applied on powerpc-apple-darwin and
>> i686-pc-linux-gnu.  OK for mainline?
> 
> I'm fine with the substance, I think I don't like the form.
> 
> See gcc.dg/pr27095.c for what I'd call a better form.
> 
> Ok if you use that style.
> 
>> What about 4.2?
> 
> Ok for 4.2 as applicable.
> 

Thanks for the review.  Attached is the updated patch I applied to
mainline and 4.2.

- Josh

Index: thunk3.C
===================================================================
--- thunk3.C	(revision 119813)
+++ thunk3.C	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-weak "" }
-// { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" } }
+// { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler-not ".weak_definition\[\t \]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
 
 struct Base 
 {
Index: rtti3.C
===================================================================
--- rtti3.C	(revision 119813)
+++ rtti3.C	(working copy)
@@ -2,8 +2,10 @@
 // necessarily the type info object
 
 // { dg-require-weak "" }
-// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" } }
-// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" } }
+// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } }
+// { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } }
 
 struct A;
 
Index: thunk4.C
===================================================================
--- thunk4.C	(revision 119813)
+++ thunk4.C	(working copy)
@@ -1,5 +1,6 @@
 // { dg-require-weak "" }
-// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" } }
+// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
 
 struct Base 
 {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]