3be6ce4646
Rearrange lots of files, removing entirely the gcc.c-torture/special, gcc.c-torture/code-quality, and gcc.failure directories. * Deleted files: gcc.c-torture/code_quality/code_quality.exp gcc.c-torture/special/special.exp gcc.failure/failure.exp gcc.failure/940409-1.x gcc.c-torture/compile/961203-1.x * New files: gcc.misc-tests/linkage.exp gcc.c-torture/execute/920730-1t.c gcc.c-torture/execute/920730-1t.x gcc.c-torture/compile/920520-1.x gcc.c-torture/compile/920521-1.x gcc.c-torture/compile/981006-1.x gcc.c-torture/execute/eeprof-1.x * Moved files (possibly with modifications to fit a new harness): Old name New name gcc.c-torture/code_quality/920608-1.c gcc.c-torture/compile/920608-1.c gcc.c-torture/special/920413-1.c gcc.dg/920413-1.c gcc.c-torture/special/920520-1.c gcc.c-torture/compile/920520-1.c gcc.c-torture/special/920521-1.c gcc.c-torture/compile/920521-1.c gcc.c-torture/special/920717-x.c gcc.misc-tests/linkage-x.c gcc.c-torture/special/920717-y.c gcc.misc-tests/linkage-y.c gcc.c-torture/special/920730-1.c gcc.c-torture/execute/920730-1.c gcc.c-torture/special/930510-1.c gcc.dg/cpp/19930510-1.c gcc.c-torture/special/951130-1.c gcc.dg/951130-1.c gcc.c-torture/special/960224-1.c gcc.dg/cpp/19960224-1.c gcc.c-torture/special/960224-2.c gcc.dg/cpp/19960224-2.c gcc.c-torture/special/981006-1.c gcc.c-torture/compile/981006-1.c gcc.c-torture/special/eeprof-1.c gcc.c-torture/execute/eeprof-1.c gcc.failure/940409-1.c gcc.dg/940409-1.c From-SVN: r34775
51 lines
982 B
C
51 lines
982 B
C
/* 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" } */
|
|
int y; /* { dg-bogus "warning: `.' might be used uninitialized in this function" } */
|
|
static void *p;
|
|
|
|
switch (a) {
|
|
case 2:
|
|
x = 4;
|
|
break;
|
|
case 4:
|
|
x = 6;
|
|
break;
|
|
case 8: case 10: case 13: case 11: case 17: case 19:
|
|
x = 7;
|
|
break;
|
|
default:
|
|
x = -1;
|
|
break;
|
|
}
|
|
switch (b) {
|
|
case 2:
|
|
y = 4;
|
|
break;
|
|
case 4:
|
|
y = 6;
|
|
break;
|
|
case 8: case 10: case 13: case 11: case 17: case 19:
|
|
y = 7;
|
|
break;
|
|
default:
|
|
y = -1;
|
|
break;
|
|
}
|
|
z:
|
|
p = &&z;
|
|
return x * y;
|
|
}
|
|
int main (int argc, char *argv[])
|
|
{
|
|
return 1 == foo (argc, argc + 1);
|
|
}
|