https://bugs.llvm.org/show_bug.cgi?id=45426

            Bug ID: 45426
           Summary: Assertion `getNumOperands() == 2 && "Must be binary
                    operator?"' failed
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangb...@nondot.org
          Reporter: balarishi.bhog...@amd.com
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

The below issue was not seen before October, 2019.

$ cat test.c
int a[], b;
float *c;
int  main() {
        return  -(*c = &b != a);
}

$ clang -c test.c
test.c:1:5: warning: tentative array definition assumed to have one element
int a[], b;
    ^
clang: /home/compiler/llvm-project/llvm/lib/IR/Constants.cpp:1365:
llvm::Constant*
llvm::ConstantExpr::getWithOperands(llvm::ArrayRef<llvm::Constant*>,
llvm::Type*, bool, llvm::Type*) const: Assertion `getNumOperands() == 2 &&
"Must be binary operator?"' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to