This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Convert gcc.c-torture/compile to dg
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 Jun 2003 22:43:11 -0700
- Subject: PATCH: Convert gcc.c-torture/compile to dg
- Reply-to: mark at codesourcery dot com
This patch converts one hunk of the c-torture tests to the dg driver.
In the process, we remove the ugly .x files in that directory go away.
Tested on i686-pc-linux-gnu, applied on the mainline.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2003-06-12 Mark Mitchell <mark@codesourcery.com>
* lib/gcc-dg.exp (dg-require-dll): New function.
(dg-xfail-if): Likewise.
* gcc.c-torture/compile/compile.exp: Use dg rather than c-torture
driver.
* gcc.c-torture/compile/20000804-1.c: Convert to dg format.
* gcc.c-torture/compile/20001205-1.c: Likewise.
* gcc.c-torture/compile/20001226-1.c: Likewise.
* gcc.c-torture/compile/20010518-2.c: Likewise.
* gcc.c-torture/compile/20020312-1.c: Likewise.
* gcc.c-torture/compile/20020604-1.c: Likewise.
* gcc.c-torture/compile/920501-12.c: Likewise.
* gcc.c-torture/compile/920501-4.c: Likewise.
* gcc.c-torture/compile/920520-1.c: Likewise.
* gcc.c-torture/compile/920521-1.c: Likewise.
* gcc.c-torture/compile/920625-1.c: Likewise.
* gcc.c-torture/compile/961203-1.c: Likewise.
* gcc.c-torture/compile/980506-1.c: Likewise.
* gcc.c-torture/compile/981006-1.c: Likewise.
* gcc.c-torture/compile/981022-1.c: Likewise.
* gcc.c-torture/compile/981223-1.c: Likewise.
* gcc.c-torture/compile/990617-1.c: Likewise.
* gcc.c-torture/compile/dll.c: Likewise.
* gcc.c-torture/compile/labels-3.c: Likewise.
* gcc.c-torture/compile/mipscop-1.c: Likewise.
* gcc.c-torture/compile/mipscop-2.c: Likewise.
* gcc.c-torture/compile/mipscop-3.c: Likewise.
* gcc.c-torture/compile/mipscop-4.c: Likewise.
* gcc.c-torture/compile/simd-5.c: Likewise.
* gcc.c-torture/compile/20000804-1.x: Remove.
* gcc.c-torture/compile/20001205-1.x: Likewise.
* gcc.c-torture/compile/20001226-1.x: Likewise.
* gcc.c-torture/compile/20010518-2.x: Likewise.
* gcc.c-torture/compile/20020312-1.x: Likewise.
* gcc.c-torture/compile/20020604-1.x: Likewise.
* gcc.c-torture/compile/920501-12.x: Likewise.
* gcc.c-torture/compile/920501-4.x: Likewise.
* gcc.c-torture/compile/920520-1.x: Likewise.
* gcc.c-torture/compile/920521-1.x: Likewise.
* gcc.c-torture/compile/920625-1.x: Likewise.
* gcc.c-torture/compile/961203-1.x: Likewise.
* gcc.c-torture/compile/980506-1.x: Likewise.
* gcc.c-torture/compile/981006-1.x: Likewise.
* gcc.c-torture/compile/981022-1.x: Likewise.
* gcc.c-torture/compile/981223-1.x: Likewise.
* gcc.c-torture/compile/990617-1.x: Likewise.
* gcc.c-torture/compile/mipscop-1.x: Likewise.
* gcc.c-torture/compile/mipscop-2.x: Likewise.
* gcc.c-torture/compile/mipscop-3.x: Likewise.
* gcc.c-torture/compile/mipscop-4.x: Likewise.
* gcc.c-torture/compile/simd-5.x: Likewise.
* gcc.c-torture/compile/20021205-1.c: Remove bogus dg commands.
Index: gcc.c-torture/compile/20000804-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 20000804-1.c
*** gcc.c-torture/compile/20000804-1.c 4 Aug 2000 22:06:49 -0000 1.1
--- gcc.c-torture/compile/20000804-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,6 ****
! /* Copyright (C) 2000 Free Software Foundation */
__complex__ long long f ()
{
int i[99];
__complex__ long long v;
--- 1,10 ----
! /* This does not work on m68hc11 or h8300 due to the use of an asm
! statement to force a 'long long' (64-bits) to go in a register. */
! /* { dg-do assemble { xfail m6811-*-* m6812-*-* h8300-*-* } } */
!
! /* Copyright (C) 2000, 2003 Free Software Foundation */
__complex__ long long f ()
{
int i[99];
__complex__ long long v;
Index: gcc.c-torture/compile/20000804-1.x
===================================================================
RCS file: gcc.c-torture/compile/20000804-1.x
diff -N gcc.c-torture/compile/20000804-1.x
*** gcc.c-torture/compile/20000804-1.x 8 Jun 2003 19:38:00 -0000 1.4
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,10 ****
- # This does not work on m68hc11 or h8300 due to the use of an asm statement
- # to force a 'long long' (64-bits) to go in a register.
-
- if { [istarget "m6811-*-*"]
- || [istarget "m6812-*-*"]
- || [istarget "h8300-*-*"] } {
- return 1
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/20001205-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20001205-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 20001205-1.c
*** gcc.c-torture/compile/20001205-1.c 5 Dec 2000 08:13:27 -0000 1.1
--- gcc.c-torture/compile/20001205-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,9 ----
+ /* This does not work on m68hc11 due to the asm statement which forces
+ two 'long' (32-bits) variables to go in registers. */
+ /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+
static inline unsigned long rdfpcr(void)
{
unsigned long tmp, ret;
__asm__ ("" : "=r"(tmp), "=r"(ret));
return ret;
Index: gcc.c-torture/compile/20001205-1.x
===================================================================
RCS file: gcc.c-torture/compile/20001205-1.x
diff -N gcc.c-torture/compile/20001205-1.x
*** gcc.c-torture/compile/20001205-1.x 15 Jan 2003 21:26:13 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,7 ****
- # This does not work on m68hc11 due to the asm statement which
- # forces two 'long' (32-bits) variables to go in registers.
-
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- return 1
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/20001226-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20001226-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 20001226-1.c
*** gcc.c-torture/compile/20001226-1.c 27 Dec 2000 11:01:03 -0000 1.1
--- gcc.c-torture/compile/20001226-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,10 ----
+ /* This does not assemble on m68hc11 because the function is larger
+ than 64K. */
+ /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+ /* { dg-xfail-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */
+
/* This testcase exposed two branch shortening bugs on powerpc. */
#define C(a,b) \
if (a > b) goto gt; \
if (a < b) goto lt;
Index: gcc.c-torture/compile/20001226-1.x
===================================================================
RCS file: gcc.c-torture/compile/20001226-1.x
diff -N gcc.c-torture/compile/20001226-1.x
*** gcc.c-torture/compile/20001226-1.x 15 Jan 2003 21:26:13 -0000 1.5
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,22 ****
- # This does not assemble on m68hc11 because the function is larger
- # than 64K.
-
- global target_triplet
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- return 1
- }
-
- # It doesn't work on Xtensa with -O0 because the function is larger
- # than the range of a jump instruction (+- 128K) and the assembler
- # does not yet relax jumps to indirect jumps.
-
- set torture_eval_before_compile {
- set compiler_conditional_xfail_data {
- "jump beyond 128K not supported" \
- "xtensa-*-*" \
- { "-O0" } \
- { "" }
- }
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/20010518-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20010518-2.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 20010518-2.c
*** gcc.c-torture/compile/20010518-2.c 25 May 2001 19:38:51 -0000 1.1
--- gcc.c-torture/compile/20010518-2.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,12 ----
+ /* { dg-do compile } */
+
+ /* This test fails on HC11/HC12 when it is compiled without -mshort because
+ the array is too large (INT_MAX/2 > 64K). Force to use 16-bit ints
+ for it. */
+ /* { dg-options "-w -mshort" { target m6811-*-* m6812-*-* } } */
+
/* Large static storage. */
#include <limits.h>
static volatile char chars_1[INT_MAX / 2];
Index: gcc.c-torture/compile/20010518-2.x
===================================================================
RCS file: gcc.c-torture/compile/20010518-2.x
diff -N gcc.c-torture/compile/20010518-2.x
*** gcc.c-torture/compile/20010518-2.x 2 Mar 2003 22:09:41 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,8 ****
- # This test fails on HC11/HC12 when it is compiled without -mshort because
- # the array is too large (INT_MAX/2 > 64K). Force to use 16-bit ints for it.
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- set options "-S -mshort"
- } else {
- set options "-S"
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/20020312-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20020312-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 20020312-1.c
*** gcc.c-torture/compile/20020312-1.c 13 Mar 2002 07:49:23 -0000 1.2
--- gcc.c-torture/compile/20020312-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,9 ----
+ /* This does not compile on HC11/HC12 due to the asm which requires
+ two 32-bit registers. */
+ /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+
/* PR optimization/5892 */
typedef struct { unsigned long a; unsigned int b, c; } A;
typedef struct { unsigned long a; A *b; int c; } B;
static inline unsigned int
Index: gcc.c-torture/compile/20020312-1.x
===================================================================
RCS file: gcc.c-torture/compile/20020312-1.x
diff -N gcc.c-torture/compile/20020312-1.x
*** gcc.c-torture/compile/20020312-1.x 2 Mar 2003 22:34:02 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,6 ****
- # This does not compile on HC11/HC12 due to the asm which requires
- # two 32-bit registers.
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- return 1
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/20020604-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20020604-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 20020604-1.c
*** gcc.c-torture/compile/20020604-1.c 7 Jun 2002 16:28:57 -0000 1.1
--- gcc.c-torture/compile/20020604-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,8 ----
+ /* The array is too big. */
+ /* { dg-do assemble { xfail h8300-*-* m6811-*-* m6812-*-* } } */
+
/* PR c/6957
This testcase ICEd at -O2 on IA-32, because
(insn 141 139 142 (set (subreg:SF (reg:QI 72) 0)
(plus:SF (reg:SF 73)
(reg:SF 76))) 525 {*fop_sf_comm_nosse} (insn_list 134 (nil))
Index: gcc.c-torture/compile/20020604-1.x
===================================================================
RCS file: gcc.c-torture/compile/20020604-1.x
diff -N gcc.c-torture/compile/20020604-1.x
*** gcc.c-torture/compile/20020604-1.x 15 Jan 2003 21:26:14 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,10 ****
- # The array is too big.
- if { [istarget "h8300-*-*"] } {
- return 1;
- }
-
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- return 1;
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/20021205-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20021205-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 20021205-1.c
*** gcc.c-torture/compile/20021205-1.c 14 Dec 2002 00:54:02 -0000 1.1
--- gcc.c-torture/compile/20021205-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,7 ****
- /* dg-do compile */
- /* dg-options "-O3" */
typedef struct x x;
extern void *baz(char *);
struct x { char * (*bar) (int); };
static x **foo() { return ((x**)baz(0)); }
int xyzzy()
--- 1,5 ----
Index: gcc.c-torture/compile/920501-12.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920501-12.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 920501-12.c
*** gcc.c-torture/compile/920501-12.c 16 Dec 1998 22:06:46 -0000 1.2
--- gcc.c-torture/compile/920501-12.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,9 ----
+ /* This test fails on HC11/HC12 when it is compiled without -mshort because
+ the stack arrays are too large. Force to use 16-bit ints for it. */
+ /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+
x(x){ return 3 + x;}
a(x){int y[994]; return 3 + x;}
b(x){int y[999]; return 2*(x + 3);}
A(x){int y[9999];return 2*(x + 3);}
B(x){int y[9949];return 3 + x;}
Index: gcc.c-torture/compile/920501-12.x
===================================================================
RCS file: gcc.c-torture/compile/920501-12.x
diff -N gcc.c-torture/compile/920501-12.x
*** gcc.c-torture/compile/920501-12.x 2 Mar 2003 22:09:41 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,6 ****
- # This test fails on HC11/HC12 when it is compiled without -mshort because
- # the stack arrays are too large. Force to use 16-bit ints for it.
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- set options "-mshort"
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/920501-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920501-4.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 920501-4.c
*** gcc.c-torture/compile/920501-4.c 16 Dec 1998 22:07:01 -0000 1.2
--- gcc.c-torture/compile/920501-4.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,9 ----
+ /* This test fails on HC11/HC12 when it is compiled without -mshort because
+ the 'r0' array is too large. Force to use 16-bit ints for it. */
+ /* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */
+
foo ()
{
int r0[8186 ];
int r1[2 ];
int r2[2 ];
Index: gcc.c-torture/compile/920501-4.x
===================================================================
RCS file: gcc.c-torture/compile/920501-4.x
diff -N gcc.c-torture/compile/920501-4.x
*** gcc.c-torture/compile/920501-4.x 2 Mar 2003 22:09:41 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,6 ****
- # This test fails on HC11/HC12 when it is compiled without -mshort because
- # the 'r0' array is too large. Force to use 16-bit ints for it.
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- set options "-mshort"
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/920520-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920520-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 920520-1.c
*** gcc.c-torture/compile/920520-1.c 29 Jun 2000 03:10:00 -0000 1.1
--- gcc.c-torture/compile/920520-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1 ****
--- 1,3 ----
+ /* { dg-do compile { xfail m6811-*-* m6812-*-* } } */
+
f(){asm("%0"::"r"(1.5F));}g(){asm("%0"::"r"(1.5));}
Index: gcc.c-torture/compile/920520-1.x
===================================================================
RCS file: gcc.c-torture/compile/920520-1.x
diff -N gcc.c-torture/compile/920520-1.x
*** gcc.c-torture/compile/920520-1.x 15 Jan 2003 21:26:14 -0000 1.5
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,9 ****
- set options "-S"
-
- # This does not work on m68hc11 due to the asm which forces a
- # float or a double to go in a register.
-
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- return 1
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/920521-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920521-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 920521-1.c
*** gcc.c-torture/compile/920521-1.c 29 Jun 2000 03:10:00 -0000 1.1
--- gcc.c-torture/compile/920521-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1 ****
--- 1,3 ----
+ /* { dg-do compile } */
+
f(){asm("f":::"cc");}g(x,y){asm("g"::"%r"(x), "r"(y));}
Index: gcc.c-torture/compile/920521-1.x
===================================================================
RCS file: gcc.c-torture/compile/920521-1.x
diff -N gcc.c-torture/compile/920521-1.x
*** gcc.c-torture/compile/920521-1.x 29 Jun 2000 03:10:00 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,2 ****
- set options "-S"
- return 0
--- 0 ----
Index: gcc.c-torture/compile/920625-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/920625-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 920625-1.c
*** gcc.c-torture/compile/920625-1.c 16 Dec 1998 22:07:16 -0000 1.2
--- gcc.c-torture/compile/920625-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,20 ----
+ /* The problem on IA-64 is that if-conversion creates a sequence
+
+ (p17) cmp.geu p6, p7 = r48, r15
+ (p16) cmp.gtu p6, p7 = r48, r15
+
+ where p16 and p17 are complemenary, but the assembler DV validation
+ code doesn't recognize that p6 and p7 are complimentary, and so
+ we end up warning for a later use
+
+ (p6) addl r14 = 1, r0
+ (p7) mov r14 = r0
+
+ that appears to be a WAW violation. */
+ /* { dg-xfail-if "missing .pred.rel.mutex directive" "ia64-*-*" { "-O1" "-O2" "-O3" "-Os" } { "" } } */
+
typedef unsigned long int unsigned_word;
typedef signed long int signed_word;
typedef unsigned_word word;
typedef enum { ADD, ADD_CI, ADD_CO, ADD_CIO, SUB, SUB_CI, SUB_CO,
Index: gcc.c-torture/compile/920625-1.x
===================================================================
RCS file: gcc.c-torture/compile/920625-1.x
diff -N gcc.c-torture/compile/920625-1.x
*** gcc.c-torture/compile/920625-1.x 2 Apr 2002 00:05:39 -0000 1.3
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,25 ****
- # The problem on IA-64 is that if-conversion creates a sequence
- #
- # (p17) cmp.geu p6, p7 = r48, r15
- # (p16) cmp.gtu p6, p7 = r48, r15
- #
- # where p16 and p17 are complemenary, but the assembler DV validation
- # code doesn't recognize that p6 and p7 are complimentary, and so
- # we end up warning for a later use
- #
- # (p6) addl r14 = 1, r0
- # (p7) mov r14 = r0
- #
- # that appears to be a WAW violation.
-
- set torture_eval_before_compile {
-
- set compiler_conditional_xfail_data {
- "missing .pred.rel.mutex directive" \
- "ia64-*-*" \
- { "-O1" "-O2" "-O3" "-Os" } \
- { "" }
- }
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/961203-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/961203-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 961203-1.c
*** gcc.c-torture/compile/961203-1.c 16 Dec 1998 22:10:04 -0000 1.2
--- gcc.c-torture/compile/961203-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,9 ----
+ /* The structure is too large for the xstormy16 - won't fit in 16
+ bits. */
+ /* { dg-do assemble { xfail xstormy16-*-* h8300-*-* m6811-*-* m6812-*-* } } */
+
struct s {
char a[0x32100000];
int x:30, y:30;
};
Index: gcc.c-torture/compile/961203-1.x
===================================================================
RCS file: gcc.c-torture/compile/961203-1.x
diff -N gcc.c-torture/compile/961203-1.x
*** gcc.c-torture/compile/961203-1.x 15 Jan 2003 21:26:14 -0000 1.8
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,17 ****
- # The structure is too large for the xstormy16 - won't fit in 16 bits.
-
- if { [istarget "xstormy16-*-*"] } {
- return 1;
- }
-
- if { [istarget "h8300-*-*"] } {
- return 1
- }
-
- # Array 'a' in this test is too large to fit in 64K.
-
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"]} {
- return 1
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/980506-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/980506-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 980506-1.c
*** gcc.c-torture/compile/980506-1.c 16 Dec 1998 22:10:11 -0000 1.2
--- gcc.c-torture/compile/980506-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,8 ----
+ /* The arrays are too large for the xstormy16 - won't fit in 16 bits. */
+ /* { dg-do assemble { xfail xstormy16-*-* h8300-*-* m6811-*-* m6812-*-* } } */
+
unsigned char TIFFFax2DMode[20][256];
unsigned char TIFFFax2DNextState[20][256];
unsigned char TIFFFaxUncompAction[20][256];
unsigned char TIFFFaxUncompNextState[20][256];
unsigned char TIFFFax1DAction[230][256];
Index: gcc.c-torture/compile/980506-1.x
===================================================================
RCS file: gcc.c-torture/compile/980506-1.x
diff -N gcc.c-torture/compile/980506-1.x
*** gcc.c-torture/compile/980506-1.x 2 Mar 2003 22:09:41 -0000 1.4
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,13 ****
- # The arrays are too large for the xstormy16 - won't fit in 16 bits.
- if { [istarget "xstormy16-*-*"] } {
- return 1;
- }
-
- if { [istarget "h8300-*-*"] } {
- return 1;
- }
-
- if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } {
- return 1
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/981006-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/981006-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 981006-1.c
*** gcc.c-torture/compile/981006-1.c 29 Jun 2000 03:10:00 -0000 1.1
--- gcc.c-torture/compile/981006-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,11 ****
/* Test that tablejump insns are correctly handled. If the compiler
loses track of the jump targets, it will report that x and y can be
used uninitialized.
This is broken in egcs 1998/10/06 for mips in pic mode. */
! /* { dg-do compile } */
int foo (int a, int b)
{
__label__ z;
int x; /* { dg-bogus "warning: `.' might be used uninitialized in this function" } */
--- 1,14 ----
/* Test that tablejump insns are correctly handled. If the compiler
loses track of the jump targets, it will report that x and y can be
used uninitialized.
This is broken in egcs 1998/10/06 for mips in pic mode. */
! /* { dg-do assemble } */
! /* For MIPS at least, pic is needed to trigger the problem. */
! /* { dg-options "-w -Wuninitialized -Werror -fpic" } */
! /* { dg-options "-w -Wuninitialized -Werror" { target rs6000-*-aix* powerpc*-*-aix* arm*-*-* xscale*-*-* strongarm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* mn10200*-*-* cris-*-elf* cris-*-aout* mmix-*-* } } */
int foo (int a, int b)
{
__label__ z;
int x; /* { dg-bogus "warning: `.' might be used uninitialized in this function" } */
Index: gcc.c-torture/compile/981006-1.x
===================================================================
RCS file: gcc.c-torture/compile/981006-1.x
diff -N gcc.c-torture/compile/981006-1.x
*** gcc.c-torture/compile/981006-1.x 10 Jul 2002 17:38:37 -0000 1.6
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,20 ****
- # For MIPS at least, pic is needed to trigger the problem.
- if { [istarget rs6000-*-aix*]
- || [istarget powerpc*-*-aix*]
- || [istarget arm*-*-*]
- || [istarget xscale-*-*]
- || [istarget strongarm*-*-*]
- || [istarget fr30-*-*]
- || [istarget sh-*-hms]
- || [istarget sh-*-coff]
- || [istarget h8300*-*-*]
- || [istarget mn10200*-*-*]
- || [istarget cris-*-elf*]
- || [istarget cris-*-aout*]
- || [istarget mmix-*-*]
- } {
- set options "-Wuninitialized -Werror"
- } else {
- set options "-Wuninitialized -Werror -fpic"
- }
- return 0
--- 0 ----
Index: gcc.c-torture/compile/981022-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/981022-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 981022-1.c
*** gcc.c-torture/compile/981022-1.c 16 Dec 1998 22:10:27 -0000 1.2
--- gcc.c-torture/compile/981022-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 2,9 ****
operand of ?: and using ?: as an lvalue. */
int x, y;
int main ()
{
! (x ?: y) = 0;
return 0;
}
--- 2,9 ----
operand of ?: and using ?: as an lvalue. */
int x, y;
int main ()
{
! (x ?: y) = 0; /* { dg-bogus "lvalue" "" { xfail *-*-* } } */
return 0;
}
Index: gcc.c-torture/compile/981022-1.x
===================================================================
RCS file: gcc.c-torture/compile/981022-1.x
diff -N gcc.c-torture/compile/981022-1.x
*** gcc.c-torture/compile/981022-1.x 16 Dec 1998 22:10:28 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,2 ****
- set torture_compile_xfail "*-*-*"
- return 0
--- 0 ----
Index: gcc.c-torture/compile/981223-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/981223-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 981223-1.c
*** gcc.c-torture/compile/981223-1.c 4 Sep 1999 15:09:11 -0000 1.2
--- gcc.c-torture/compile/981223-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,14 ----
+ /* The problem on IA-64 is that the assembler emits
+
+ Warning: Additional NOP may be necessary to workaround Itanium
+ processor A/B step errata
+
+ This can be fixed by adding "-mb-step" to the command line, which
+ does in fact add the extra nop. */
+ /* { dg-options "-w -mb-step" { target ia64-*-* } } */
+
__complex__ float
func (__complex__ float x)
{
if (__real__ x == 0.0)
return 1.0;
Index: gcc.c-torture/compile/981223-1.x
===================================================================
RCS file: gcc.c-torture/compile/981223-1.x
diff -N gcc.c-torture/compile/981223-1.x
*** gcc.c-torture/compile/981223-1.x 1 Mar 2002 18:39:21 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,20 ****
- # The problem on IA-64 is that the assembler emits
- #
- # Warning: Additional NOP may be necessary to workaround Itanium
- # processor A/B step errata
- #
- # This can be fixed by adding "-mb-step" to the command line, which
- # does in fact add the extra nop, if someone can tell me how to do
- # that for a c-torture compile test.
-
- set torture_eval_before_compile {
-
- set compiler_conditional_xfail_data {
- "need -mb-step" \
- "ia64-*-*" \
- { "-O2" "-O3" "-Os" } \
- { "" }
- }
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/990617-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/990617-1.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 990617-1.c
*** gcc.c-torture/compile/990617-1.c 4 Sep 1999 15:09:11 -0000 1.2
--- gcc.c-torture/compile/990617-1.c 13 Jun 2003 05:39:59 -0000
***************
*** 1,5 ****
--- 1,8 ----
+ /* 0x70000000 is too large a constant to become a pointer on
+ xstormy16. */
+ /* { dg-do assemble { xfail xstormy16-*-* } } */
int main()
{
do {
long l;
Index: gcc.c-torture/compile/990617-1.x
===================================================================
RCS file: gcc.c-torture/compile/990617-1.x
diff -N gcc.c-torture/compile/990617-1.x
*** gcc.c-torture/compile/990617-1.x 9 Nov 2001 01:17:07 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,7 ****
- # 0x70000000 is too large a constant to become a pointer on xstormy16.
-
- if { [istarget "xstormy16-*-*"] } {
- return 1;
- }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/compile.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/compile.exp,v
retrieving revision 1.3
diff -c -5 -p -r1.3 compile.exp
*** gcc.c-torture/compile/compile.exp 9 Oct 2001 10:16:21 -0000 1.3
--- gcc.c-torture/compile/compile.exp 13 Jun 2003 05:40:00 -0000
***************
*** 1,7 ****
# Expect driver script for GCC Regression Tests
! # Copyright (C) 1993, 1995, 1997 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
--- 1,7 ----
# Expect driver script for GCC Regression Tests
! # Copyright (C) 1993, 1995, 1997, 2003 Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
***************
*** 16,35 ****
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# These tests come from Torbjorn Granlund's (tege@cygnus.com)
# C torture test suite, and other contributors.
! if $tracelevel then {
! strace $tracelevel
! }
! # load support procs
! load_lib c-torture.exp
! foreach testcase [glob -nocomplain $srcdir/$subdir/*.c] {
! # If we're only testing specific files and this isn't one of them, skip it.
! if ![runtest_file_p $runtests $testcase] then {
! continue
! }
! c-torture $testcase
! }
--- 16,34 ----
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# These tests come from Torbjorn Granlund's (tege@cygnus.com)
# C torture test suite, and other contributors.
! # Load support procs.
! load_lib gcc-dg.exp
! # Initialize `dg'.
! dg-init
! # Main loop.
! set saved-dg-do-what-default ${dg-do-what-default}
! set dg-do-what-default "assemble"
! gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-w"
! set dg-do-what-default ${saved-dg-do-what-default}
! # All done.
! dg-finish
Index: gcc.c-torture/compile/dll.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/dll.c,v
retrieving revision 1.2
diff -c -5 -p -r1.2 dll.c
*** gcc.c-torture/compile/dll.c 4 Sep 1999 15:09:11 -0000 1.2
--- gcc.c-torture/compile/dll.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-require-dll "" } */
+
__declspec (dllimport) int foo;
extern int (* import) (void) __attribute__((dllimport));
int func2 (void) __attribute__((dllexport));
__declspec(dllexport) int
Index: gcc.c-torture/compile/labels-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/labels-3.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 labels-3.c
*** gcc.c-torture/compile/labels-3.c 8 Feb 2002 22:20:16 -0000 1.1
--- gcc.c-torture/compile/labels-3.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,11 ----
+ /* This test does not compile on mips-irix6 using the native assembler,
+ though it does work with gas. See PR6200. Since we cannot (???)
+ distinguish which assembler is being used, always pass -S for
+ irix. */
+ /* { dg-options "-w -S" { target mips*-*-irix* } } */
+
/* Verify that we can narrow the storage associated with label diffs. */
int foo (int a)
{
static const short ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
Index: gcc.c-torture/compile/labels-3.x
===================================================================
RCS file: gcc.c-torture/compile/labels-3.x
diff -N gcc.c-torture/compile/labels-3.x
*** gcc.c-torture/compile/labels-3.x 24 Apr 2002 19:04:23 -0000 1.1
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,7 ****
- # This test does not compile on mips-irix6 using the native assembler,
- # though it does work with gas. See PR6200. Since we cannot (???)
- # distinguish which assembler is being used, always pass -S for irix.
-
- if { [istarget "mips*-*-irix*"] } { set options "-S" }
-
- return 0
--- 0 ----
Index: gcc.c-torture/compile/mipscop-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 mipscop-1.c
*** gcc.c-torture/compile/mipscop-1.c 25 Apr 2002 19:31:45 -0000 1.1
--- gcc.c-torture/compile/mipscop-1.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-do assemble {target *mips*-*-* } } */
+
register unsigned int cp0count asm ("$c0r1");
int
main (int argc, char *argv[])
{
Index: gcc.c-torture/compile/mipscop-1.x
===================================================================
RCS file: gcc.c-torture/compile/mipscop-1.x
diff -N gcc.c-torture/compile/mipscop-1.x
*** gcc.c-torture/compile/mipscop-1.x 16 May 2002 00:11:32 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,10 ****
- global target_triplet
-
- if { ![istarget "*mips*"] } {
- return 1
- } else {
- set torture_compile_xfail "$target_triplet"
- }
-
- return 0
-
--- 0 ----
Index: gcc.c-torture/compile/mipscop-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 mipscop-2.c
*** gcc.c-torture/compile/mipscop-2.c 25 Apr 2002 19:31:45 -0000 1.1
--- gcc.c-torture/compile/mipscop-2.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-do assemble {target *mips*-*-* } } */
+
register unsigned int c3r1 asm ("$c3r1");
extern unsigned int b, c;
void
Index: gcc.c-torture/compile/mipscop-2.x
===================================================================
RCS file: gcc.c-torture/compile/mipscop-2.x
diff -N gcc.c-torture/compile/mipscop-2.x
*** gcc.c-torture/compile/mipscop-2.x 16 May 2002 00:11:32 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,10 ****
- global target_triplet
-
- if { ![istarget "*mips*"] } {
- return 1
- } else {
- set torture_compile_xfail "$target_triplet"
- }
-
- return 0
-
--- 0 ----
Index: gcc.c-torture/compile/mipscop-3.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 mipscop-3.c
*** gcc.c-torture/compile/mipscop-3.c 25 Apr 2002 19:31:45 -0000 1.1
--- gcc.c-torture/compile/mipscop-3.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-do assemble {target *mips*-*-* } } */
+
register unsigned int c3r1 asm ("$c3r1"), c3r2 asm ("$c3r2");
extern unsigned int b, c;
void
Index: gcc.c-torture/compile/mipscop-3.x
===================================================================
RCS file: gcc.c-torture/compile/mipscop-3.x
diff -N gcc.c-torture/compile/mipscop-3.x
*** gcc.c-torture/compile/mipscop-3.x 16 May 2002 00:11:32 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,10 ****
- global target_triplet
-
- if { ![istarget "*mips*"] } {
- return 1
- } else {
- set torture_compile_xfail "$target_triplet"
- }
-
- return 0
-
--- 0 ----
Index: gcc.c-torture/compile/mipscop-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 mipscop-4.c
*** gcc.c-torture/compile/mipscop-4.c 25 Apr 2002 19:31:45 -0000 1.1
--- gcc.c-torture/compile/mipscop-4.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,7 ----
+ /* { dg-do assemble {target *mips*-*-* } } */
+
register unsigned long c3r1 asm ("$c3r1"), c3r2 asm ("$c3r2");
extern unsigned long b, c;
void
Index: gcc.c-torture/compile/mipscop-4.x
===================================================================
RCS file: gcc.c-torture/compile/mipscop-4.x
diff -N gcc.c-torture/compile/mipscop-4.x
*** gcc.c-torture/compile/mipscop-4.x 16 May 2002 00:11:32 -0000 1.2
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,10 ****
- global target_triplet
-
- if { ![istarget "*mips*"] } {
- return 1
- } else {
- set torture_compile_xfail "$target_triplet"
- }
-
- return 0
-
--- 0 ----
Index: gcc.c-torture/compile/simd-5.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/simd-5.c,v
retrieving revision 1.1
diff -c -5 -p -r1.1 simd-5.c
*** gcc.c-torture/compile/simd-5.c 11 Oct 2002 09:59:06 -0000 1.1
--- gcc.c-torture/compile/simd-5.c 13 Jun 2003 05:40:00 -0000
***************
*** 1,5 ****
--- 1,13 ----
+ /* h8300 does not have long long */
+ /* PowerPC-64 doesn't handle this; see PR target/9680 */
+ /* { dg-do assemble { xfail h8300-*-* powerpc64-*-* } } */
+ /* On SPARC64/SPARC-V9 it fails, except with -m32. */
+ /* { dg-xfail-if "PR target/9200" { "sparc64-*-*" "sparcv9-*-*" } { "*" } { "-m32" } } */
+ /* On regular SPARC it doesn't fail, except with -m64. */
+ /* { dg-xfail-if "PR target/9200" { "sparc*-*-*" } { "-m64" } { "" } } */
+
#define vector64 __attribute__((vector_size(8)))
main(){
vector64 int c;
Index: gcc.c-torture/compile/simd-5.x
===================================================================
RCS file: gcc.c-torture/compile/simd-5.x
diff -N gcc.c-torture/compile/simd-5.x
*** gcc.c-torture/compile/simd-5.x 3 Jun 2003 13:46:28 -0000 1.4
--- /dev/null 1 Jan 1970 00:00:00 -0000
***************
*** 1,30 ****
- # h8300 does not have long long
- if { [istarget "h8300-*-*"] } {
- return 1;
- }
-
- if { [istarget "sparc64-*-*"] || [istarget "sparcv9-*-*"] } {
- # On SPARC64/SPARC-V9 it fails, except with -m32.
- set torture_eval_before_compile {
- global compiler_conditional_xfail_data
- set compiler_conditional_xfail_data {
- "PR target/9200" \
- { "*-*-*" } \
- { "*" } \
- { "-m32" }
- }
- }
- } elseif { [istarget "sparc-*-*"] } {
- # On regular SPARC it doesn't fail, except with -m64.
- set torture_eval_before_compile {
- global compiler_conditional_xfail_data
- set compiler_conditional_xfail_data {
- "PR target/9200" \
- { "*-*-*" } \
- { "-m64" } \
- { "" }
- }
- }
- }
-
- return 0
--- 0 ----
Index: lib/gcc-dg.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/gcc-dg.exp,v
retrieving revision 1.20
diff -c -5 -p -r1.20 gcc-dg.exp
*** lib/gcc-dg.exp 10 Jun 2003 02:57:48 -0000 1.20
--- lib/gcc-dg.exp 13 Jun 2003 05:40:00 -0000
*************** proc dg-require-gc-sections { args } {
*** 293,302 ****
--- 293,326 ----
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
return
}
}
+ # If this target does not support DLL attributes skip this test.
+
+ proc dg-require-dll { args } {
+ global target_triplet
+ # As a special case, the mcore-*-elf supports dllimport/dllexport.
+ if { [string match "mcore-*-elf" $target_triplet] } {
+ return
+ }
+ # PE/COFF targets support dllimport/dllexport.
+ if { [gcc_target_object_format] == "pe" } {
+ return
+ }
+
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ }
+
+ # Like check_conditional_xfail, but callable from a dg test.
+
+ proc dg-xfail-if { args } {
+ eval check_conditional_xfail $args
+ }
+
+
# We need to make sure that additional_files and additional_sources
# are both cleared out after every test. It is not enough to clear
# them out *before* the next test run because gcc-target-compile gets
# run directly from some .exp files (outside of any test). (Those
# uses should eventually be eliminated.)