repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c/56980
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr45079.c
blob
1ef02ff78fb4896de8c2485933d57059b13e5f02
1
/* PR c/45079 */
2
/* { dg-do compile } */
3
4
void
5
foo
(
const char
*
p
,
int
cond
,
int
a
,
int
b
)
6
{
7
p
[
cond
?
a
:
b
] =
'\0'
;
/* { dg-error "assignment of read-only location" } */
8
}
9
10
/* { dg-bogus "not supported by" "" { target *-*-* } 0 } */