digitalmars.D.learn - LDC Internal Compiler Error (ICE) mentioning attribute 'nocapture'
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (27/27) Mar 30 Does anybody recognize the error
- Basile B. (8/35) Mar 31 You can try to add the flag `--disable-verify` (see
Does anybody recognize the error ``` Attribute 'nocapture' does not apply to function return values %12 = call noalias nocapture align 8 ptr _D3xxx(ptr nonnull Attribute 'nocapture' does not apply to function return values ptr _D3xyz1 Attribute 'nocapture' does not apply to function return values ptr _D3xyz2 Attribute 'nocapture' does not apply to function return values ptr _D3xyz3 Attribute 'nocapture' does not apply to function return values ptr _D3xyz4 Attribute 'nocapture' does not apply to function return values %164 = call noalias nocapture align 8 ptr _D3xyz5(ptr nonnull Attribute 'nocapture' does not apply to function return values %285 = call noalias nocapture align 8 ptr _D3xyz6(ptr nonnull LLVM ERROR: Broken module found, compilation aborted! llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (~/.local/ldc2-1.37.0-beta1-linux-x86_64/bin/ldc2+0x6ad4927) Error ldc2 failed with exit code -6. ``` ? It's outputted when building and running a test application with ldc with the compiler flag `-fsanitize=address`.
Mar 30
On Saturday, 30 March 2024 at 09:35:24 UTC, Per Nordlöw wrote:Does anybody recognize the error ``` Attribute 'nocapture' does not apply to function return values %12 = call noalias nocapture align 8 ptr _D3xxx(ptr nonnull Attribute 'nocapture' does not apply to function return values ptr _D3xyz1 Attribute 'nocapture' does not apply to function return values ptr _D3xyz2 Attribute 'nocapture' does not apply to function return values ptr _D3xyz3 Attribute 'nocapture' does not apply to function return values ptr _D3xyz4 Attribute 'nocapture' does not apply to function return values %164 = call noalias nocapture align 8 ptr _D3xyz5(ptr Attribute 'nocapture' does not apply to function return values %285 = call noalias nocapture align 8 ptr _D3xyz6(ptr LLVM ERROR: Broken module found, compilation aborted! llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (~/.local/ldc2-1.37.0-beta1-linux-x86_64/bin/ldc2+0x6ad4927) Error ldc2 failed with exit code -6. ``` ? It's outputted when building and running a test application with ldc with the compiler flag `-fsanitize=address`.You can try to add the flag `--disable-verify` (see https://github.com/ldc-developers/ldc/issues/4284, that prevents an internal verification). The error message indicates that a "parameter-only" attribute is used as a "call-site" one. Not sure if this is a bug in LDC or in LLVM but if you're lucky the attribute will be a no-op and the generated binary will just work.
Mar 31