builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / Walloca-4.c
blob85dcb7b9bb99d7d22bf78c8b69b0036c412ba977
1 /* { dg-do compile } */
2 /* { dg-require-effective-target alloca } */
3 /* { dg-options "-Walloca-larger-than=5000 -O2" } */
5 char *
6 _i18n_number_rewrite (char *w, char *rear_ptr)
9 char *src;
10 _Bool
11 use_alloca = (((rear_ptr - w) * sizeof (char)) < 4096U);
12 if (use_alloca)
13 src = (char *) __builtin_alloca ((rear_ptr - w) * sizeof (char));
14 else
15 src = (char *) __builtin_malloc ((rear_ptr - w) * sizeof (char));
16 return src;