libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / diagnostic-tree-expr-ranges-2.c
blob1cbcad5ac7dde3f9ef9fb7e8317343f31dfc9129
1 /* { dg-do compile } */
2 /* { dg-options "-Wuninitialized -fdiagnostics-show-caret" } */
4 int test_uninit_1 (void)
6 int result_1; /* { dg-message "declared here" } */
7 return result_1; /* { dg-warning "uninitialized" } */
8 /* { dg-begin-multiline-output "" }
9 return result_1;
10 ^~~~~~~~
11 int result_1;
12 ^~~~~~~~
13 { dg-end-multiline-output "" } */
16 int test_uninit_2 (void)
18 int result_2; /* { dg-message "declared here" } */
19 result_2 += 3; /* { dg-warning "uninitialized" } */
20 /* { dg-begin-multiline-output "" }
21 result_2 += 3;
22 ~~~~~~~~~^~~~
23 int result_2;
24 ^~~~~~~~
25 { dg-end-multiline-output "" } */
26 return result_2;