X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=I+3AZacxSegjibRS GQqyZPjvrs3GnkrEZohDnh5U/Gwnb75guJIJKiG6kUIrxTPjwiCVKm6VMMvmRhWx pbc9ez+JEm42Z3QMo61jfTiYeAPkxhJToE0kegP6i4FDjbDtopp+w1H50E+nUFkx m6mqQnW3vqm4W6lzGKfeEvuAitY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=A+ojNSeOfzHGgIOttm7C12 hvNdQ=; b=EMOH1r789NBwgt+aOKvoLaFLyWqZw3bQMSVZrrKcMJAsg5Ex3tq6bB f+bAdLxuAmJP9D/0qiSjxxpx8ByT/xEkQUKip+HF43GMzUadXEeFyXoRj5bUsu/v nMmi6QxPbpWPxPXAW5kpVV3nOIhWbTHqwFotGuCPCV2JTlFYqVE9I= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:User, H*i:sk:CAFo71_, H*f:sk:CAFo71_ X-HELO: dmz-mailsec-scanner-1.mit.edu Subject: Re: short C code that uses AVX and fails under Cygwin To: cygwin AT cygwin DOT com References: <56980313 DOT 5030205 AT mit DOT edu> From: Ilya Razenshteyn Message-ID: <56980B4F.9090509@mit.edu> Date: Thu, 14 Jan 2016 23:55:43 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Looks like this is indeed what happens! Thanks a lot! Ilya On 1/14/2016 11:49 PM, Ismail Donmez wrote: > Hi, > > On Thu, Jan 14, 2016 at 10:20 PM, Ilya Razenshteyn wrote: >> Hi all, >> >> the below C code fails under Cygwin. More specifically, the environment is: >> Windows 8.1, Cygwin 2.3.1, GCC 4.9.3, CPU 'Intel(R) Core(TM) i7-4510U CPU @ >> 2.00GHz', compilation options are '-O0 -mavx'. Is it indeed a bug in Cygwin >> or I don't understand something? >> >> Cheers, >> Ilya >> >> #include "immintrin.h" >> >> __m256 routine(void) { >> __m256 aux; >> return aux; >> } >> >> int main(void) { >> void *buf = malloc(1); >> __m256 res = routine(); >> return 0; >> } > > I believe this is due to > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412 , > https://stackoverflow.com/questions/5983389/how-to-align-stack-at-32-byte-boundary-in-gcc > has an ugly workaround which might work for you. > > Regards, > ismail > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple