<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "Trying to aggregate-copy a type without a trivial copy/move " "constructor or assignment operator" fails on arc code"
   href="https://bugs.llvm.org/show_bug.cgi?id=45997">45997</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"Trying to aggregate-copy a type without a trivial copy/move " "constructor or assignment operator" fails on arc code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>thakis@thakis:~/src/llvm-project$ cat invalid_url_tab_helper-108cf6.reduced.mm 
@class a;
struct d { a *e; };
struct l {
  virtual d g();
};
struct i {
  virtual ~i();
};
class k : i, l {
  d g();
};
d k::g() {}
thakis@thakis:~/src/llvm-project$ out/gn/bin/clang -cc1 -triple
arm64-apple-ios12.0.0 -fobjc-arc -emit-llvm
invalid_url_tab_helper-108cf6.reduced.mm
invalid_url_tab_helper-108cf6.reduced.mm:12:11: warning: non-void function does
not return a value [-Wreturn-type]
d k::g() {}
          ^
clang: ../../clang/lib/CodeGen/CGExprAgg.cpp:1943: void
clang::CodeGen::CodeGenFunction::EmitAggregateCopy(clang::CodeGen::LValue,
clang::CodeGen::LValue, clang::QualType, AggValueSlot::Overlap_t, bool):
Assertion `(Record->hasTrivialCopyConstructor() ||
Record->hasTrivialCopyAssignment() || Record->hasTrivialMoveConstructor() ||
Record->hasTrivialMoveAssignment() || Record->isUnion()) && "Trying to
aggregate-copy a type without a trivial copy/move " "constructor or assignment
operator"' failed.
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: out/gn/bin/clang -cc1 -triple arm64-apple-ios12.0.0
-fobjc-arc -emit-llvm invalid_url_tab_helper-108cf6.reduced.mm 
1.      <eof> parser at end of file
2.      invalid_url_tab_helper-108cf6.reduced.mm:12:6: LLVM IR generation of
declaration 'k::g'
3.      invalid_url_tab_helper-108cf6.reduced.mm:12:6: Generating code for
declaration 'k::g'
 #0 0x0000000002f8311d PrintStackTraceSignalHandler(void*)
(out/gn/bin/clang+0x2f8311d)
 #1 0x0000000002f80ede llvm::sys::RunSignalHandlers()
(out/gn/bin/clang+0x2f80ede)
 #2 0x0000000002f832d5 SignalHandler(int) (out/gn/bin/clang+0x2f832d5)
 #3 0x00007fef6e097520 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x13520)
 #4 0x00007fef6dbb3f61 raise
/build/glibc-oCLvUT/glibc-2.29/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #5 0x00007fef6db9f535 abort /build/glibc-oCLvUT/glibc-2.29/stdlib/abort.c:81:7
 #6 0x00007fef6db9f40f _nl_load_domain
/build/glibc-oCLvUT/glibc-2.29/intl/loadmsgcat.c:1177:9
 #7 0x00007fef6dbacb92 (/lib/x86_64-linux-gnu/libc.so.6+0x32b92)
 #8 0x00000000021a1df9 (out/gn/bin/clang+0x21a1df9)
 #9 0x000000000210a509
clang::CodeGen::CodeGenFunction::EmitReturnOfRValue(clang::CodeGen::RValue,
clang::QualType) (out/gn/bin/clang+0x210a509)
#10 0x00000000020f9970
clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(llvm::FunctionCallee,
clang::ThunkInfo const*, bool) (out/gn/bin/clang+0x20f9970)
#11 0x00000000020fa20f
clang::CodeGen::CodeGenFunction::generateThunk(llvm::Function*,
clang::CodeGen::CGFunctionInfo const&, clang::GlobalDecl, clang::ThunkInfo
const&, bool) (out/gn/bin/clang+0x20fa20f)
#12 0x00000000020fa7c1
clang::CodeGen::CodeGenVTables::maybeEmitThunk(clang::GlobalDecl,
clang::ThunkInfo const&, bool) (out/gn/bin/clang+0x20fa7c1)
#13 0x00000000020fab74
clang::CodeGen::CodeGenVTables::EmitThunks(clang::GlobalDecl)
(out/gn/bin/clang+0x20fab74)
#14 0x0000000002071562
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (out/gn/bin/clang+0x2071562)
#15 0x000000000207bd5b
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
(out/gn/bin/clang+0x207bd5b)
#16 0x000000000266c69f (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(out/gn/bin/clang+0x266c69f)
#17 0x000000000266acbd
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(out/gn/bin/clang+0x266acbd)
#18 0x0000000003c7b685 clang::ParseAST(clang::Sema&, bool, bool)
(out/gn/bin/clang+0x3c7b685)
#19 0x00000000025c02f0 clang::FrontendAction::Execute()
(out/gn/bin/clang+0x25c02f0)
#20 0x0000000002521b62
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(out/gn/bin/clang+0x2521b62)
#21 0x00000000026651b1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(out/gn/bin/clang+0x26651b1)
#22 0x0000000001f85beb cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (out/gn/bin/clang+0x1f85beb)
#23 0x0000000001f937d8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(out/gn/bin/clang+0x1f937d8)
#24 0x0000000001f9358d main (out/gn/bin/clang+0x1f9358d)




Happens with today's clang, but also happens with clangs from a few weeks ago.
Looks like this code hasn't been touched in a while.


We see this in chromium (<a href="https://crbug.com/1084623">https://crbug.com/1084623</a>), but it doesn't look like a
new regression in clang.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>