X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Ftestsuite%2Flib%2Ftarget-supports-dg.exp;h=ac88a7f255730ecb2e9b231fd4488f23eaf3b491;hb=9fe3fe75581516ba44e070b715411198002b418c;hp=321daac323906302c70f0421a64796da477129c7;hpb=f1a3ada1a31dd5264b8d9020cf8f2b27479615f5;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp index 321daac3239..ac88a7f2557 100644 --- a/gcc/testsuite/lib/target-supports-dg.exp +++ b/gcc/testsuite/lib/target-supports-dg.exp @@ -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.