This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, testsuite]: Check for IBM1047 code set instead of IBM-1047.
- From: Uros Bizjak <uros at kss-loka dot si>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Feb 2005 16:36:16 +0100
- Subject: [PATCH, testsuite]: Check for IBM1047 code set instead of IBM-1047.
Hello!
Recently, gcc.dg/charset/builtin1.c test started to fail with:
FAIL: gcc.dg/charset/builtin1.c (test for excess errors)
WARNING: gcc.dg/charset/builtin1.c compilation failed to produce executable
It appears that a check for IBM-1047 code set support is missing in
builtin1.c source.
However, IBM-1047 is an alias to the IBM1047 code set, and it looks that
my iconv [iconv (GNU libc) 2.2.93] doesn't recognise this alias. Due to
this glitch, all gcc.dg/charset/* tests are skipped as UNSUPPORTED.
Attached to this message is a patch that changes all checks for IBM-1047
code sets in gcc.dg/charset/ directory to checks for IBM1047 code sets.
The patch was checked with make -k check and changes the statistics of
gcc test run from:
# of expected passes 33197
# of unexpected failures 2
# of unexpected successes 1
# of expected failures 99
# of untested testcases 28
# of unsupported tests 317
to:
# of expected passes 33226
# of unexpected failures 1
# of unexpected successes 1
# of expected failures 99
# of untested testcases 28
# of unsupported tests 306
2005-02-21 Uros Bizjak <uros@kss-loka.si>
* gcc.dg/charset/builtin1.c: Use dg-require-iconv "IBM1047".
* gcc.dg/charset/asm1.c: Check for IBM1047 code set, not IBM-1047.
* gcc.dg/charset/asm2.c: Likewise.
* gcc.dg/charset/asm3.c: Likewise.
* gcc.dg/charset/asm4.c: Likewise.
* gcc.dg/charset/asm5.c: Likewise.
* gcc.dg/charset/asm6.c: Likewise.
* gcc.dg/charset/attribute1.c: Likewise.
* gcc.dg/charset/attribute2.c: Likewise.
* gcc.dg/charset/builtin1.c: Likewise.
* gcc.dg/charset/extern.c: Likewise.
* gcc.dg/charset/function.c: Likewise.
* gcc.dg/charset/string.c: Likewise.
* gcc.dg/charset/charset.exp:Likewise.
BTW: The remaining failure is:
FAIL: gcc.dg/cpp/arith-3.c (test for bogus messages, line 257)
This failure is a bit of mystery, as line 257 marks bogus message:
#if 1 * TARG_MIN != TARG_MIN /* { dg-bogus "overflow" } */ <<< here
# error /* { dg-bogus "error" } */
#endif
Uros.
Index: gcc.dg/charset/asm1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/asm1.c,v
retrieving revision 1.1
diff -u -p -r1.1 asm1.c
--- gcc.dg/charset/asm1.c 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/asm1.c 21 Feb 2005 15:18:47 -0000
@@ -1,5 +1,5 @@
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler ".ascii bar" } }
{ dg-final { scan-assembler ".ascii foo" } }
*/
Index: gcc.dg/charset/asm2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/asm2.c,v
retrieving revision 1.3
diff -u -p -r1.3 asm2.c
--- gcc.dg/charset/asm2.c 4 Nov 2004 16:01:37 -0000 1.3
+++ gcc.dg/charset/asm2.c 21 Feb 2005 15:18:47 -0000
@@ -2,7 +2,7 @@
If we ever get a good way to test error recovery
the string "foobar" should be translated. */
/* { dg-do compile } */
-/* { dg-require-iconv "IBM-1047" } */
+/* { dg-require-iconv "IBM1047" } */
asm (not_a_string); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
char x[] = "foobar";
Index: gcc.dg/charset/asm3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/asm3.c,v
retrieving revision 1.2
diff -u -p -r1.2 asm3.c
--- gcc.dg/charset/asm3.c 28 Feb 2004 00:28:55 -0000 1.2
+++ gcc.dg/charset/asm3.c 21 Feb 2005 15:18:47 -0000
@@ -1,7 +1,7 @@
/* Test for complex asm statements. Make sure it compiles
then test for some of the asm statements not being translated. */
/* { dg-do compile { target i?86-*-* } }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler "std" } }
{ dg-final { scan-assembler "cld" } }
{ dg-final { scan-assembler "rep" } }
Index: gcc.dg/charset/asm4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/asm4.c,v
retrieving revision 1.1
diff -u -p -r1.1 asm4.c
--- gcc.dg/charset/asm4.c 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/asm4.c 21 Feb 2005 15:18:47 -0000
@@ -1,6 +1,6 @@
/* Simple asm test. */
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler "foo" } } */
extern int bar;
Index: gcc.dg/charset/asm5.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/asm5.c,v
retrieving revision 1.1
diff -u -p -r1.1 asm5.c
--- gcc.dg/charset/asm5.c 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/asm5.c 21 Feb 2005 15:18:47 -0000
@@ -1,6 +1,6 @@
/* Test for string translation. */
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler-not "translate" } } */
void foo (void)
{
Index: gcc.dg/charset/asm6.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/asm6.c,v
retrieving revision 1.1
diff -u -p -r1.1 asm6.c
--- gcc.dg/charset/asm6.c 15 Jun 2004 23:09:24 -0000 1.1
+++ gcc.dg/charset/asm6.c 21 Feb 2005 15:18:47 -0000
@@ -1,6 +1,6 @@
/* Test for string translation. */
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler "foo" } } */
int main()
{
Index: gcc.dg/charset/attribute1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/attribute1.c,v
retrieving revision 1.1
diff -u -p -r1.1 attribute1.c
--- gcc.dg/charset/attribute1.c 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/attribute1.c 21 Feb 2005 15:18:47 -0000
@@ -1,6 +1,6 @@
/* Test for attribute non-translation. */
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler "foo" } } */
int walrus __attribute__ ((section (".foo")));
Index: gcc.dg/charset/attribute2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/attribute2.c,v
retrieving revision 1.1
diff -u -p -r1.1 attribute2.c
--- gcc.dg/charset/attribute2.c 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/attribute2.c 21 Feb 2005 15:18:48 -0000
@@ -2,7 +2,7 @@
If error recovery is ever testable then "foobar" should be
translated. */
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
*/
int foo __attribute__ ((walrus)); /* { dg-error "walrus" "ignored" } */
char x[] = "foobar";
Index: gcc.dg/charset/builtin1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/builtin1.c,v
retrieving revision 1.1
diff -u -p -r1.1 builtin1.c
--- gcc.dg/charset/builtin1.c 20 Feb 2005 17:01:31 -0000 1.1
+++ gcc.dg/charset/builtin1.c 21 Feb 2005 15:18:48 -0000
@@ -2,7 +2,8 @@
we know the correct value of '0'. PR 18785. */
/* { dg-do run } */
-/* { dg-options "-O2 -fno-inline -fexec-charset=IBM-1047" } */
+/* { dg-require-iconv "IBM1047" } */
+/* { dg-options "-O2 -fno-inline -fexec-charset=IBM1047" } */
extern int isdigit(int);
extern void abort(void);
Index: gcc.dg/charset/charset.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/charset.exp,v
retrieving revision 1.1
diff -u -p -r1.1 charset.exp
--- gcc.dg/charset/charset.exp 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/charset.exp 21 Feb 2005 15:18:48 -0000
@@ -30,7 +30,7 @@ load_lib target-supports.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CHARSETCFLAGS
if ![info exists DEFAULT_CHARSETCFLAGS] then {
- set DEFAULT_CHARSETCFLAGS "-fexec-charset=IBM-1047"
+ set DEFAULT_CHARSETCFLAGS "-fexec-charset=IBM1047"
}
# Initialize `dg'.
Index: gcc.dg/charset/extern.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/extern.c,v
retrieving revision 1.1
diff -u -p -r1.1 extern.c
--- gcc.dg/charset/extern.c 20 Apr 2004 21:50:12 -0000 1.1
+++ gcc.dg/charset/extern.c 21 Feb 2005 15:18:48 -0000
@@ -1,5 +1,5 @@
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler-not "abcdefghijklmnopqrstuvwxyz" } } */
extern char *bar;
Index: gcc.dg/charset/function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/function.c,v
retrieving revision 1.1
diff -u -p -r1.1 function.c
--- gcc.dg/charset/function.c 28 May 2004 21:56:59 -0000 1.1
+++ gcc.dg/charset/function.c 21 Feb 2005 15:18:48 -0000
@@ -1,5 +1,5 @@
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler-not "\"foobar\"" } } */
const char *str;
Index: gcc.dg/charset/string.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/charset/string.c,v
retrieving revision 1.1
diff -u -p -r1.1 string.c
--- gcc.dg/charset/string.c 27 Feb 2004 02:01:09 -0000 1.1
+++ gcc.dg/charset/string.c 21 Feb 2005 15:18:48 -0000
@@ -1,5 +1,5 @@
/* Simple character translation test. */
/* { dg-do compile }
- { dg-require-iconv "IBM-1047" }
+ { dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler-not "string foobar" } } */
char *foo = "string foobar";