* Tweak a couple of testcases
@ 2009-11-10 17:32 Eric Botcazou
0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2009-11-10 17:32 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 534 bytes --]
gcc.c-torture/execute/ipa-sra-2.c doesn't pass on SPARC64/Solaris 10 because
it returns a value read from uninitialized memory. gcc.dg/pr41963.c doesn't
pass on SPARC/Solaris 9 because of a missing declaration for fabsf.
Tested on SPARC/Solaris 9, SPARC64/Solaris 10 and x86/Linux, applied on the
mainline as obvious.
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.
--
Eric Botcazou
[-- Attachment #2: p.diff --]
[-- Type: text/x-diff, Size: 1154 bytes --]
Index: gcc.c-torture/execute/ipa-sra-2.c
===================================================================
--- gcc.c-torture/execute/ipa-sra-2.c (revision 154059)
+++ gcc.c-torture/execute/ipa-sra-2.c (working copy)
@@ -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);
Index: gcc.dg/pr41963.c
===================================================================
--- gcc.dg/pr41963.c (revision 154059)
+++ gcc.dg/pr41963.c (working copy)
@@ -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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-10 17:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 17:32 Tweak a couple of testcases Eric Botcazou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).