| Issue |
169678
|
| Summary |
z80-clang 15.0.7 fatal error on godbolt.org
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
Wonixen
|
this small program:
class Resource
{
public:
int* data{};
void work();
Resource(){};
// User-declared destructor triggers the warning under -Wdeprecated-copy
~Resource() {
delete data;
}
// No user-declared Copy Constructor or Copy Assignment Operator
// Clang implicitly generates these, which is deprecated here.
};
void create_copy() {
Resource r1;
// Warning: Call to implicitly-deleted copy constructor
Resource r2 = r1;
r2.work();
}
using: -std=c++11 -v
if I remove:
r2.work();
it compile
here is the error and the stack dump from godbolt.org
clang version 15.0.7 (https://github.com/CE-Programming/llvm-project a758f2e91b756054c94e4240e81d4088628891e8)
Target: z80
Thread model: posix
InstalledDir: /opt/compiler-explorer/z80-clang-15.0.7/bin
(in-process)
"/opt/compiler-explorer/z80-clang-15.0.7/bin/clang" -cc1 -triple z80 -S -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name example.cpp -mrelocation-model static -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -fno-verbose-asm -no-integrated-as -mconstructor-aliases -target-cpu z80 -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fno-dwarf-directory-asm -v -fcoverage-compilation-dir=/app -nostdsysteminc -nobuiltininc -resource-dir /opt/compiler-explorer/z80-clang-15.0.7/lib/clang/15.0.7 -std=c++11 -fdeprecated-macro -fdebug-compilation-dir=/app -ferror-limit 19 -fgnuc-version=4.2.1 -fno-threadsafe-statics -fcxx-exceptions -fexceptions -fcolor-diagnostics -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /app/output.s -x c++ <source>
clang -cc1 version 15.0.7 based upon LLVM 15.0.7 default target x86_64-unknown-linux-gnu
#include "..." search starts here:
End of search list.
fatal error: error in backend: unable to legalize instruction: G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.eh.sjlj.functioncontext), %0:r16(p0) (in function: _Z11create_copyv)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/z80-clang-15.0.7/bin/clang++ -g -o /app/output.s -fno-verbose-asm -S -target z80 -g0 -nostdinc -fno-threadsafe-statics -fcolor-diagnostics -fno-crash-diagnostics -std=c++11 -v <source>
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module '<source>'.
4. Running pass 'Legalizer' on function '@_Z11create_copyv'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x23)[0x5d97c23fbaf3]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x5d97c23f9a9e]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0x191253a)[0x5d97c237e53a]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0x19124db)[0x5d97c237e4db]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm3sys7Process4ExitEib+0x27)[0x5d97c23f63e7]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0xc37bb2)[0x5d97c16a3bb2]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x11b)[0x5d97c238209b]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0x25a9d34)[0x5d97c3015d34]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm18reportGISelFailureERNS_15MachineFunctionERKNS_16TargetPassConfigERNS_32MachineOptimizationRemarkEmitterEPKcNS_9StringRefERKNS_12MachineInstrE+0x318)[0x5d97c3016078]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm9Legalizer20runOnMachineFunctionERNS_15MachineFunctionE+0x37b)[0x5d97c2fc29bb]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm19MachineFunctionPass13runOnFunctionERNS_8FunctionE+0x1ed)[0x5d97c1a2369d]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x38d)[0x5d97c1dcc28d]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x33)[0x5d97c1dd3513]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x930)[0x5d97c1dcce30]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsEN4llvm9StringRefEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISK_EE+0x1b21)[0x5d97c2686931]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0x27f7c43)[0x5d97c3263c43]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN5clang8ParseASTERNS_4SemaEbb+0x321)[0x5d97c3dfa611]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN5clang14FrontendAction7ExecuteEv+0x59)[0x5d97c2cd4c29]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x326)[0x5d97c2c4a456]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x27b)[0x5d97c2d8aa1b]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x9a8)[0x5d97c16a3698]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0xc3585b)[0x5d97c16a185b]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(+0x2069c32)[0x5d97c2ad5c32]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xdd)[0x5d97c237e4bd]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x135)[0x5d97c2ad5795]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_b+0x42d)[0x5d97c2a9e5bd]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEEb+0x8e)[0x5d97c2a9e7fe]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x380)[0x5d97c2ab90d0]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_Z10clang_mainiPPc+0x28d9)[0x5d97c16a0f99]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x713ad5a29d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x713ad5a29e40]
/opt/compiler-explorer/z80-clang-15.0.7/bin/clang++(_start+0x25)[0x5d97c169e3c5]
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Compiler returned: 70
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs