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