-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang compiler crash when using -flto #350
Comments
Thanks for the report! @pirama-arumuga-nainar: Is this fixed in the update? |
@mad-rain Can you share repro steps? |
@pirama-arumuga-nainar steps to reproduce:
Then you should see clang crash:
|
Any comments? |
@mad-rain Sorry I didn't have a chance to look into this yet. I primarily work on the Android platform so I don't have Android Studio or Gradle set up. Would it be possible to just share the compile and link commands? |
@pirama-arumuga-nainar, no problem. native-lib.cpp:
Compile:
Link (should crash):
Please replace /android/sdk/ndk-bundle with your NDK location. |
I was able to reproduce in the clang in the beta. The stack trace for crash inside libLLVMGold.so is below. It crashes in the loop vectorizer. Good news is that it doesn't reproduce in the next clang that will be in r15. I'll look for an upstream change that may have fixed it. Stack trace on old clang: |
Description
We have tried to enable LTO, but got compiler crash during linking phase. Here is what we see in gdb:
We had replaced '-Os' with '-O2' due to this bug: 'fatal error: Optimization level must be between 0 and 3'
Environment Details
The text was updated successfully, but these errors were encountered: