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


> 
> 
> This is a multi-part message in MIME format.
> --------------080402040301070800080809
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> 
> 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?  What about 4.2?
> 
> Thanks -
> 
> Josh
> 
> 2006-12-12  Josh Conner  <jconner@apple.com>
> 
> 	* g++.dg/abi/thunk3.C: Use .weak_definition on darwin.
> 	* g++.dg/abi/thunk4.C: Likewise.
> 	* g++.dg/abi/rtti3.C: Likewise.
> 
> 
> :ADDPATCH testsuite:
> 
> --------------080402040301070800080809
> Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
>  name="weak_definition.txt"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline;
>  filename="weak_definition.txt"
> 
> Index: thunk3.C
> ===================================================================
> --- thunk3.C	(revision 121257)
> +++ thunk3.C	(working copy)
> @@ -1,5 +1,5 @@
>  // { dg-require-weak "" }
> -// { dg-final { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" } }
> +// { dg-final { if [ istarget *-*-darwin* ] { scan-assembler-not ".weak_definition\[\t \]_?_ZThn._N7Derived3FooEv" } else { scan-assembler-not ".weak\[\t \]_?_ZThn._N7Derived3FooEv" } } }

I would not use TCL syntax inside dg-final.

maybe something like the following instead:
{ dg-final { scan-assembler-not ".\{weak,weak_definition\}\[\t \]_?_ZThn._N7Derived3FooEv" } }

Will work.

Thanks,
Andrew Pinski


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