aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog45
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/920507-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/920616-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/920721-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/920824-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/920923-1.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/921102-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/921116-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/930301-1.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/930622-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/930622-2.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/940227-1.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/940510-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/940712-1.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/950825-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/950921-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/951025-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/951123-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/951227-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/990416-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/init-1.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/init-2.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/invalid_asm.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/noncompile.exp325
-rw-r--r--gcc/testsuite/gcc.c-torture/noncompile/va-arg-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19940712-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19940712-1.h (renamed from gcc/testsuite/gcc.c-torture/noncompile/940712-1.h)0
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19940712-1a.h (renamed from gcc/testsuite/gcc.c-torture/noncompile/940712-1a.h)0
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19940712-1b.h (renamed from gcc/testsuite/gcc.c-torture/noncompile/940712-1b.h)0
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19951025-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/19951227-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920507-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920616-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920721-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920824-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/920923-1.c124
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/921102-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/921116-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/930301-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/930622-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/930622-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/930714-1.c (renamed from gcc/testsuite/gcc.c-torture/noncompile/930714-1.c)4
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/931203-1.c (renamed from gcc/testsuite/gcc.c-torture/noncompile/931203-1.c)2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/940112-1.c (renamed from gcc/testsuite/gcc.c-torture/noncompile/940112-1.c)2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/940227-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/940510-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/950825-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/950921-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/951123-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/971104-1.c (renamed from gcc/testsuite/gcc.c-torture/noncompile/971104-1.c)6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/990416-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/init-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/init-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/invalid_asm.c4
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/noncompile.exp64
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/va-arg-1.c8
56 files changed, 363 insertions, 463 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c36b20711b0..f7201e8d927 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,50 @@
2000-06-29 Zack Weinberg <zack@wolery.cumb.org>
+
+ Move the c-torture/noncompile tests to either gcc.dg/cpp or a new
+ gcc.dg/noncompile directory, depending on whether they're
+ preprocessor tests or not. Annotate all the tests for the dg
+ framework.
+
+ * gcc.c-torture/noncompile/noncompile.exp: Delete.
+ * gcc.dg/noncompile/noncompile.exp: New.
+
+ * Moved files:
+ Old name New name
+ gcc.c-torture/noncompile/920507-1.c gcc.dg/noncompile/920507-1.c
+ gcc.c-torture/noncompile/920616-2.c gcc.dg/noncompile/920616-2.c
+ gcc.c-torture/noncompile/920721-2.c gcc.dg/noncompile/920721-2.c
+ gcc.c-torture/noncompile/920824-1.c gcc.dg/noncompile/920824-1.c
+ gcc.c-torture/noncompile/920923-1.c gcc.dg/noncompile/920923-1.c
+ gcc.c-torture/noncompile/921102-1.c gcc.dg/noncompile/921102-1.c
+ gcc.c-torture/noncompile/921116-1.c gcc.dg/noncompile/921116-1.c
+ gcc.c-torture/noncompile/930301-1.c gcc.dg/noncompile/930301-1.c
+ gcc.c-torture/noncompile/930622-1.c gcc.dg/noncompile/930622-1.c
+ gcc.c-torture/noncompile/930622-2.c gcc.dg/noncompile/930622-2.c
+ gcc.c-torture/noncompile/930714-1.c gcc.dg/noncompile/930714-1.c
+ gcc.c-torture/noncompile/931203-1.c gcc.dg/noncompile/931203-1.c
+ gcc.c-torture/noncompile/940112-1.c gcc.dg/noncompile/940112-1.c
+ gcc.c-torture/noncompile/940227-1.c gcc.dg/noncompile/940227-1.c
+ gcc.c-torture/noncompile/940510-1.c gcc.dg/noncompile/940510-1.c
+ gcc.c-torture/noncompile/950825-1.c gcc.dg/noncompile/950825-1.c
+ gcc.c-torture/noncompile/950921-1.c gcc.dg/noncompile/950921-1.c
+ gcc.c-torture/noncompile/951123-1.c gcc.dg/noncompile/951123-1.c
+ gcc.c-torture/noncompile/971104-1.c gcc.dg/noncompile/971104-1.c
+ gcc.c-torture/noncompile/990416-1.c gcc.dg/noncompile/990416-1.c
+ gcc.c-torture/noncompile/init-1.c gcc.dg/noncompile/init-1.c
+ gcc.c-torture/noncompile/init-2.c gcc.dg/noncompile/init-2.c
+ gcc.c-torture/noncompile/invalid_asm.c gcc.dg/noncompile/invalid_asm.c
+ gcc.c-torture/noncompile/va-arg-1.c gcc.dg/noncompile/va-arg-1.c
+
+ gcc.c-torture/noncompile/940712-1.c gcc.dg/cpp/19940712-1.c
+ gcc.c-torture/noncompile/940712-1.h gcc.dg/cpp/19940712-1.h
+ gcc.c-torture/noncompile/940712-1a.h gcc.dg/cpp/19940712-1a.h
+ gcc.c-torture/noncompile/940712-1b.h gcc.dg/cpp/19940712-1b.h
+ gcc.c-torture/noncompile/951025-1.c gcc.dg/cpp/19951025-1.c
+ gcc.c-torture/noncompile/951227-1.c gcc.dg/cpp/19951227-1.c
+
+2000-06-29 Zack Weinberg <zack@wolery.cumb.org>
+
* gcc.dg/cpp/20000628-1a.h: On each of the first three inclusions,
declare one variable. On the fourth, error.
* gcc.dg/cpp/20000628-1.c (main): Reference the three variables
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c b/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c
deleted file mode 100644
index 07f2fd03a90..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/920507-1.c
+++ /dev/null
@@ -1 +0,0 @@
-x(){register*a asm("unknown_register");int*v[1]={a};}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/920616-2.c b/gcc/testsuite/gcc.c-torture/noncompile/920616-2.c
deleted file mode 100644
index ddfa0de1ba1..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/920616-2.c
+++ /dev/null
@@ -1 +0,0 @@
-f(void a,...){}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/920721-2.c b/gcc/testsuite/gcc.c-torture/noncompile/920721-2.c
deleted file mode 100644
index 4621983e037..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/920721-2.c
+++ /dev/null
@@ -1 +0,0 @@
-f(int n){int s;for(s=0;s<n;s++)s==5?1 n=1;}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/920824-1.c b/gcc/testsuite/gcc.c-torture/noncompile/920824-1.c
deleted file mode 100644
index 36661f63c17..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/920824-1.c
+++ /dev/null
@@ -1 +0,0 @@
-struct s{struct s{int i;}x;};
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/920923-1.c b/gcc/testsuite/gcc.c-torture/noncompile/920923-1.c
deleted file mode 100644
index 52f8338abf3..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/920923-1.c
+++ /dev/null
@@ -1,36 +0,0 @@
-typedef BYTE unsigned char;typedef int item_n;typedef int perm_set;struct
-PENT{caddr_t v_addr;};typedef struct PENT prec;typedef struct PENT*
-prec_t;prec_t mem_hash;BYTE*mem_base;struct PTE{BYTE*p_page;perm_set
-p_perms;};typedef struct PTE pte;struct PTP{union{struct*PTP
-p_tablep;struct*PTE p_entry;}u;int valid;};typedef struct PTP
-(u.p_tablep);int pfree=0;int pcount=0;void mmu_walk_find(va)caddr_t va;{
-BYTE*page_addr;if(mmu_base[Level1(va)]->valid==0x0){l1_base=
-mmu_base[Level1(va)]->(u.p_tablep)=p_alloc();mmu_base[Level1(va)]->valid=
-0x3;for(idx=0;idx<LEVEL1_ENTRIES;idx++)l1_base[idx]->valid=0x0;goto
-build_level2;}else l1_base=mmu_base[Level1(va)]->(u.p_tablep);if
-(l1_base[Level2(va)]->valid==0x0){build_level2:l2_base=
-l1_base[Level2(va)]->(u.p_tablep)=p_alloc();l1_base[Level2(va)]->valid=
-0x3;for(idx=0;idx<LEVEL2_ENTRIES;idx++)l2_base[idx]->valid=0x0;goto
-build_page;}else l2_base=mmu_base[Level2(va)]->(u.p_tablep);
-page_addr=l2_base[Level2(va)]->valid;}void*a_translate(va_op,v_addr)int
-va_op;caddr_t v_addr;{register prec_t bucket;register caddr_t p_addr;
-bucket=mem_hash+((((v_addr)>>ITEMBITS))&hash_mask);do{if
-(bucket->v_addr==((v_addr)>>ITEMBITS){if(!(bucket->perm_set&va_op))
-goto prot_fault;return mem_base+v_addr;}}while((bucket++)->v_addr!=
-((caddr_t)0));page_miss:p_addr=(--bucket)->p_addr;page_type:switch
-(p_addr){case BUCKET_FULL:enlarge_hash_table(mem_hash);case((caddr_t)0):
-p_addr=fill_item_entry(va_op,v_addr);goto page_type;case((caddr_t)1):
-default:((void)(((0))?0:(__eprintf("Failed assertion`%s'at line%d
-of`%s'.\n","FALSE",327,"b.c"),0)));}}void flush_hash(hasht,
-hash_size)prec_t hasht;int hash_size;{register prec_t bucket;register int
-idx;bucket=hasht;for(idx=(hash_size*3)-1;idx>=0;idx--){
-bucket->v_addr=((caddr_t)0);bucket->p_addr=((caddr_t)0);
-bucket->perm_set=VA_EMPTY;}}void init_mem(){mem_base=(BYTE*)calloc(1024
-,(1<<13));((void)((mem_base!=(BYTE*)0)?0:(__eprintf("Failed
-assertion`%s'at line%d of`%s'.\n","mem_base!=(BYTE*)0",366,"b.c"),
-0)));hash_num=INIT_NUM_ENTRIES*3;mem_hash=(prec_t)calloc(hash_num,
-sizeof(prec));((void)((mem_hash!=(prec_t)0)?0:(__eprintf("Failed
-assertion`%s'at line%d of`%s'.\n","mem_hash!=(prec_t)0",370,"b.c"),
-0)));flush_hash(mem_hash,32);build_ptables(mem_base,1024*(1<<13));}
-struct tm{int tm_sec;int tm_min;int tm_hour;int tm_mday;int tm_mon;int
-tm_year;int tm_wday;int tm_yday;int tm_isdst;char*tm_zone;long tm_gmtoff;};
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/921102-1.c b/gcc/testsuite/gcc.c-torture/noncompile/921102-1.c
deleted file mode 100644
index 3fb42f19b56..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/921102-1.c
+++ /dev/null
@@ -1 +0,0 @@
-int x[]={[0.3 ... 4.6]9};
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/921116-1.c b/gcc/testsuite/gcc.c-torture/noncompile/921116-1.c
deleted file mode 100644
index 78a75ea8193..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/921116-1.c
+++ /dev/null
@@ -1 +0,0 @@
-void a (void x) {}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/930301-1.c b/gcc/testsuite/gcc.c-torture/noncompile/930301-1.c
deleted file mode 100644
index de4271415e9..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/930301-1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-struct a *q;
-f()
-{
- q++;
-}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/930622-1.c b/gcc/testsuite/gcc.c-torture/noncompile/930622-1.c
deleted file mode 100644
index 27bb9ebd2f2..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/930622-1.c
+++ /dev/null
@@ -1,6 +0,0 @@
-f ()
-{
- double b;
- b = b * 10;
- goto c;
-}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/930622-2.c b/gcc/testsuite/gcc.c-torture/noncompile/930622-2.c
deleted file mode 100644
index a75e0c43889..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/930622-2.c
+++ /dev/null
@@ -1,6 +0,0 @@
-f ()
-{
- int i;
- for (i--)
- ;
-}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940227-1.c b/gcc/testsuite/gcc.c-torture/noncompile/940227-1.c
deleted file mode 100644
index 21bba6c9cfe..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/940227-1.c
+++ /dev/null
@@ -1,5 +0,0 @@
-struct font {
- struct {
- char *line,*ulmask;
- } c[2];
-} character[1] = { { {"", ""}, {"", ""} } };
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940510-1.c b/gcc/testsuite/gcc.c-torture/noncompile/940510-1.c
deleted file mode 100644
index 9882d155e97..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/940510-1.c
+++ /dev/null
@@ -1 +0,0 @@
-struct { int a[]; } x = { 0 };
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940712-1.c b/gcc/testsuite/gcc.c-torture/noncompile/940712-1.c
deleted file mode 100644
index b1b82347483..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/940712-1.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* PR 4713 */
-
-#include "940712-1.h"
-#include "940712-1a.h"
-#include "940712-1b.h"
-
-/* comment start in comment error
-/* in a .c file */
-
-int main ()
-{
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/950825-1.c b/gcc/testsuite/gcc.c-torture/noncompile/950825-1.c
deleted file mode 100644
index 6104444da3b..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/950825-1.c
+++ /dev/null
@@ -1 +0,0 @@
-main() { return (struct x) {{y: 0}}; }
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/950921-1.c b/gcc/testsuite/gcc.c-torture/noncompile/950921-1.c
deleted file mode 100644
index bcf2f05e44f..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/950921-1.c
+++ /dev/null
@@ -1,10 +0,0 @@
-typedef enum
-{
- a = (X) 0,
- b
-} c;
-
-typedef enum
-{
- d = (X) 0
-} e;
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/951025-1.c b/gcc/testsuite/gcc.c-torture/noncompile/951025-1.c
deleted file mode 100644
index 694887290dd..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/951025-1.c
+++ /dev/null
@@ -1 +0,0 @@
-#include /\
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/951123-1.c b/gcc/testsuite/gcc.c-torture/noncompile/951123-1.c
deleted file mode 100644
index e9ed3dcd246..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/951123-1.c
+++ /dev/null
@@ -1,2 +0,0 @@
-struct S { int a; int b[2]; };
-struct S x = { 0, [0]; };
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/951227-1.c b/gcc/testsuite/gcc.c-torture/noncompile/951227-1.c
deleted file mode 100644
index 7c449c8579c..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/951227-1.c
+++ /dev/null
@@ -1,2 +0,0 @@
-#if 0xe-1
-#endif
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/990416-1.c b/gcc/testsuite/gcc.c-torture/noncompile/990416-1.c
deleted file mode 100644
index 9d4323ba1cd..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/990416-1.c
+++ /dev/null
@@ -1,10 +0,0 @@
-typedef int word_type;
-
-static void
-copy_reg (unsigned int reg, frame_state *udata, frame_state *target_udata)
-{
- word_type *preg = get_reg_addr (reg, udata, 0);
- word_type *ptreg = get_reg_addr (reg, target_udata, 0);
-
- memcpy (ptreg, preg, __builtin_dwarf_reg_size (reg));
-}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/init-1.c b/gcc/testsuite/gcc.c-torture/noncompile/init-1.c
deleted file mode 100644
index 52f43e81a4f..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/init-1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-struct a
-{ double a, b, c; };
-
-struct b
-{
- struct a arr[6];
-};
-
-static struct b a_b =
-{
- {0,0,0},
- {0,0,0},
- {0,0,0},
- {0,0,0},
- {0,0,0},
- {0,0,0},
-};
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/init-2.c b/gcc/testsuite/gcc.c-torture/noncompile/init-2.c
deleted file mode 100644
index 52ee17b019f..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/init-2.c
+++ /dev/null
@@ -1 +0,0 @@
-int d[][] = { {1}, {2}, {3} };
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/invalid_asm.c b/gcc/testsuite/gcc.c-torture/noncompile/invalid_asm.c
deleted file mode 100644
index bb017f4315e..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/invalid_asm.c
+++ /dev/null
@@ -1 +0,0 @@
-asm_invalid_register_name(){asm("":::"this_is_an_invalid_register_name");}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/noncompile.exp b/gcc/testsuite/gcc.c-torture/noncompile/noncompile.exp
deleted file mode 100644
index 44dcf2e1560..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/noncompile.exp
+++ /dev/null
@@ -1,325 +0,0 @@
-# Copyright (C) 1988, 90-92, 1997, 1999 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
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gcc@prep.ai.mit.edu
-
-# This file was written by Jeff Law. (law@cs.utah.edu)
-
-#
-# These tests come from Torbjorn Granlund (tege@cygnus.com)
-# C torture test suite.
-#
-
-load_lib mike-gcc.exp
-
-# This is done just to set the value of TORTURE_OPTIONS.
-load_lib c-torture.exp
-
-proc postbase_with_opts { src run groups } {
- global TORTURE_OPTIONS
- # loop through all the options
- foreach option $TORTURE_OPTIONS {
- postbase $src $run $groups $option
- }
-}
-
-# Test 920507-1.c
-prebase
-
-set src_code 920507-1.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 920616-2.c
-prebase
-
-set src_code 920616-2.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 920721-2.c
-prebase
-
-set src_code 920721-2.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 920824-1.c
-prebase
-
-set src_code 920824-1.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 920923-1.c
-prebase
-
-set src_code 920923-1.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 921102-1.c
-prebase
-
-set src_code 921102-1.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 921116-1.c
-prebase
-
-set src_code 921116-1.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 930301-1.c
-prebase
-
-set src_code 930301-1.c
-set compiler_output ".*:4:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 930622-1.c
-prebase
-
-set src_code 930622-1.c
-set compiler_output ".*:5:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 930622-2.c
-prebase
-
-set src_code 930622-2.c
-set compiler_output ".*:4:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 930714-1.c
-prebase
-
-set src_code 930714-1.c
-# Not really sure what the error should be here...
-set compiler_output ".*:18.*:23"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-# Test 931203-1.c
-prebase
-
-set src_code 931203-1.c
-set compiler_output ".*:10"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 940112-1.c
-prebase
-
-set src_code 940112-1.c
-set compiler_output ".*:7"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 940227-1.c
-prebase
-
-set src_code 940227-1.c
-set compiler_output ".*:5.*:5"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 940510-1.c
-prebase
-
-set src_code 940510-1.c
-set compiler_output ".*:1"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 940712-1.c
-prebase
-
-set src_code 940712-1.c
-set compiler_output ".*:8.*:4"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 950825-1.c
-prebase
-set src_code 950825-1.c
-set compiler_output ".*:1.*:1.*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 950921-1.c
-prebase
-set src_code 950921-1.c
-set compiler_output ".*:3.*:3.*:9.*:9:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 951025-1.c
-prebase
-set src_code 951025-1.c
-set compiler_output ".*:\[12\]:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 951123-1.c
-prebase
-set src_code 951123-1.c
-set compiler_output ".*:2:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 951227-1.c
-prebase
-set src_code 951227-1.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test 971104-1.c
-prebase
-set src_code 971104-1.c
-set compiler_output ".*:25:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-# Test 990416-1.c
-prebase
-set src_code 990416-1.c
-set compiler_output ".*:4:.*:6:.*:6:.*:6:.*:6:.*:6:.*:7:.*:7:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-# Test init-1.c
-prebase
-set src_code init-1.c
-set compiler_output ".*:12.*:12.*:13.*:13.*:14.*:14.*:15.*:15.*:16.*:16:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test init-2.c
-prebase
-set src_code init-2.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test invalid_asm.c
-prebase
-set src_code invalid_asm.c
-set compiler_output ".*:1:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
-
-
-# Test va-arg-1.c
-# It is debatable if this test should be included at all.
-# varags may be implemented by macros, which may not actually
-# reference the bogus argument.
-prebase
-
-set src_code va-arg-1.c
-set compiler_output ".*:6:"
-
-set groups {passed gcc-noncompile}
-
-postbase_with_opts $src_code $run $groups
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/va-arg-1.c b/gcc/testsuite/gcc.c-torture/noncompile/va-arg-1.c
deleted file mode 100644
index 0285872860d..00000000000
--- a/gcc/testsuite/gcc.c-torture/noncompile/va-arg-1.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stdarg.h>
-
-f (int x, ...)
-{
- va_list args;
- va_start (args, bogus_variable);
- va_end (args);
-}
diff --git a/gcc/testsuite/gcc.dg/cpp/19940712-1.c b/gcc/testsuite/gcc.dg/cpp/19940712-1.c
new file mode 100644
index 00000000000..5b4ac8b722c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/19940712-1.c
@@ -0,0 +1,19 @@
+/* { dg-do preprocess } */
+/* PR 4713 */
+
+/* dg.exp doesn't read the header files for magic comments. */
+/* { dg-error "unterminated comment" "" { target *-*-* } 4 } */
+/* { dg-error "unterminated comment" "" { target *-*-* } 8 } */
+
+#include "19940712-1.h" /* { dg-error "" } // In file included from: */
+#include "19940712-1a.h" /* { dg-error "" } // In file included from: */
+#include "19940712-1b.h"
+
+/* comment start in comment error
+/* in a .c file */
+
+int main ()
+{
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940712-1.h b/gcc/testsuite/gcc.dg/cpp/19940712-1.h
index 183821334b1..183821334b1 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/940712-1.h
+++ b/gcc/testsuite/gcc.dg/cpp/19940712-1.h
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940712-1a.h b/gcc/testsuite/gcc.dg/cpp/19940712-1a.h
index 55ab6b844ec..55ab6b844ec 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/940712-1a.h
+++ b/gcc/testsuite/gcc.dg/cpp/19940712-1a.h
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940712-1b.h b/gcc/testsuite/gcc.dg/cpp/19940712-1b.h
index d75156c04b9..d75156c04b9 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/940712-1b.h
+++ b/gcc/testsuite/gcc.dg/cpp/19940712-1b.h
diff --git a/gcc/testsuite/gcc.dg/cpp/19951025-1.c b/gcc/testsuite/gcc.dg/cpp/19951025-1.c
new file mode 100644
index 00000000000..c243df028f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/19951025-1.c
@@ -0,0 +1,4 @@
+/* { dg-do preprocess } */
+/* { dg-error "include expects" "" { target *-*-* } 4 } */
+/* { dg-warning "no newline" "" { target *-*-* } 5 } */
+#include /\
diff --git a/gcc/testsuite/gcc.dg/cpp/19951227-1.c b/gcc/testsuite/gcc.dg/cpp/19951227-1.c
new file mode 100644
index 00000000000..0d8fcfd8b51
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/19951227-1.c
@@ -0,0 +1,3 @@
+/* { dg-do preprocess } */
+#if 0xe-1 /* { dg-error "invalid number" } */
+#endif
diff --git a/gcc/testsuite/gcc.dg/noncompile/920507-1.c b/gcc/testsuite/gcc.dg/noncompile/920507-1.c
new file mode 100644
index 00000000000..5f2ff4ee88e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/920507-1.c
@@ -0,0 +1,6 @@
+int
+x(void)
+{
+ register int *a asm("unknown_register"); /* { dg-error "invalid register" } */
+ int *v[1] = {a};
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/920616-2.c b/gcc/testsuite/gcc.dg/noncompile/920616-2.c
new file mode 100644
index 00000000000..25f59434f73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/920616-2.c
@@ -0,0 +1 @@
+f(void a,...){} /* { dg-error "has incomplete type" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/920721-2.c b/gcc/testsuite/gcc.dg/noncompile/920721-2.c
new file mode 100644
index 00000000000..2326b7efc6b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/920721-2.c
@@ -0,0 +1,6 @@
+int f(int n)
+{
+int s;
+for(s=0;s<n;s++)
+ s==5?1 n=1; /* { dg-error "parse error" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/920824-1.c b/gcc/testsuite/gcc.dg/noncompile/920824-1.c
new file mode 100644
index 00000000000..bc8b19c3c62
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/920824-1.c
@@ -0,0 +1 @@
+struct s{struct s{int i;}x;}; /* { dg-error "nested redefinition" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/920923-1.c b/gcc/testsuite/gcc.dg/noncompile/920923-1.c
new file mode 100644
index 00000000000..4f03b9fafbf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/920923-1.c
@@ -0,0 +1,124 @@
+typedef BYTE unsigned char; /* { dg-error "syntax error|empty decl" } */
+typedef int item_n;
+typedef int perm_set;
+struct PENT { caddr_t v_addr; };/* { dg-error "parse error|no semicolon" } */
+typedef struct PENT prec;
+typedef struct PENT *prec_t;
+prec_t mem_hash;
+BYTE *mem_base; /* { dg-error "parse error|no type" } */
+struct PTE {
+ BYTE *p_page; /* { dg-error "parse error|no semicolon" } */
+ perm_set p_perms;
+}; /* { dg-error "parse error" } */
+typedef struct PTE pte;
+struct PTP {
+ union {
+ struct *PTP p_tablep; /* { dg-error "parse error|no semicolon" } */
+ struct *PTE p_entry;
+ } u; /* { dg-warning "no type or storage class" } */
+ int valid;
+}; /* { dg-error "parse error" } */
+typedef struct PTP (u.p_tablep);/* { dg-error "parse error" } */
+int pfree=0;
+int pcount=0;
+
+void
+mmu_walk_find(va)
+caddr_t va; /* { dg-error "parse error|no type" } */
+{
+ BYTE *page_addr;
+ if (mmu_base[Level1(va)]->valid==0x0) {
+ l1_base = mmu_base[Level1(va)]->(u.p_tablep) = p_alloc();
+ mmu_base[Level1(va)]->valid = 0x3; /* { dg-error "parse error" } */
+ for (idx=0; idx<LEVEL1_ENTRIES; idx++)
+ l1_base[idx]->valid = 0x0;
+ goto build_level2;
+ } else
+ l1_base = mmu_base[Level1(va)]->(u.p_tablep);
+
+ if (l1_base[Level2(va)]->valid==0x0) {
+ build_level2:
+ l2_base = l1_base[Level2(va)]->(u.p_tablep) = p_alloc();
+ l1_base[Level2(va)]->valid = 0x3; /* { dg-error "parse error" } */
+ for (idx=0; idx<LEVEL2_ENTRIES; idx++)
+ l2_base[idx]->valid=0x0;
+ goto build_page;
+ } else
+ l2_base = mmu_base[Level2(va)]->(u.p_tablep);
+
+ page_addr = l2_base[Level2(va)]->valid;/* { dg-error "undeclared|no type" } */
+} /* { dg-error "parse error" } */
+
+void *
+a_translate(va_op, v_addr)
+int va_op;
+caddr_t v_addr; /* { dg-error "parse error" } */
+{
+ register prec_t bucket;
+ register caddr_t p_addr; /* { dg-error "syntax error" } */
+ bucket = mem_hash+((((v_addr)>>ITEMBITS))&hash_mask); /* { dg-error "undeclared|for each function" } */
+ do {
+ if (bucket->v_addr == ((v_addr)>>ITEMBITS) { /* { dg-error "incomplete type|parse error" } */
+ if(!(bucket->perm_set&va_op))
+ goto prot_fault;
+ return mem_base + v_addr;
+ }
+ } while((bucket++)->v_addr != ((caddr_t)0)); /* { dg-error "parse error" } */
+
+ page_miss:
+ p_addr = (--bucket)->p_addr; /* { dg-error "undeclared|pointer to" } */
+ page_type:
+ switch (p_addr) {
+ case BUCKET_FULL: /* { dg-error "undeclared" } */
+ enlarge_hash_table(mem_hash);
+ case((caddr_t)0): /* { dg-error "undeclared|parse error" } */
+ p_addr = fill_item_entry(va_op, v_addr);
+ goto page_type;
+ case((caddr_t)1): /* { dg-error "parse error" } */
+ default: /* { dg-error "default label" } */
+ ((void)(((0))?0:(__eprintf("Failed assertion`%s'at line%d of`%s'.\n",
+ "FALSE", 327, "b.c"), 0)));
+ }
+}
+
+void
+flush_hash(hasht, hash_size)
+prec_t hasht;
+int hash_size;
+{
+ register prec_t bucket;
+ register int idx;
+ bucket = hasht;
+ for(idx=(hash_size*3)-1; idx>=0; idx--) {
+ bucket->v_addr = ((caddr_t)0);/* { dg-error "undeclared|pointer to|parse error" } */
+ bucket->p_addr = ((caddr_t)0);/* { dg-error "pointer to|parse error" } */
+ bucket->perm_set = VA_EMPTY; /* { dg-error "undeclared|pointer to" } */
+ }
+}
+
+void
+init_mem()
+{
+ mem_base = (BYTE *) calloc(1024, (1<<13)); /* { dg-error "undeclared|parse error" } */
+ ((void)((mem_base != (BYTE *)0) /* { dg-error "parse error" } */
+ ? 0
+ : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n",
+ "mem_base != (BYTE *)0", 366, "b.c"),
+ 0)));
+ hash_num = INIT_NUM_ENTRIES * 3; /* { dg-error "undeclared" } */
+ mem_hash = (prec_t) calloc(hash_num, sizeof(prec)); /* { dg-error "incomplete type" } */
+ ((void)((mem_hash != (prec_t)0)
+ ? 0
+ : (__eprintf("Failed assertion`%s'at line%d of`%s'.\n",
+ "mem_hash != (prec_t)0", 370, "b.c"),
+ 0)));
+ flush_hash(mem_hash, 32);
+ build_ptables(mem_base, 1024*(1<<13));
+}
+
+struct tm {
+ int tm_sec; int tm_min; int tm_hour;
+ int tm_mday;int tm_mon; int tm_year;
+ int tm_wday;int tm_yday;int tm_isdst;
+ char*tm_zone; long tm_gmtoff;
+};
diff --git a/gcc/testsuite/gcc.dg/noncompile/921102-1.c b/gcc/testsuite/gcc.dg/noncompile/921102-1.c
new file mode 100644
index 00000000000..8b66f712ef7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/921102-1.c
@@ -0,0 +1 @@
+int x[]={[0.3 ... 4.6]9}; /* { dg-error "nonconstant array|near init" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/921116-1.c b/gcc/testsuite/gcc.dg/noncompile/921116-1.c
new file mode 100644
index 00000000000..890bbb63404
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/921116-1.c
@@ -0,0 +1 @@
+void a (void x) {} /* { dg-error "has incomplete type" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/930301-1.c b/gcc/testsuite/gcc.dg/noncompile/930301-1.c
new file mode 100644
index 00000000000..afabd1513dd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/930301-1.c
@@ -0,0 +1,5 @@
+struct a *q;
+f()
+{
+ q++; /* { dg-error "pointer to" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/930622-1.c b/gcc/testsuite/gcc.dg/noncompile/930622-1.c
new file mode 100644
index 00000000000..835e072c655
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/930622-1.c
@@ -0,0 +1,6 @@
+f ()
+{
+ double b;
+ b = b * 10;
+ goto c; /* { dg-error "used but not defined" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/930622-2.c b/gcc/testsuite/gcc.dg/noncompile/930622-2.c
new file mode 100644
index 00000000000..b7e1b8e1dfe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/930622-2.c
@@ -0,0 +1,6 @@
+f ()
+{
+ int i;
+ for (i--) /* { dg-error "syntax" } */
+ ;
+}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/930714-1.c b/gcc/testsuite/gcc.dg/noncompile/930714-1.c
index d940c550f57..bdbc13394b3 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/930714-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/930714-1.c
@@ -15,11 +15,11 @@ void test()
int (*iptr)(int);
int foo[5];
- a = f1;
+ a = f1; /* { dg-error "incompatible types" } */
a = (YYSTYPE)f1;
a = (YYSTYPE)foo;
a = (YYSTYPE)(int *)foo;
iptr = f1;
- a = iptr;
+ a = iptr; /* { dg-error "incompatible types" } */
a = (YYSTYPE)iptr;
}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/931203-1.c b/gcc/testsuite/gcc.dg/noncompile/931203-1.c
index 1f5a8c3d7ad..0c6a9f2d385 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/931203-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/931203-1.c
@@ -7,5 +7,5 @@ typedef struct
point_t
f ()
{
- return 0;
+ return 0; /* { dg-error "incompatible types" } */
}
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/940112-1.c b/gcc/testsuite/gcc.dg/noncompile/940112-1.c
index 17dda8be54a..24780df554e 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/940112-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/940112-1.c
@@ -4,4 +4,4 @@ f (int x)
double e = 1;
e = 1;
return (e)
-}
+} /* { dg-error "parse error" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/940227-1.c b/gcc/testsuite/gcc.dg/noncompile/940227-1.c
new file mode 100644
index 00000000000..2e6d9139387
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/940227-1.c
@@ -0,0 +1,5 @@
+struct font {
+ struct {
+ char *line,*ulmask;
+ } c[2];
+} character[1] = { { {"", ""}, {"", ""} } }; /* { dg-error "extra|near|excess" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/940510-1.c b/gcc/testsuite/gcc.dg/noncompile/940510-1.c
new file mode 100644
index 00000000000..485c3d2e0b7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/940510-1.c
@@ -0,0 +1 @@
+struct { int a[]; } x = { 0 }; /* { dg-error "array size missing" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/950825-1.c b/gcc/testsuite/gcc.dg/noncompile/950825-1.c
new file mode 100644
index 00000000000..4f4c6fbb9e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/950825-1.c
@@ -0,0 +1,4 @@
+main()
+{
+return (struct x) {{y: 0}}; /* { dg-error "extra|near|excess|incompatible" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/950921-1.c b/gcc/testsuite/gcc.dg/noncompile/950921-1.c
new file mode 100644
index 00000000000..ed44338fcd1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/950921-1.c
@@ -0,0 +1,10 @@
+typedef enum
+{
+ a = (X) 0, /* { dg-error "undeclared|not integer|parse error" } */
+ b
+} c;
+
+typedef enum
+{
+ d = (X) 0 /* { dg-error "undeclared|not integer|parse error" } */
+} e;
diff --git a/gcc/testsuite/gcc.dg/noncompile/951123-1.c b/gcc/testsuite/gcc.dg/noncompile/951123-1.c
new file mode 100644
index 00000000000..9a5a3215ed6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/951123-1.c
@@ -0,0 +1,2 @@
+struct S { int a; int b[2]; };
+struct S x = { 0, [0]; }; /* { dg-error "array index|near|parse" } */
diff --git a/gcc/testsuite/gcc.c-torture/noncompile/971104-1.c b/gcc/testsuite/gcc.dg/noncompile/971104-1.c
index 3f0996dfb30..a20b17add58 100644
--- a/gcc/testsuite/gcc.c-torture/noncompile/971104-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/971104-1.c
@@ -21,6 +21,8 @@ static void up(int sem){
if(semop(semid, &sb, 1) == -1) error("up failure");
if(semctl(semid, sb.sem_num, 12 , semctl_arg) == 0)
printf("%s had processes sleeping on it!\n",
- ({ "MUTEX ", "BARB_SEM 1", "BARB_SEM 2", "CUST_SEM 1", "CUST_SEM 2", "WA
-IT_SEM 1", "WAIT_SEM 2", "WAIT_SEM 3", "WAIT_SEM 4"} [( sb.sem_num )]) );
+ ({ "MUTEX ", "BARB_SEM 1", "BARB_SEM 2", "CUST_SEM 1",
+ "CUST_SEM 2", "WAIT_SEM 1", "WAIT_SEM 2", "WAIT_SEM 3",
+ "WAIT_SEM 4"} /* { dg-error "parse error" } */
+ [( sb.sem_num )]) );
}
diff --git a/gcc/testsuite/gcc.dg/noncompile/990416-1.c b/gcc/testsuite/gcc.dg/noncompile/990416-1.c
new file mode 100644
index 00000000000..ae433ad6515
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/990416-1.c
@@ -0,0 +1,11 @@
+typedef int word_type;
+
+static void
+copy_reg (unsigned int reg, frame_state *udata, /* { dg-error "parse" } */
+ frame_state *target_udata)
+{
+ word_type *preg = get_reg_addr (reg, udata, 0); /* { dg-error "undeclared|function|without a cast" } */
+ word_type *ptreg = get_reg_addr (reg, target_udata, 0); /* { dg-error "undeclared|without a cast" } */
+
+ memcpy (ptreg, preg, __builtin_dwarf_reg_size (reg)); /* { dg-warning "implicit declaration" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/init-1.c b/gcc/testsuite/gcc.dg/noncompile/init-1.c
new file mode 100644
index 00000000000..007991b6af7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/init-1.c
@@ -0,0 +1,17 @@
+struct a
+{ double a, b, c; };
+
+struct b
+{
+ struct a arr[6];
+};
+
+static struct b a_b =
+{
+ {0,0,0},
+ {0,0,0}, /* { dg-error "extra brace|excess elements|near" } */
+ {0,0,0}, /* { dg-error "extra brace|excess elements|near" } */
+ {0,0,0}, /* { dg-error "extra brace|excess elements|near" } */
+ {0,0,0}, /* { dg-error "extra brace|excess elements|near" } */
+ {0,0,0}, /* { dg-error "extra brace|excess elements|near" } */
+};
diff --git a/gcc/testsuite/gcc.dg/noncompile/init-2.c b/gcc/testsuite/gcc.dg/noncompile/init-2.c
new file mode 100644
index 00000000000..462e33219a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/init-2.c
@@ -0,0 +1 @@
+int d[][] = { {1}, {2}, {3} }; /* { dg-error "incomplete type" } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c b/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c
new file mode 100644
index 00000000000..0cb14799f34
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c
@@ -0,0 +1,4 @@
+asm_invalid_register_name()
+{
+ asm("":::"this_is_an_invalid_register_name"); /* { dg-error "unknown register" } */
+}
diff --git a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
new file mode 100644
index 00000000000..f23dccad723
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
@@ -0,0 +1,64 @@
+# Copyright (C) 1997, 2000 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
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# Please email any bugs, comments, and/or additions to this file to:
+# bug-gcc@prep.ai.mit.edu
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# Utility for scanning compiler result, invoked via dg-final.
+# Call pass if pattern is present, otherwise fail.
+proc scan-assembler { testcase pattern } {
+ global subdir
+
+ set fd [open [file rootname $testcase].s r]
+ set text [read $fd]
+ close $fd
+
+ if [regexp -- $pattern $text] {
+ pass "$subdir/$testcase scan-assembler"
+ } else {
+ fail "$subdir/$testcase scan-assembler"
+ }
+}
+
+# Call pass if pattern is not present, otherwise fail.
+proc scan-assembler-not { testcase pattern } {
+ global subdir
+
+ set fd [open [file rootname $testcase].s r]
+ set text [read $fd]
+ close $fd
+
+ if ![regexp -- $pattern $text] {
+ pass "$subdir/$testcase scan-assembler-not"
+ } else {
+ fail "$subdir/$testcase scan-assembler-not"
+ }
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+# Don't run this directory with any default CFLAGS.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c b/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c
new file mode 100644
index 00000000000..b8b7d3c31cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/noncompile/va-arg-1.c
@@ -0,0 +1,8 @@
+#include <stdarg.h>
+
+f (int x, ...)
+{
+ va_list args;
+ va_start (args, bogus_variable); /* { dg-error "undeclared|for each function|not last named" } */
+ va_end (args);
+}