gcc/testsuite/g++.dg/expr/comma1.C
raw| 1 | // { dg-do run } |
| 2 | |
| 3 | extern "C" void abort (); |
| 4 | |
| 5 | struct gtst |
| 6 | { |
| 7 | unsigned char data[2]; |
| 8 | }; |
| 9 | |
| 10 | static struct gtst s; |
| 11 | |
| 12 | int main(int argc, char *argv[]) |
| 13 | { |
| 14 | unsigned char * pc; |
| 15 | struct gtst * ps; |
| 16 | ps = &s; |
| 17 | pc = (ps->data[0]='A', ps->data); |
| 18 | if (&s.data[0] != pc) |
| 19 | abort(); |
| 20 | return 0; |
| 21 | } |