Aadarsh-Keshri wrote:

An interesting thing I found while compiling the test cases:
While this test case gives `Assertion `DestTy->isFloatingType() && "unexpected 
type"'` failure (https://godbolt.org/z/rorY1E5To) :
`void *bad_ptr = (int*[]){
#embed __FILE__ 
};`

The compound_float test case gives `Assertion `isa<To>(Val) && "cast<Ty>() 
argument of incompatible type!"'` failure (https://godbolt.org/z/9K6r4s4GG):
`void *complexfloat = (_Complex float[]){
#embed __FILE__
};`

And there are no assertion failures in case of struct, enum or local variable 
test cases (https://godbolt.org/z/43exhaK7d):
`struct S { int x; };
struct S *bad_struct = (struct S[5]){ 
#embed __FILE__
};

enum E { A };
enum E *bad_enum = (enum E[5]){
#embed __FILE__
};

void f(void) {
  void *bad_ptr=(int*[]){
    #embed __FILE__
  }
}`

https://github.com/llvm/llvm-project/pull/182257
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to