1 /* PR middle-end/90404 */
3 const int c1
= 20; /* { dg-message "declared here" } */
6 *((int*) &c1
) = 10; /* { dg-warning "write to 'const' object 'c1'" } */
10 /* Example of writing to a subregion (an element within a const array). */
12 const int c2
[10] = {}; /* { dg-message "declared here" } */
15 ((int*) &c2
)[5] = 10; /* { dg-warning "write to 'const' object 'c2'" } */
19 const char s3
[] = "012.45"; /* { dg-message "declared here" } */
22 char *p
= __builtin_strchr (s3
, '.');
23 *p
= 0; /* { dg-warning "write to 'const' object 's3'" } */
25 if (__builtin_strlen (p
) != 3)