diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20040317-1.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20040317-2.c | 25 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20040317-3.c | 11 |
3 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040317-1.c b/gcc/testsuite/gcc.c-torture/compile/20040317-1.c new file mode 100644 index 00000000000..4a3455115cb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20040317-1.c @@ -0,0 +1,4 @@ +int String2Array(int len, char strarr[][len]) +{ + strarr[0]; +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20040317-2.c b/gcc/testsuite/gcc.c-torture/compile/20040317-2.c new file mode 100644 index 00000000000..3c8ee2b8ec5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20040317-2.c @@ -0,0 +1,25 @@ +typedef struct _ScaleRec *ScaleWidget; +typedef struct +{ + short *x; + unsigned short *width; +} Table; +typedef struct +{ + Table table; +} ScalePart; +typedef struct _ScaleRec +{ + ScalePart scale; +} ScaleRec; +static int +FindPixel (ScaleWidget sw, short x, short y, + short * img_x, short * img_y, unsigned long * img_pixel) +{ + if (sw->scale.table.x[(int) *img_x] + + (short) sw->scale.table.width[(int) *img_x] < x) + { + ++*img_x; + return FindPixel (sw, x, y, img_x, img_y, img_pixel); + } +} diff --git a/gcc/testsuite/gcc.c-torture/compile/20040317-3.c b/gcc/testsuite/gcc.c-torture/compile/20040317-3.c new file mode 100644 index 00000000000..e6982c3e3b3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20040317-3.c @@ -0,0 +1,11 @@ +I_wacom () +{ + char buffer[50], *p; + int RequestData (char *cmd) + { + p = buffer; + foo (buffer); + } + RequestData (0); +} + |