From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40471 invoked by alias); 4 Apr 2019 08:43:32 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 40463 invoked by uid 89); 4 Apr 2019 08:43:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.1 spammy=c-attribs.c, UD:c-attribs.c, cattribsc X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Apr 2019 08:43:30 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 98C52AE7D; Thu, 4 Apr 2019 08:43:28 +0000 (UTC) Subject: Re: GCC GSOC 2019 To: Martin Jambor , Shubham Narlawar , gcc@gcc.gnu.org References: From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: Date: Thu, 04 Apr 2019 08:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00051.txt.bz2 On 4/3/19 6:31 PM, Martin Jambor wrote: > Hello Shubham, > > On Fri, Mar 29 2019, Shubham Narlawar wrote: >> Hi, here is my proposal for the above idea. Please review and suggest >> necessary changes. >> >> https://docs.google.com/document/d/11MNhuuD7dbwAfSW6ZgFrAys9My1Lw1PuMVcAqeNGr7A/edit?usp=sharing > > I have had a quick look and the proposal seems very nice. > > How did you select the attributes you want to implement in csmith? It > is for example a little strange that you decided to include "pure" but > not "const." If you handle visibility, you might as well consider > throwing in externally_visible too, I guess. As a stretch goal, the > alias function attribute might be useful to exercise nasty paths in GCC > IPA optimizations. > > I assume Andi Kleen has seen this proposal and if he is fine with it, so > am I. > > Thanks, > > Martin > Hi. Just for the record, Martin Jambor asked me to co-mentor during time period when Andi will be on vacation (if I'm correct). I have couple of questions/ideas about the proposal: 1) I would not spend much time with nested functions, it's quite legacy C extension 2) for functions, I would basically include add potential attribute: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes see: gcc/c-family/c-attribs.c:242 const struct attribute_spec c_common_attribute_table[] = ... 3) similarly for variables: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#Common-Variable-Attributes 4) and similarly for types https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#Common-Type-Attributes 5) One big question about csmith I have. It's quite easy to come up with a test-case which causes an ICE. But it's more difficult to come up with a test-case that is miscompiled by a compiler. It's mainly due to an invalid behavior in the generated test-case. One can theoretically catch that with sanitizers (ASAN, UBSAN, ...). But still, it's not easy. Are you considering catching wrong-code issue? Thanks, Martin