2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / pr45079.c
blob1ef02ff78fb4896de8c2485933d57059b13e5f02
1 /* PR c/45079 */
2 /* { dg-do compile } */
4 void
5 foo (const char *p, int cond, int a, int b)
7 p[cond ? a : b] = '\0'; /* { dg-error "assignment of read-only location" } */
10 /* { dg-bogus "not supported by" "" { target *-*-* } 0 } */