RECORD_TYPE with 1 field
Philip Herron
redbrain@gcc.gnu.org
Wed Mar 5 19:04:00 GMT 2014
Hey all,
I've got a wierd bug in my rust front-end at the moment, its definetly
someting i have done wrong, but if i have a struct with several fields
its fine:
to initilize a struct i do:
struct mytype x;
x.fielda = ..
x.fieldb = ...
So on to initilize the struct, but if i have 1 field in a struct i get
this error at compile time:
Analyzing compilation unit
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups>In function 'main':
grs1: error: invalid address operand in MEM_REF
MEM[(struct mytype *)&x];
grs1: error: invalid first operand of MEM_REF
&x
grs1: note: in statement
# .MEM_3 = VDEF <.MEM_1(D)>
MEM[(struct mytype *)&x] = RUST_TMP.0$x_2;
grs1: internal compiler error: verify_gimple failed
0x911d25 verify_gimple_in_cfg(function*)
../../gccrs/gcc/tree-cfg.c:4942
0x839b72 execute_function_todo
../../gccrs/gcc/passes.c:1853
0x83a4b3 execute_todo
../../gccrs/gcc/passes.c:1887
Please submit a full bug report,
I don't understand where the MEM ref has come from or why and i dont
know why its cast the type. Seems really confusing when this only
happens on structs with 1 field.
--Phil
More information about the Gcc-help
mailing list