tccgen: use lvalue as result from bitfield assignmentmob
authorgrischka <grischka>
Tue, 23 Sep 2014 10:30:08 +0000 (12:30 +0200)
committergrischka <grischka>
Tue, 23 Sep 2014 10:30:08 +0000 (12:30 +0200)
commit9d7fb3336049243a16ce20ba907946d1de9e1c0d
tree9c0b9009b9447f0749a070a2d14df814b83bb15e
parent87d879aa7b3a75245e5e1a0fe15ba08105457df2
tccgen: use lvalue as result from bitfield assignment

test case:

    #include <stdio.h>
    int main(int argc, char **argv)
    {
        struct _s { unsigned a:9, b:5, c:7; } _s, *s = &_s;
        int n = 250;
        s->a = s->b = s->c = n + 4;
        printf("--> %d / %d / %d\n", s->a, s->b, s->c);
        return 0;
    }

before:
--> 254 / 30 / 126
now:
--> 30 / 30 / 126
tccgen.c