From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63571 invoked by alias); 11 Aug 2015 20:45:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 63550 invoked by uid 48); 11 Aug 2015 20:45:17 -0000 From: "arch.robison at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/60586] [Cilk+] Parameters evaluation happens inside spawn worker Date: Tue, 11 Aug 2015 20:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arch.robison at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg00730.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60586 Arch D. Robison changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arch.robison at hotmail dot com --- Comment #1 from Arch D. Robison --- Created attachment 36171 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36171&action=edit Another demonstration of the bug Unpack and run "make" to build and run it. Requires routine "usleep" from . When compiled correctly, it should run without comment. Otherwise, as with gcc 5.2.0, it will report errors. E.g., here is a sample session: $ make g++ -O0 -std=c++11 -fcilkplus harness.cpp -c g++ -O0 -std=c++11 -fcilkplus test.cpp -c g++ -O0 -std=c++11 -fcilkplus harness.o test.o ./a.out ERROR: f.val=3, should be 2 ERROR: f.val=6, should be 3 make: *** [all] Aborted