Skip to content

printf with floating point arguments using -mno-sse2 flag is crashing #32351

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

Closed
llvmbot opened this issue May 11, 2017 · 4 comments
Closed

printf with floating point arguments using -mno-sse2 flag is crashing #32351

llvmbot opened this issue May 11, 2017 · 4 comments
Labels
backend:X86 bugzilla Issues migrated from bugzilla crash Prefer [crash-on-valid] or [crash-on-invalid] duplicate Resolved as duplicate

Comments

@llvmbot
Copy link
Member

llvmbot commented May 11, 2017

Bugzilla Link 33004
Version unspecified
OS Linux
Reporter LLVM Bugzilla Contributor
CC @rnk,@rotateright,@ZviRackover

Extended Description

clang crashes while compiling with the flag -mno-sse2 on linux the following code:

#include <stdio.h> 
int main()
{
    printf("%f", 2.0);
    return 0;
}

clang -mno-sse2 test.c

output:
clang-4.0: /export/iusers/ziv/llvm2/llvm/lib/Target/X86/X86FloatingPoint.cpp:303: unsigned int getFPReg(const llvm::MachineOperand&): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!"' failed.
and backtrace
@rnk
Copy link
Collaborator

rnk commented May 11, 2017

We shouldn't crash like that, but isn't this another instance of asking for the impossible? Passing floating point in an ABI that can't pass FP values without SSE2?

@rotateright
Copy link
Contributor

Definitely looks like another case of bug 30426 and all of the bugs related there.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@Endilll
Copy link
Contributor

Endilll commented Aug 13, 2023

Duplicate of #29774

@Endilll Endilll marked this as a duplicate of #29774 Aug 13, 2023
@Endilll Endilll closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2023
@Endilll Endilll added duplicate Resolved as duplicate backend:X86 crash Prefer [crash-on-valid] or [crash-on-invalid] labels Aug 13, 2023
@llvmbot
Copy link
Member Author

llvmbot commented Aug 13, 2023

@llvm/issue-subscribers-backend-x86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla crash Prefer [crash-on-valid] or [crash-on-invalid] duplicate Resolved as duplicate
Projects
None yet
Development

No branches or pull requests

4 participants