* gcc.dg/20020312-2.c: Update for darwin.
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2002 23:01:49 +0000 (23:01 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 Sep 2002 23:01:49 +0000 (23:01 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57320 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20020312-2.c

index 15d47ea..4757867 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-19  Geoffrey Keating  <geoffk@apple.com>
+
+       * gcc.dg/20020312-2.c: Update for darwin.
+
 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
 
        * g++.old-deja/g++.other/crash32.C: Mark ICE.
index 5802d9e..8231938 100644 (file)
@@ -72,8 +72,8 @@
 /* No pic register.  */
 #elif defined(__pj__)
 /* No pic register.  */
-#elif defined(__powerpc__) || defined(__PPC__)
-# ifdef __darwin__
+#elif defined(__powerpc__) || defined(__PPC__) || defined(__POWERPC__)
+# ifdef __MACH__
 #  define PIC_REG  "31"
 # else
 #  define PIC_REG  "30"
@@ -144,8 +144,9 @@ main()
 
   /* Additionally test that the prologue/epilogue properly does *not*
      save and restore global registers.  Not possible when the PIC
-     register is in a register window, of course.  */
-#ifndef __sparc__
+     register is in a register window, of course.  On Darwin, you can't
+     call library routines from non-PIC code.  */
+#if !defined (__sparc__) && !(defined(__MACH__) && defined(__POWERPC__))
   if (reg)
     abort ();
 #endif