From: Rainer Orth Date: Mon, 21 Jun 2010 17:23:53 +0000 (+0000) Subject: backport: target-supports.exp (check_effective_target_ucn_nocache): New function. X-Git-Tag: releases/gcc-4.4.5~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2cabc4d9d219dc9d002978e9305fe0f9a7a9156;p=thirdparty%2Fgcc.git backport: target-supports.exp (check_effective_target_ucn_nocache): New function. Backport from mainline: 2010-03-01 Rainer Orth * lib/target-supports.exp (check_effective_target_ucn_nocache): New function. (check_effective_target_ucn): Likewise. * g++.dg/other/ucnid-1.C: Don't XFAIL on *-*-solaris2.*, but skip if !ucn. * gcc.dg/ucnid-2.c: Likewise. * gcc.dg/ucnid-3.c: Likewise. * gcc.dg/ucnid-4.c: Likewise. * gcc.dg/ucnid-11.c: Likewise. * gcc.dg/ucnid-12.c: Likewise. * gcc.dg/ucnid-6.c: Skip if !ucn. * gcc.dg/ucnid-9.c: Likewise. From-SVN: r161104 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0dc5f0be54ab..fbd0b2382b11 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,22 @@ +2010-06-21 Rainer Orth + + Backport from mainline: + 2010-03-01 Rainer Orth + + * lib/target-supports.exp (check_effective_target_ucn_nocache): + New function. + (check_effective_target_ucn): Likewise. + + * g++.dg/other/ucnid-1.C: Don't XFAIL on *-*-solaris2.*, but skip + if !ucn. + * gcc.dg/ucnid-2.c: Likewise. + * gcc.dg/ucnid-3.c: Likewise. + * gcc.dg/ucnid-4.c: Likewise. + * gcc.dg/ucnid-11.c: Likewise. + * gcc.dg/ucnid-12.c: Likewise. + * gcc.dg/ucnid-6.c: Skip if !ucn. + * gcc.dg/ucnid-9.c: Likewise. + 2010-06-21 Rainer Orth Backport from mainline: diff --git a/gcc/testsuite/g++.dg/other/ucnid-1.C b/gcc/testsuite/g++.dg/other/ucnid-1.C index edc39c973b94..9a2728f25bb8 100644 --- a/gcc/testsuite/g++.dg/other/ucnid-1.C +++ b/gcc/testsuite/g++.dg/other/ucnid-1.C @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-options "-fextended-identifiers" } */ -/* { dg-xfail-if "" { powerpc-ibm-aix* *-*-solaris2.* } { "*" } { "" } } */ +/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */ +/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */ #include int \u00C0(void) { return 1; } diff --git a/gcc/testsuite/gcc.dg/ucnid-2.c b/gcc/testsuite/gcc.dg/ucnid-2.c index d8e9186bb86a..9cbc7504cec8 100644 --- a/gcc/testsuite/gcc.dg/ucnid-2.c +++ b/gcc/testsuite/gcc.dg/ucnid-2.c @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-xfail-if "" { powerpc-ibm-aix* *-*-solaris2.* } { "*" } { "" } } */ +/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */ +/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */ /* { dg-options "-std=c99 -fextended-identifiers" } */ void abort (void); diff --git a/gcc/testsuite/gcc.dg/ucnid-3.c b/gcc/testsuite/gcc.dg/ucnid-3.c index 1f3481bf3769..5ea0d03bca15 100644 --- a/gcc/testsuite/gcc.dg/ucnid-3.c +++ b/gcc/testsuite/gcc.dg/ucnid-3.c @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-xfail-if "" { powerpc-ibm-aix* *-*-solaris2.* } { "*" } { "" } } */ +/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */ +/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */ /* { dg-options "-std=c99 -fextended-identifiers" } */ void abort (void); diff --git a/gcc/testsuite/gcc.dg/ucnid-4.c b/gcc/testsuite/gcc.dg/ucnid-4.c index 0f1a12875c8b..a18e6e302a6a 100644 --- a/gcc/testsuite/gcc.dg/ucnid-4.c +++ b/gcc/testsuite/gcc.dg/ucnid-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ -/* { dg-xfail-if "" { powerpc-ibm-aix* *-*-solaris2.* } { "*" } { "" } } */ +/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */ +/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */ /* { dg-options "-std=c99 -fextended-identifiers" } */ void abort (void); diff --git a/gcc/testsuite/gcc.dg/ucnid-6.c b/gcc/testsuite/gcc.dg/ucnid-6.c index 37433a1ebf21..81e316e80d36 100644 --- a/gcc/testsuite/gcc.dg/ucnid-6.c +++ b/gcc/testsuite/gcc.dg/ucnid-6.c @@ -1,5 +1,6 @@ /* { dg-do run */ /* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! ucn } { "*" } { "" } } */ /* { dg-options "-std=c99 -fextended-identifiers -save-temps" } */ void abort (void); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 1de3760d53d2..7b63308f3c0c 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -1240,7 +1240,7 @@ proc check_effective_target_dfp { } { } # Return 1 if the target supports linking and executing Decimal Floating -# Point, # 0 otherwise. +# Point, 0 otherwise. # # This won't change for different subtargets so cache the result. @@ -1250,6 +1250,32 @@ proc check_effective_target_dfprt { } { }] } +# Return 1 if the target supports compiling and assembling UCN, 0 otherwise. + +proc check_effective_target_ucn_nocache { } { + # -std=c99 is only valid for C + if [check_effective_target_c] { + set ucnopts "-std=c99" + } + append ucnopts " -fextended-identifiers" + verbose "check_effective_target_ucn_nocache: compiling source" 2 + set ret [check_no_compiler_messages_nocache ucn object { + int \u00C0; + } $ucnopts] + verbose "check_effective_target_ucn_nocache: returning $ret" 2 + return $ret +} + +# Return 1 if the target supports compiling and assembling UCN, 0 otherwise. +# +# This won't change for different subtargets, so cache the result. + +proc check_effective_target_ucn { } { + return [check_cached_effective_target ucn { + check_effective_target_ucn_nocache + }] +} + # Return 1 if the target needs a command line argument to enable a SIMD # instruction set.