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

            Bug ID: 21220
           Summary: Clang generates broken module, "Instruction does not
                    dominate all uses!"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

$ cat t.cpp
struct s {
  char c[33];
};
struct t {
  t(const s &);
};
extern int a;
void fn1() {
  switch (a) {
  case 0:
    *new t(s());
  case 1:
    (t(s()));
  }
}

$ ~/llvm/Debug+Asserts/bin/clang -cc1 -x c++ t.cpp -o - -emit-llvm -O1
-fexceptions
t.cpp:11:5: warning: expression result unused
    *new t(s());
    ^~~~~~~~~~~
Instruction does not dominate all uses!
  %call = call noalias i8* @_Znwm(i64 1) #4
  call void @_ZdlPv(i8* %call) #5
fatal error: error in backend: Broken function found, compilation aborted!

-- 
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