From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100758 invoked by alias); 6 Jul 2015 21:40:28 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 100744 invoked by uid 89); 6 Jul 2015 21:40:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.7 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mail-yk0-f171.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=e7ptUYR61fIpSickacRipGyUwaxEfCoeZ9CGWAv846I=; b=NN4EuXjqFu6qJMbZtocRtbJV8yGAnLvc8jvTQ5ElKhMvyINhHNL1mrXUNtE9oJv1Gl 4E6F6bs10eYVQAEUpDIWohnALz4wZPeVm+xxVio1NKCCZBK4OYAHWOVkuwRoa99RHWog RAjRqU7mPh7nx03IVkA9tv4JVNxEDqAdIc84qi4laiIAwUF7cHj1KgWF/iAdZXPXsuxu w73zVQ71BKqNrurEi8799QdRj73Kg169UKAEoFSIRIbkFXy8U3hIBoaoMV6ITR9A3nxn ATnTeY0X2NkppZbrTW29Tf6hzmL7rQrEoiBrfvGxnctQbeR/jwd/ZNqsqf1EnrpqWQDU 9i+A== X-Gm-Message-State: ALoCoQlSOAfrMeEp6wqV+RQrKIAGaNk6KMDtmADvDuCycEheNhKQsazZjJYdnjBgjuzKtRDT2W1f MIME-Version: 1.0 X-Received: by 10.129.103.84 with SMTP id b81mr1045694ywc.55.1436218824002; Mon, 06 Jul 2015 14:40:24 -0700 (PDT) In-Reply-To: References: <1436046085.24803.35.camel@surprise> Date: Thu, 01 Jan 2015 00:00:00 -0000 Message-ID: Subject: Re: A possible code generation issue From: Dibyendu Majumdar To: David Malcolm Cc: jit@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-q3/txt/msg00022.txt.bz2 On 6 July 2015 at 22:29, Dibyendu Majumdar wrote: > BTW the dump of types is problematic in many ways: > 1) types are in wrong order > 2) function types are incorrectly output > 3) array types are incorrectly output > 4) in one case as least a pointer was missing. Apologies the last point (4) was actually due to a bug in my code - but here is what happened. t->lua_longjumpT = gcc_jit_context_new_opaque_struct(ravi->context, NULL, "ravi_lua_longjmp"); t->plua_longjumpT = gcc_jit_struct_as_type(t->lua_longjumpT); The plua_longjmpT was meant to be a pointer to the struct. Surprisingly I was able to use the incomplete type in another struct! I think this just goes to show that you need to have some form of run-time type assertion to detect such issues. Regards Dibyendu