aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wvla-parameter-13.c
blob: f64d29c665e0bd201b5c2d89d3fe999b3743423c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* PR c/101585 - Bad interaction of -fsanitize=undefined and -Wvla-parameters
   { dg-do compile }
   { dg-options "-Wall -fsanitize=undefined" } */

void f1 (int n, int (*)[n]);
void f1 (int n, int (*)[n]);            // { dg-bogus "\\\[-Wvla-parameter" }

void g1 (int m, int (*)[m]);
void g1 (int n, int (*)[n]);            // { dg-bogus "\\\[-Wvla-parameter" "pr101605" { xfail *-*-* } }

void h1 (int n, int (*)[n]);
void h1 (int n, int (*)[n + 1]);        // { dg-warning "\\\[-Wvla-parameter" }

void f2 (int m, int n, int (*)[m][n]);
void f2 (int n, int m, int (*)[n][m]);  // { dg-bogus "\\\[-Wvla-parameter" "pr101605" { xfail *-*-* } }

void g2 (int m, int n, int (*)[m][n]);
void g2 (int n, int m, int (*)[m][n]);  // { dg-warning "\\\[-Wvla-parameter" "pr101605" { xfail *-*-* } }