]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 12 Apr 2011 16:37:04 +0000 (16:37 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Tue, 12 Apr 2011 16:37:04 +0000 (16:37 +0000)
Backport from mainline:
2011-02-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

PR testsuite/47400
* doc/sourcebuild.texi (Require Support): Document
dg-require-ascii-locale.

gcc/testsuite:
Backport from mainline:
2011-02-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

PR testsuite/47400
* lib/target-supports.exp (check_ascii_locale_available): New proc.
* lib/target-supports-dg.exp (dg-require-ascii-locale): New proc.
* gcc.dg/attr-alias-5.c: Use dg-require-ascii-locale.
* gcc.dg/ucnid-10.c: Likewise.
* gcc.dg/ucnid-13.c: Likewise.
* gcc.dg/ucnid-7.c: Likewise.
* gcc.dg/ucnid-8.c: Likewise.
Adapt dg-warning line number.

From-SVN: r172326

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/attr-alias-5.c
gcc/testsuite/gcc.dg/ucnid-10.c
gcc/testsuite/gcc.dg/ucnid-13.c
gcc/testsuite/gcc.dg/ucnid-7.c
gcc/testsuite/gcc.dg/ucnid-8.c
gcc/testsuite/lib/target-supports-dg.exp
gcc/testsuite/lib/target-supports.exp

index fdd2535499ff7fa1db59106b78497021deae90a1..94af0092fc1654d6357ba96d903756d360080960 100644 (file)
@@ -1,3 +1,12 @@
+2011-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2011-02-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR testsuite/47400
+       * doc/sourcebuild.texi (Require Support): Document
+       dg-require-ascii-locale.
+
 2011-04-12  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
 
        Backport from mainline:
index 02b85ac3e7ca9194b45a1fd7b0624604b84e1f10..a7a76e2ad59163205b12a088b305f0d07e5b6c79 100644 (file)
@@ -1,4 +1,4 @@
-@c Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+@c Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011
 @c Free Software Foundation, Inc.
 @c This is part of the GCC manual.
 @c For copying conditions, see the file gcc.texi.
@@ -1925,6 +1925,9 @@ take arguments could be replaced with effective-target keywords.
 @item dg-require-alias ""
 Skip the test if the target does not support the @samp{alias} attribute.
 
+@item dg-require-ascii-locale ""
+Skip the test if the host does not support an ASCII locale.
+
 @item dg-require-compat-dfp ""
 Skip this test unless both compilers in a @file{compat} testsuite
 support decimal floating point.
index af47b5734c8220643754d9e6ad72c7bde414f1f2..1ca372205992be4ea3bc039beabaebf766e235f8 100644 (file)
@@ -1,3 +1,18 @@
+2011-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2011-02-11  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR testsuite/47400
+       * lib/target-supports.exp (check_ascii_locale_available): New proc.
+       * lib/target-supports-dg.exp (dg-require-ascii-locale): New proc.
+       * gcc.dg/attr-alias-5.c: Use dg-require-ascii-locale.
+       * gcc.dg/ucnid-10.c: Likewise.
+       * gcc.dg/ucnid-13.c: Likewise.
+       * gcc.dg/ucnid-7.c: Likewise.
+       * gcc.dg/ucnid-8.c: Likewise.
+       Adapt dg-warning line number.
+
 2011-04-07  Jakub Jelinek  <jakub@redhat.com>
 
        PR fortran/48117
index 554668d212f3e4418937d886b53d55f8e73eb02b..d22c286fc6585d0f4199bb6684cf0a1ff16c3495 100644 (file)
@@ -3,6 +3,7 @@
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99" } */
 /* { dg-require-alias "" } */
+/* { dg-require-ascii-locale "" } */
 
 void f0 (void) __attribute__((alias("\xa1"))); /* { dg-error "undefined symbol '\\\\241'" } */
 void f1 (void) __attribute__((alias("\u00e9"))); /* { dg-error "undefined symbol '\\\\U000000e9'" } */
index 39148108b3330e9650acd12d4910e7e06541572e..f05db118df49dccc4d8390df0b35bfe43d25d68a 100644 (file)
@@ -2,6 +2,7 @@
    locale).  Test #pragma pack diagnostics.  */
 /* { dg-do compile { target *-*-linux* *-*-cygwin* powerpc*-*-eabi* } } */
 /* { dg-options "-std=gnu99 -fextended-identifiers" } */
