gcc/testsuite/g++.old-deja/g++.benjamin/14664-1.C
raw| 1 | // { dg-do assemble } |
| 2 | // 981203 bkoz |
| 3 | // g++/14664 - test |
| 4 | |
| 5 | char foo[26]; |
| 6 | |
| 7 | void bar() |
| 8 | { |
| 9 | //-g++: incompatible types in assignment of 'const char[]' to 'char[]' |
| 10 | //-edg: expression must be a modifiable lvalue |
| 11 | foo = "0123456789012345678901234"; // { dg-error "7:invalid array assignment" } // ERROR - |
| 12 | } |
| 13 | |
| 14 | |
| 15 |