https://llvm.org/bugs/show_bug.cgi?id=25533
Bug ID: 25533 Summary: clang-cl producing crashing executable due to exception handling Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: ism...@i10z.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Using clang r253159, the code itself does not use exception handling itself: #include <cmath> #include <iostream> using namespace std; unsigned int f2(double x) { double result = 0.0133333 * pow(x, 3) - 0.8 * pow(x, 2) + 21.6667 * x + 90; return static_cast<unsigned int>(result); } int main() { double input; while (1) { cout << "Enter a value: "; cin >> input; cout << "Calculated: " << f2(input) << endl; } return 0; } λ clang-cl /EHsc -fmsc-version=19 test.cpp λ ./test.exe zsh: segmentation fault ./test.exe Remove /EHsc and its fine: λ clang-cl -fmsc-version=19 test.cpp λ ./test.exe Enter a value: ^C Using VS2015 on Win10 x64. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs