Therefore this test has been duplicated as
c-c++-common/analyzer/pr109577-noexcept.c */
-void *malloc (unsigned long);
+void *malloc (__SIZE_TYPE__);
double *
-unsafe (unsigned long n)
+unsafe (__SIZE_TYPE__ n)
{
return (double *) malloc (n * sizeof (double));
}
double *
-safer (unsigned long n)
+safer (__SIZE_TYPE__ n)
{
- unsigned long nbytes;
+ __SIZE_TYPE__ nbytes;
if (__builtin_mul_overflow (n, sizeof (double), &nbytes))
return 0;
return (double *) malloc (nbytes); /* Exceptions enabled cause a leak here. */
/* { dg-do "compile" } */
/* { dg-additional-options "-fsigned-char" } */
+/* { dg-require-effective-target int32plus } */
/* TODO (PR analyzer/112528): remove need for this. */
/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=40 --param analyzer-bb-explosion-factor=10" } */
/* { dg-do "compile" } */
/* { dg-additional-options "-funsigned-char" } */
+/* { dg-require-effective-target int32plus } */
/* TODO (PR analyzer/112528): remove need for this. */
/* { dg-additional-options "--param analyzer-max-enodes-per-program-point=40 --param analyzer-bb-explosion-factor=10" } */
/* { dg-additional-options "-Wno-analyzer-null-argument" } */
/* { dg-require-effective-target alloca } */
+/* { dg-skip-if "has no putenv" { "avr-*-*" } } */
#include <stdio.h>
#include <stdlib.h>
/* { dg-do run } */
/* { dg-require-effective-target inf } */
/* { dg-skip-if "No subnormal support" { csky-*-* } { "-mhard-float" } } */
+/* { dg-skip-if "Not fully IEEE" { "avr-*-*" } } */
/* { dg-options "-DUNSAFE" { target tic6x*-*-* visium-*-* nvptx-*-* } } */
/* { dg-add-options ieee } */