Hi, as a workaround i would use a struct with the bitfields and one uint_32 or maybe one uint_16 and one uint_8. I would always use such embedding because a bit field has no address in ANSI-C.
Regards, Rolf mspgcc-users@lists.sourceforge.net schrieb am 17.01.05 16:27:13: > > Hi everyone, > > when a function returns a struct it works fine as long as the struct > does not contain bitfields with more than 16 bits in total. Otherwise > I get an internal compiler error: > > app.c: In function `foo': > app.c:9: insn does not satisfy its constraints: > (insn 49 47 52 (set (reg/i:SI 15 r15) > (reg:SI 13 r13 [37])) 57 {*movsi3} (insn_list 41 (nil)) > (nil)) > app.c:9: Internal compiler error in reload_cse_simplify_operands, at > reload1.c:8346 > Please submit a full bug report, > with preprocessed source if appropriate. > See <URL:http://gcc.gnu.org/bugs.html> for instructions. > > Example program (app.c): > > /****** START *******/ > typedef struct { > unsigned int x: 8; > unsigned int y: 9; > } settings_t; > > settings_t foo(){ > settings_t s = {1,2}; > return s; > } > > int main(){ > settings_t s = foo(); > } > /****** STOP *******/ > > To me the code looks legal, so I guess it is a bug in the compiler, > comments ? > > Regards, > Jan > > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users