Currency cast to x86_fp80 in LLVM IR when passed as 5th parameter to a function
Error while compiling using LLVM when code contains an object constructor with 5 or more parameters, the 5th or later being of type currency. ## System Information OS tested: Linux, fedora 38 CPU: x86_64, LLVM Compiler: Trunk 2cec31d86f Device: PC ## Steps to reproduce Compile provided source ## Example Project https://gitlab.com/kizz32/llvmccy5ParamTest/-/blob/main/llvmccy5ParamTest.pas IR output is attached to this issue on comment ## What is the current bug behavior? Compilation fails with error, output in relevant log section ## What is the expected (correct) behavior? Compilation success ## Relevant logs and/or screenshots ```Free Pascal Compiler version 3.3.1 [2023/11/02] for x86_64 Copyright (c) 1993-2023 by Florian Klaempfl and others Target OS: Linux for x86-64 Compiling llvmccy5ParamTest.pas Assembling llvmccy5paramtest llvmccy5ParamTest.ll:49:30: error: '%p.P5' defined with type 'i64' but expected 'x86_fp80' %reg.2_9 = fptrunc x86_fp80 %p.P5 to i64 ^ 1 error generated. llvmccy5ParamTest.pas(19,1) Error: Error while assembling exitcode 1 llvmccy5ParamTest.pas(19,1) Fatal: There were 2 errors compiling module, stopping ``` ## Possible fixes <!-- If you can, link to the line of code that might be responsible for the problem -->
issue