OSDN Git Service

Call abort for runtime test, always return 0 from main.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / target-supports-dg.exp
index 321daac..ac88a7f 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2007, 2009
+#   Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2007, 2008, 2009
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -45,6 +45,21 @@ proc dg-require-weak { args } {
     }
 }
 
+# If this target does not support overriding weak symbols, skip this
+# test.
+
+proc dg-require-weak-override { args } {
+    set weak_override_available [ check_weak_override_available ]
+    if { $weak_override_available == -1 } {
+       upvar name name
+       unresolved "$name"
+    }
+    if { $weak_override_available != 1 } {
+       upvar dg-do-what dg-do-what
+       set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+    }
+}
+
 # If this target does not support the "visibility" attribute, skip this
 # test.