diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-11-10 17:29:52 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-11-10 17:29:52 +0000 |
commit | 6692a053e274798edc26345f400f5b032ee08194 (patch) | |
tree | 39c47c277c688ddb3f5c5aaf82142c00f349dfac /gcc | |
parent | 08d198890e548cc9d551d4dfdfef257893a21ed3 (diff) | |
download | gcc-6692a053e274798edc26345f400f5b032ee08194.zip gcc-6692a053e274798edc26345f400f5b032ee08194.tar.gz gcc-6692a053e274798edc26345f400f5b032ee08194.tar.bz2 |
ipa-sra-2.c: Use calloc instead of malloc.
* gcc.c-torture/execute/ipa-sra-2.c: Use calloc instead of malloc.
* gcc.dg/pr41963.c: Do not include math.h. Declare fabsf manually.
From-SVN: r154067
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr41963.c | 2 |
3 files changed, 9 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2f0e9aa..9985bd9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-11-10 Eric Botcazou <ebotcazou@adacore.com> + + * gcc.c-torture/execute/ipa-sra-2.c: Use calloc instead of malloc. + * gcc.dg/pr41963.c: Do not include math.h. Declare fabsf manually. + 2009-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * gcc.c-torture/compile/pr41987.c: New. diff --git a/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c b/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c index 9d5ae44..515d416 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/ipa-sra-2.c @@ -14,11 +14,10 @@ union both struct small small; }; -extern void *malloc(__SIZE_TYPE__); +extern void *calloc (__SIZE_TYPE__, __SIZE_TYPE__); extern void free (void *); -static int -__attribute__((noinline)) +static int __attribute__((noinline)) foo (int fail, union both *agg) { int r; @@ -31,7 +30,7 @@ foo (int fail, union both *agg) int main (int argc, char *argv[]) { - union both *agg = malloc (sizeof (struct small)); + union both *agg = calloc (1, sizeof (struct small)); int r; r = foo ((argc > 2000), agg); diff --git a/gcc/testsuite/gcc.dg/pr41963.c b/gcc/testsuite/gcc.dg/pr41963.c index f8bf4a1..408a3d2 100644 --- a/gcc/testsuite/gcc.dg/pr41963.c +++ b/gcc/testsuite/gcc.dg/pr41963.c @@ -1,7 +1,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -ffast-math" } */ -#include <math.h> +extern float fabsf(float); extern float sqrtf(float); static __attribute__((noinline)) void f (float *dst, float *src) |