diff --git a/gcc/testsuite/g++.dg/warn/Wchar-subscripts-2.C b/gcc/testsuite/g++.dg/warn/Wchar-subscripts-2.C index 5d19cd37ea4..2170cb20616 100644 --- a/gcc/testsuite/g++.dg/warn/Wchar-subscripts-2.C +++ b/gcc/testsuite/g++.dg/warn/Wchar-subscripts-2.C @@ -2,9 +2,11 @@ // { dg-do compile } // { dg-options "-Wchar-subscripts" } +extern volatile char bla; + char foo (const char *s) { - return s [s ['\x80']]; // { dg-warning "array subscript" } + return s [bla]; // { dg-warning "array subscript" } } int main ()