comparison gcc/testsuite/gcc.dg/pr70859-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR c/70859 */
2 /* { dg-do compile } */
3
4 #ifdef _AIX
5 #define _ISOC99_SOURCE
6 #endif
7 #include <stdint.h>
8 #define MAX __SIZE_MAX__
9 #define MAX2 SIZE_MAX
10 #define FIVE 5
11
12 static void *p;
13
14 void
15 fn0 (int n)
16 {
17 p = __builtin_alloca_with_align (n, SIZE_MAX); /* { dg-error "39:must be a constant integer" } */
18 p = __builtin_alloca_with_align (n, MAX); /* { dg-error "39:must be a constant integer" } */
19 p = __builtin_alloca_with_align (n, MAX2); /* { dg-error "39:must be a constant integer" } */
20 p = __builtin_alloca_with_align (n, FIVE); /* { dg-error "39:must be a constant integer" } */
21 }