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
MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
test20610.d
blob
9bdeb20cf005ab84c45dc2165c191afc62535d20
1
/* TEST_OUTPUT:
2
---
3
fail_compilation/test20610.d(20): Error: cannot modify `const` expression `field`
4
---
5
*/
6
7
// https://issues.dlang.org/show_bug.cgi?id=20610
8
9
struct
S
10
{
11
int
what
;
12
}
13
14
void
main
()
15
{
16
S record
;
17
18
foreach
(
const ref
field
;
record
.
tupleof
)
19
{
20
field
=
10
;
21
}
22
}