From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23468 invoked by alias); 5 Mar 2014 17:34:06 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 23454 invoked by uid 89); 5 Mar 2014 17:34:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f51.google.com Received: from mail-qa0-f51.google.com (HELO mail-qa0-f51.google.com) (209.85.216.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 05 Mar 2014 17:34:03 +0000 Received: by mail-qa0-f51.google.com with SMTP id cm18so1301477qab.10 for ; Wed, 05 Mar 2014 09:34:01 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.140.88.212 with SMTP id t78mr7943708qgd.47.1394040841159; Wed, 05 Mar 2014 09:34:01 -0800 (PST) Received: by 10.140.28.137 with HTTP; Wed, 5 Mar 2014 09:34:01 -0800 (PST) Date: Wed, 05 Mar 2014 19:04:00 -0000 Message-ID: Subject: RECORD_TYPE with 1 field From: Philip Herron To: GCC Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-03/txt/msg00018.txt.bz2 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> 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