http://llvm.org/bugs/show_bug.cgi?id=21043

            Bug ID: 21043
           Summary: Simple sample is broken after r217874:
                    assert(use_empty() && "Uses remain when a value is
                    destroyed!") in Value.cpp is fired
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Commit http://llvm.org/viewvc/llvm-project?view=revision&revision=217874 make
clang fail on the following sample:

------------------- inc.h ---------------
#pragma once

template <typename FP> struct Struct
{
        Struct() {}
        ~Struct(){}
};

--------- def.cpp -----------------------
#include "inc.h"

template struct Struct<float>;

--------- main.cpp -----------------------
#include "inc.h"

int main(int argc, char *argv[])
{
    Struct<float> dummy;
    return 0;
}


Compile it with: 

./clang++ -O0 -march=core-avx2 -flto -DNDEBUG main.cpp def.cpp


Compiler crahses with: 

While deleting: %struct.Struct.0* %this
Use still stuck around after Def is destroyed:%struct.Struct.0* %this
ld: ~/TRUNK/llvm.vect.clear/llvm/lib/IR/Value.cpp:80: virtual
llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is
destroyed!"' failed.
clang-3.5: error: unable to execute command: Aborted
clang-3.5: error: linker command failed due to signal (use -v to see
invocation)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to