mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 19:51:34 +08:00
anon-struct-6.c, [...]: Ensure uniqueness of test assertion names.
* gcc.dg/anon-struct-6.c, gcc.dg/array-8.c, gcc.dg/cpp/19940712-1.c, gcc.dg/cpp/19951025-1.c, gcc.dg/cpp/tr-warn6.c, gcc.dg/deprecated.c, gcc.dg/init-bad-1.c, gcc.dg/init-bad-2.c, gcc.dg/init-bad-3.c, gcc.dg/m-un-2.c, gcc.dg/parm-mismatch-1.c, gcc.dg/redecl-1.c: Ensure uniqueness of test assertion names. From-SVN: r96391
This commit is contained in:
parent
97c54d9afb
commit
053e7c38b3
@ -1,3 +1,12 @@
|
||||
2005-03-13 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.dg/anon-struct-6.c, gcc.dg/array-8.c,
|
||||
gcc.dg/cpp/19940712-1.c, gcc.dg/cpp/19951025-1.c,
|
||||
gcc.dg/cpp/tr-warn6.c, gcc.dg/deprecated.c, gcc.dg/init-bad-1.c,
|
||||
gcc.dg/init-bad-2.c, gcc.dg/init-bad-3.c, gcc.dg/m-un-2.c,
|
||||
gcc.dg/parm-mismatch-1.c, gcc.dg/redecl-1.c: Ensure uniqueness of
|
||||
test assertion names.
|
||||
|
||||
2003-03-13 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
PR fortran/18600
|
||||
|
@ -9,4 +9,4 @@ struct s {
|
||||
const;
|
||||
};
|
||||
/* { dg-warning "warning: useless type qualifier in empty declaration" "empty" { target *-*-* } 9 } */
|
||||
/* { dg-warning "warning: empty declaration" "empty" { target *-*-* } 9 } */
|
||||
/* { dg-warning "warning: empty declaration" "empty 2" { target *-*-* } 9 } */
|
||||
|
@ -43,7 +43,7 @@ g (void)
|
||||
pv[0]; /* { dg-warning "warning: dereferencing 'void \\*' pointer" } */
|
||||
0[pv]; /* { dg-warning "warning: dereferencing 'void \\*' pointer" } */
|
||||
sip[0]; /* { dg-error "error: invalid use of undefined type 'struct si'" } */
|
||||
/* { dg-error "error: dereferencing pointer to incomplete type" "" { target *-*-* } 45 } */
|
||||
/* { dg-error "error: dereferencing pointer to incomplete type" "incomplete" { target *-*-* } 45 } */
|
||||
0[sip]; /* { dg-error "error: invalid use of undefined type 'struct si'" } */
|
||||
/* { dg-error "error: dereferencing pointer to incomplete type" "" { target *-*-* } 47 } */
|
||||
/* { dg-error "error: dereferencing pointer to incomplete type" "incomplete" { target *-*-* } 47 } */
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
/* dg.exp doesn't read the header files for magic comments. */
|
||||
/* { dg-error "unterminated comment" "" { target *-*-* } 4 } */
|
||||
/* { dg-error "unterminated comment" "" { target *-*-* } 8 } */
|
||||
/* { dg-error "unterminated comment" "header error" { target *-*-* } 8 } */
|
||||
|
||||
#include "19940712-1.h" /* { dg-error "" } // In file included from: */
|
||||
#include "19940712-1a.h" /* { dg-error "" } // In file included from: */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* { dg-do preprocess } */
|
||||
/* { dg-error "include expects" "" { target *-*-* } 4 } */
|
||||
/* { dg-error "newline at end" "" { target *-*-* } 4 } */
|
||||
/* { dg-error "include expects" "include" { target *-*-* } 4 } */
|
||||
/* { dg-error "newline at end" "newline" { target *-*-* } 4 } */
|
||||
#include /\
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define foo7(AA, hello, world, EEE) sdf "A B hello C,world,DhelloE F" fds EEE /* { dg-warning "macro argument \"hello\" would be stringified" "traditional stringification" } */
|
||||
|
||||
/* Catch the second warning from the above line. */
|
||||
/* { dg-warning "macro argument \"world\" would be stringified" "traditional stringification" { target *-*-* } 13 } */
|
||||
/* { dg-warning "macro argument \"world\" would be stringified" "traditional stringification second warning" { target *-*-* } 13 } */
|
||||
|
||||
# 19 "sys-header.h" 3
|
||||
/* We are in system headers now, no -Wtraditional warnings should issue. */
|
||||
|
@ -53,10 +53,10 @@ int func1()
|
||||
int (*pf)() = f1; /* { dg-warning "'f1' is deprecated" "" } */
|
||||
|
||||
z = w + x + y + g1 + g2 + g3; /* { dg-warning "'x' is deprecated" "" } */
|
||||
/* { dg-warning "'y' is deprecated" "" { target *-*-* } 55 } */
|
||||
/* { dg-warning "'g2' is deprecated" "" { target *-*-* } 55 } */
|
||||
/* { dg-warning "'g3' is deprecated" "" { target *-*-* } 55 } */
|
||||
return f1(); /* { dg-warning "'f1' is deprecated" "" } */
|
||||
/* { dg-warning "'y' is deprecated" "y" { target *-*-* } 55 } */
|
||||
/* { dg-warning "'g2' is deprecated" "g2" { target *-*-* } 55 } */
|
||||
/* { dg-warning "'g3' is deprecated" "g3" { target *-*-* } 55 } */
|
||||
return f1(); /* { dg-warning "'f1' is deprecated" "f1" } */
|
||||
}
|
||||
|
||||
int func2(S1 *p)
|
||||
@ -71,7 +71,7 @@ int func2(S1 *p)
|
||||
p->u1.field5 = g1 + p->field7;
|
||||
p->u2.field9; /* { dg-warning "'u2' is deprecated" "" } */
|
||||
return p->u1.field6 + p->field8; /* { dg-warning "'field6' is deprecated" "" } */
|
||||
/* { dg-warning "'field8' is deprecated" "" { target *-*-* } 73 } */
|
||||
/* { dg-warning "'field8' is deprecated" "field8" { target *-*-* } 73 } */
|
||||
}
|
||||
|
||||
struct SS1 {
|
||||
|
@ -10,8 +10,8 @@ void h(a)
|
||||
int a = 1; /* { dg-error "error: parameter 'a' is initialized" } */
|
||||
{
|
||||
struct s x = { 0 }; /* { dg-error "error: variable 'x' has initializer but incomplete type" } */
|
||||
/* { dg-warning "excess elements|near init" "" { target *-*-* } 12 } */
|
||||
/* { dg-error "storage size" "" { target *-*-* } 12 } */
|
||||
/* { dg-warning "excess elements|near init" "excess" { target *-*-* } 12 } */
|
||||
/* { dg-error "storage size" "size" { target *-*-* } 12 } */
|
||||
}
|
||||
|
||||
char s[1] = "x";
|
||||
@ -19,27 +19,27 @@ char s1[1] = { "x" };
|
||||
char t[1] = "xy"; /* { dg-warning "warning: initializer-string for array of chars is too long" } */
|
||||
char t1[1] = { "xy" }; /* { dg-warning "warning: initializer-string for array of chars is too long" } */
|
||||
char u[1] = { "x", "x" }; /* { dg-error "error: excess elements in char array initializer" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 21 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 21 } */
|
||||
|
||||
int i = { }; /* { dg-error "error: empty scalar initializer" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 24 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 24 } */
|
||||
|
||||
int j = { 1 };
|
||||
|
||||
int k = { 1, 2 }; /* { dg-warning "warning: excess elements in scalar initializer" } */
|
||||
/* { dg-warning "near init" "" { target *-*-* } 29 } */
|
||||
/* { dg-warning "near init" "near" { target *-*-* } 29 } */
|
||||
|
||||
int a1[1] = { [1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 32 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 32 } */
|
||||
int a2[1] = { [-1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 34 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 34 } */
|
||||
int a3[1] = { [0 ... 1] = 0 }; /* { dg-error "error: array index range in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 36 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 36 } */
|
||||
int a4[2] = { [1 ... 0] = 0 }; /* { dg-error "error: empty index range in initializer" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 38 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 38 } */
|
||||
int a5[2] = { [0 ... 2] = 0 }; /* { dg-error "error: array index range in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 40 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 40 } */
|
||||
int a6[2] = { [-1 ... 1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 42 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 42 } */
|
||||
int a7[] = { [-1 ... 1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 44 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 44 } */
|
||||
|
@ -11,8 +11,8 @@ void h(a)
|
||||
int a = 1; /* { dg-error "error: parameter 'a' is initialized" } */
|
||||
{
|
||||
struct s x = { 0 }; /* { dg-error "error: variable 'x' has initializer but incomplete type" } */
|
||||
/* { dg-warning "excess elements|near init" "" { target *-*-* } 13 } */
|
||||
/* { dg-error "storage size" "" { target *-*-* } 13 } */
|
||||
/* { dg-warning "excess elements|near init" "near" { target *-*-* } 13 } */
|
||||
/* { dg-error "storage size" "size" { target *-*-* } 13 } */
|
||||
}
|
||||
|
||||
char s[1] = "x";
|
||||
@ -20,14 +20,14 @@ char s1[1] = { "x" };
|
||||
char t[1] = "xy"; /* { dg-warning "warning: initializer-string for array of chars is too long" } */
|
||||
char t1[1] = { "xy" }; /* { dg-warning "warning: initializer-string for array of chars is too long" } */
|
||||
char u[1] = { "x", "x" }; /* { dg-error "error: excess elements in char array initializer" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 22 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 22 } */
|
||||
|
||||
int j = { 1 };
|
||||
|
||||
int k = { 1, 2 }; /* { dg-warning "warning: excess elements in scalar initializer" } */
|
||||
/* { dg-warning "near init" "" { target *-*-* } 27 } */
|
||||
/* { dg-warning "near init" "near" { target *-*-* } 27 } */
|
||||
|
||||
int a1[1] = { [1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 30 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 30 } */
|
||||
int a2[1] = { [-1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 32 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 32 } */
|
||||
|
@ -11,8 +11,8 @@ void h(a)
|
||||
int a = 1; /* { dg-error "error: parameter 'a' is initialized" } */
|
||||
{
|
||||
struct s x = { 0 }; /* { dg-error "error: variable 'x' has initializer but incomplete type" } */
|
||||
/* { dg-error "excess elements|near init" "" { target *-*-* } 13 } */
|
||||
/* { dg-error "storage size" "" { target *-*-* } 13 } */
|
||||
/* { dg-error "excess elements|near init" "near" { target *-*-* } 13 } */
|
||||
/* { dg-error "storage size" "size" { target *-*-* } 13 } */
|
||||
}
|
||||
|
||||
char s[1] = "x";
|
||||
@ -20,14 +20,14 @@ char s1[1] = { "x" };
|
||||
char t[1] = "xy"; /* { dg-error "error: initializer-string for array of chars is too long" } */
|
||||
char t1[1] = { "xy" }; /* { dg-error "error: initializer-string for array of chars is too long" } */
|
||||
char u[1] = { "x", "x" }; /* { dg-error "error: excess elements in char array initializer" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 22 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 22 } */
|
||||
|
||||
int j = { 1 };
|
||||
|
||||
int k = { 1, 2 }; /* { dg-error "error: excess elements in scalar initializer" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 27 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 27 } */
|
||||
|
||||
int a1[1] = { [1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 30 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 30 } */
|
||||
int a2[1] = { [-1] = 0 }; /* { dg-error "error: array index in initializer exceeds array bounds" } */
|
||||
/* { dg-error "near init" "" { target *-*-* } 32 } */
|
||||
/* { dg-error "near init" "near" { target *-*-* } 32 } */
|
||||
|
@ -16,7 +16,7 @@ struct vtable mtable = {
|
||||
malloc,
|
||||
free
|
||||
}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */
|
||||
/* { dg-warning "initialization for 'mtable._realloc'" "warning regression" { target *-*-* } {18} } */
|
||||
/* { dg-warning "initialization for 'mtable._realloc'" "warning regression 2" { target *-*-* } {18} } */
|
||||
|
||||
/* With designated initializers, we assume you meant to leave out the
|
||||
initialization of any blank fields. */
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
void f0(); /* { dg-error "error: previous declaration of 'f0' was here" } */
|
||||
void f0(int, ...); /* { dg-error "error: conflicting types for 'f0'" } */
|
||||
/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "" { target *-*-* } 8 } */
|
||||
/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } 8 } */
|
||||
void f1(int, ...); /* { dg-error "error: previous declaration of 'f1' was here" } */
|
||||
void f1(); /* { dg-error "error: conflicting types for 'f1'" } */
|
||||
/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "" { target *-*-* } 11 } */
|
||||
/* { dg-error "note: a parameter list with an ellipsis can't match an empty parameter name list declaration" "note" { target *-*-* } 11 } */
|
||||
void f2(); /* { dg-error "error: previous declaration of 'f2' was here" } */
|
||||
void f2(char); /* { dg-error "error: conflicting types for 'f2'" } */
|
||||
/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "" { target *-*-* } 14 } */
|
||||
/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } 14 } */
|
||||
void f3(char); /* { dg-error "error: previous declaration of 'f3' was here" } */
|
||||
void f3(); /* { dg-error "error: conflicting types for 'f3'" } */
|
||||
/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "" { target *-*-* } 17 } */
|
||||
/* { dg-error "note: an argument type that has a default promotion can't match an empty parameter name list declaration" "note" { target *-*-* } 17 } */
|
||||
|
@ -94,7 +94,7 @@ static int test7(int x)
|
||||
void prime8(void)
|
||||
{
|
||||
test8(); /* { dg-warning "previous" "" } */
|
||||
/* { dg-warning "implicit" "" { target *-*-* } 96 } */
|
||||
/* { dg-warning "implicit" "implicit" { target *-*-* } 96 } */
|
||||
}
|
||||
|
||||
static int test8(int x)
|
||||
|
Loading…
x
Reference in New Issue
Block a user