https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69503

            Bug ID: 69503
           Summary: SIGFPE raised when mixing std::async with cilk
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vbeffara at gmail dot com
  Target Milestone: ---

Created attachment 37481
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37481&action=edit
source file

On Mac OSX 10.11.3, using gcc5 from homebrew, compile the file at 

https://gist.github.com/vbeffara/747ea55626f975ca9c39

(and attached) without any optimisation, like so:

g++-5 -Wall -std=c++14 -fcilkplus -lcilkrts sample.cpp

then running the generated executable raises SIGFPE. Which it should not,
especially since the code does nothing. Compiling with -O3 runs fine (all the
code is probably removed); compiling with -ffast-math runs fine (other code
path?); compiling with -g runs fine.

Something to do with cilk_for returning in a different thread than it starts,
failing the assumptions of std::async ?

Reply via email to