RECORD_TYPE with 1 field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux