diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr28778.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr28778.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr28778.c b/gcc/testsuite/gcc.c-torture/execute/pr28778.c new file mode 100644 index 000000000..f96a66cd3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr28778.c @@ -0,0 +1,33 @@ +extern void abort(void); +typedef long GLint; +void aglChoosePixelFormat (const GLint *); + +void +find (const int *alistp) +{ + const int *blist; + int list[32]; + if (alistp) + blist = alistp; + else + { + list[3] = 42; + blist = list; + } + aglChoosePixelFormat ((GLint *) blist); +} + +void +aglChoosePixelFormat (const GLint * a) +{ + int *b = (int *) a; + if (b[3] != 42) + abort (); +} + +int +main (void) +{ + find (0); + return 0; +} |