From: Kaz Kojima Date: Wed, 7 Nov 2012 10:50:22 +0000 (+0000) Subject: pr49220.c: New test. X-Git-Tag: releases/gcc-4.8.0~2173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b9195e54ef7daf371c7adfdee9cf1fd78ace655f;p=thirdparty%2Fgcc.git pr49220.c: New test. * gcc.c-torture/compile/pr49220.c: New test. From-SVN: r193290 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5f10e41a877f..1ba75afcecca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-11-07 Kaz Kojima + + * gcc.c-torture/compile/pr49220.c: New test. + 2012-11-07 Florian Weimer * g++.dg/init/new40.C: New. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49220.c b/gcc/testsuite/gcc.c-torture/compile/pr49220.c new file mode 100644 index 000000000000..b8285ce4ac99 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr49220.c @@ -0,0 +1,25 @@ +int array[2]; + +static int +func1 (int b) +{ + return b; +} + +static int +func2 (int a, int b) +{ + return b == 0 ? a : b; +} + +int +func3 (int a) +{ +} + +int * +func4 (int *arg) +{ + *arg = func1 ((func2 (func3 (array[0]), *arg)) | array[0]); + return &array[1]; +}