libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr86058.c
blob89628c9719ccb69f1b650bff887c96acf34ee9a8
1 /* PR middle-end/86058 - TARGET_MEM_REF causing incorrect message for
2 -Wmaybe-uninitialized warning
3 The test fails on a number of non-x86 targets due to pr100073.
4 { dg-do compile { target i?86-*-* x86_64-*-* } }
5 { dg-options "-O2 -Wuninitialized -Wmaybe-uninitialized" } */
7 extern void foo (int *);
9 void zip (int *out, int indx)
11 int arr[10];
13 for (int i = 0; i < indx; ++i)
14 out[i] = arr[i] + 1; // { dg-warning "'arr\\\[i]' may be used uninitialized" "pr99944" { xfail *-*-* } }
15 // { dg-warning "'arr' may be used uninitialized" "actual" { target *-*-* } .-1 }
17 foo (arr);
18 foo (out);