PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / c99-const-expr-13.c
blobe477e5d162d0d76fb84f304f8e8b8338b1590326
1 /* Test for constant expressions: VLA size constraints with
2 -frounding-math. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "-std=iso9899:1999 -pedantic-errors -frounding-math" } */
6 /* { dg-require-effective-target alloca } */
8 void
9 f (void)
11 /* With -frounding-math, presume that floating-point expressions
12 that may depend on the rounding mode do not count as arithmetic
13 constant expressions, and so arrays involving such expressions in
14 their sizes do not have the size checked for being negative. */
15 int a1[(int)(-5.0/3.0)];