+/* { dg-require-ascii-locale "" } */
 
 #pragma pack(push)
 #pragma pack(pop, \u00f3) /* { dg-warning "pop, \\\\U000000f3.*push, \\\\U000000f3" } */
index 8ec69fa3b930875e7d6de0879ca89a873219d5bf..942178994226fae15eda39146d053ff027fbe425 100644 (file)
@@ -2,6 +2,7 @@
    locale).  Miscellaneous diagnostics.  */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99 -fextended-identifiers -Wpacked" } */
+/* { dg-require-ascii-locale "" } */
 
 int a __attribute__((\u00c0)); /* { dg-warning "'\\\\U000000c0' attribute directive ignored" } */
 
index fe53a497ffa3686006e50eeb97eb40206f95d035..1dbcb9ac77b28c3282ac8f533569b9deb6308e2e 100644 (file)
@@ -2,6 +2,7 @@
    locale).  */
 /* { dg-do compile } */
 /* { dg-options "-std=c99 -fextended-identifiers" } */
+/* { dg-require-ascii-locale "" } */
 
 void *p = &\u00e9; /* { dg-error "'\\\\U000000e9' undeclared" } */
 void *q = &\u1e00; /* { dg-error "'\\\\U00001e00' undeclared" } */
index 4ec3eeba29f79e0354a9e8b7b7bb875d64a77614..ea2e051f04a656109ac1b8bda01e67572de30933 100644 (file)
@@ -2,6 +2,7 @@
    locale).  Further tests of C front-end diagnostics.  */
 /* { dg-do compile } */
 /* { dg-options "-std=gnu99 -fextended-identifiers -Wvla" } */
+/* { dg-require-ascii-locale "" } */
 
 int a __attribute__((__mode__(\u00e9))); /* { dg-error "unknown machine mode '\\\\U000000e9'" } */
 struct s1 { int \u00e9 : 0; }; /* { dg-error "zero width for bit-field '\\\\U000000e9'" } */
@@ -11,4 +12,4 @@ void f (int b) { int \u00e9[b]; } /* { dg-warning "variable length array '\\\\U0
 void g (static int \u00e9); /* { dg-error "storage class specified for parameter '\\\\U000000e9'" } */
 
 struct s2 { int \u00e1; } \u00e9 = { { 0 } }; /* { dg-warning "braces around scalar initializer" } */
-/* { dg-warning "near initialization for '\\\\U000000e9\\.\\\\U000000e1'" "UCN diag" { target *-*-* } 13 } */
+/* { dg-warning "near initialization for '\\\\U000000e9\\.\\\\U000000e1'" "UCN diag" { target *-*-* } 14 } */
index e742d750c762d5823a6a3237996f7325cc7965b9..4239c389044f82f359c1098e0dd65c04b89f1d29 100644 (file)
@@ -1,5 +1,5 @@
-#   Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -128,6 +128,15 @@ proc dg-require-dll { args } {
     set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
 }
 
+# If this host does not support an ASCII locale, skip this test.
+
+proc dg-require-ascii-locale { args } {
+    if { ![ check_ascii_locale_available] } {
+       upvar dg-do-what dg-do-what
+        set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+    }
+}
+
 proc dg-require-iconv { args } {
     if { ![ check_iconv_available ${args} ] } {
        upvar dg-do-what dg-do-what
index da23650f2b923c8a9faad95785f8cf939e530868..013ba0bccc965653eb04172c398a296673d04c8c 100644 (file)
@@ -850,6 +850,17 @@ proc check_iconv_available { test_what } {
     }] $libiconv]
 }
 
+# Return 1 if an ASCII locale is supported on this host, 0 otherwise.
+
+proc check_ascii_locale_available { } {
+    if { ([ishost alpha*-dec-osf*] || [ishost mips-sgi-irix*]) } {
+       # Neither Tru64 UNIX nor IRIX support an ASCII locale.
+       return 0
+    } else {
+       return 1
+    }
+}
+
 # Return true if named sections are supported on this target.
 
 proc check_named_sections_available { } {