macOS (built-in) LLVM/Clang compiler crash with OpenMP

Submitted by Cédric Hubert

Assigned to Nobody

Link to original bugzilla bug (#1734)
Operating system: Mac OS

Description

While trying to take advantage of the Eigen's OpenMP feature in my program, I encounter a crash of the compiler.

Below is my software configuration:
• Eigen: from the development branch, because my program heavily uses the call operator with std::vector<int> arguments for slicing.
• Compiler: Apple LLVM version 10.0.1 (clang-1001.0.46.4)

The -fopenmp flag is passed to the compiler through the -Xclang -fopenmp option, which works fine as long as no Eigen header is included.

When I include an Eigen header, say #include <Eigen/Core>, I get a compiler crash, which is not really explicit (given a the bottom of my message). No need to add any Eigen-related code except the include directive to make the compiler crash.

Note that it does not crash (and works fine when doing some basic GEMM products) using the last stable release of Eigen (3.3.7). That's why I'm filing this bug to the Eigen team, instead (for the moment) of the LLVM/Clang team.

Below is the bug description. It references some files, that I can join but basically correspond to the preprocessed sources.

Thank's in advance,
Cedric

clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:


PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/t0/j2js0fb94qq4n_zt7qyljvtm0000gn/T/main-e29e5c.cpp
clang: note: diagnostic msg: /var/folders/t0/j2js0fb94qq4n_zt7qyljvtm0000gn/T/main-e29e5c.sh
clang: note: diagnostic msg: /var/folders/t0/j2js0fb94qq4n_zt7qyljvtm0000gn/T/main-e29e5c.crash
clang: note: diagnostic msg:


Edited Dec 05, 2019 by Eigen Bugzilla
Assignee Loading
Time tracking Loading