Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/Walloca-4.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
5 char * | 5 char * |
6 _i18n_number_rewrite (char *w, char *rear_ptr) | 6 _i18n_number_rewrite (char *w, char *rear_ptr) |
7 { | 7 { |
8 | 8 |
9 char *src; | 9 char *src; |
10 _Bool | 10 _Bool use_alloca = (((rear_ptr - w) * sizeof (char)) < 4096U); |
11 use_alloca = (((rear_ptr - w) * sizeof (char)) < 4096U); | 11 if (use_alloca) |
12 if (use_alloca) | |
13 src = (char *) __builtin_alloca ((rear_ptr - w) * sizeof (char)); | 12 src = (char *) __builtin_alloca ((rear_ptr - w) * sizeof (char)); |
14 else | 13 else |
15 src = (char *) __builtin_malloc ((rear_ptr - w) * sizeof (char)); | 14 src = (char *) __builtin_malloc ((rear_ptr - w) * sizeof (char)); |
16 return src; | 15 return src; |
17 } | 16 } |
17 | |
18 /* { dg-prune-output "-Wreturn-local-addr" } */ |