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
This commit is contained in:
parent
08d198890e
commit
6692a053e2
3 changed files with 9 additions and 5 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue