diff mbox

Remove WORD_SWITCH_TAKES_ARG (Darwin testers useful)

Message ID 36F51F41-3149-45F7-AF3A-D4AFAB10FD2F@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Nov. 13, 2010, 12:58 p.m. UTC
On 8 Nov 2010, at 22:04, Mike Stump wrote:

> On Nov 6, 2010, at 4:39 AM, IainS wrote:
>> But, it is possible to do at least a rudimentary functionality test  
>> for segaddr.
>>
>> (It would be possible to do something similar with sectcreate -  
>> however, dg-additional-files doesn't seem to work for the non- 
>> remote case.)
>>
>> Should we apply something like this as a backstop?
>
> Well, if you're going to write a testcase, it's hard to say no...

added as r166705
cheers
Iain
diff mbox

Patch

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 166703)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,7 @@ 
+2010-11-13  Iain Sandoe  <iains@gcc.gnu.org>
+
+	* gcc.dg/darwin-segaddr.c: New test for multiple argument c/l switch.
+
 2010-11-13  Tobias Burnus  <burnus@net-b.de>
 
 	PR fortran/45742
Index: gcc/testsuite/gcc.dg/darwin-segaddr.c
===================================================================
--- gcc/testsuite/gcc.dg/darwin-segaddr.c	(revision 0)
+++ gcc/testsuite/gcc.dg/darwin-segaddr.c	(revision 0)
@@ -0,0 +1,19 @@ 
+/* Check that -segaddr gets through and works.  */
+/* { dg-do run { target *-*-darwin* } } */
+/* { dg-options "-O0 -segaddr __TEST 0x200000" { target { *-*-darwin* && { ! lp64 } } } } */
+/* { dg-options "-O0 -segaddr __TEST 0x110000000" { target { *-*-darwin* && lp64 } } } */
+
+extern void abort ();
+
+int t __attribute__((section("__TEST,__test")));
+
+int main (void)
+{
+#ifdef __LP64__
+  if ((unsigned long long) &t != 0x110000000ULL)
+#else
+  if ((unsigned long) &t != 0x200000UL)
+#endif
+    abort ();
+  return 0;
+}