]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/Walloc-size-larger-than-11.c
1 /* PR middle-end/82063 - issues with arguments enabled by -Wall
2 { dg-do compile { target lp64 } }
3 { dg-options "-O -Walloc-size-larger-than=1PB -ftrack-macro-expansion=0" } */
5 typedef __SIZE_TYPE__
size_t;
14 T (__builtin_malloc (n
));
16 n
= (size_t)1000 * 1000 * 1000 * 1000 * 1000; /* 1 petabyte (PB) */
17 T (__builtin_malloc (n
));
20 T (__builtin_malloc (n
)); /* { dg-warning "argument 1 value .1000000000000001. exceeds maximum object size 1000000000000000" } */
23 T (__builtin_malloc (n
)); /* { dg-warning "exceeds maximum object size" } */
26 T (__builtin_malloc (n
)); /* { dg-warning "exceeds maximum object size" } */