public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RECORD_TYPE with 1 field
@ 2014-03-05 19:04 Philip Herron
  0 siblings, 0 replies; only message in thread
From: Philip Herron @ 2014-03-05 19:04 UTC (permalink / raw)
  To: GCC

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-05 17:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 19:04 RECORD_TYPE with 1 field Philip Herron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).