[LLVMbugs] [Bug 13767] New: Assertion "castIsValid(op, S, Ty) && "Invalid cast!" on invalid (implicit) vector cast

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 4 14:01:25 PDT 2012


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

             Bug #: 13767
           Summary: Assertion "castIsValid(op, S, Ty) && "Invalid cast!"
                    on invalid (implicit) vector cast
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: paul.robinson at am.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9156
  --> http://llvm.org/bugs/attachment.cgi?id=9156
crash log

I'm seeing an assertion instead of a diagnostic in cases where there's an
implicit cast between vector types of different sizes.
And one case I thought should fail actually compiles cleanly.

// ----- snip -----
typedef float float3 __attribute__((__vector_size__(12)));
typedef float float4 __attribute__((__vector_size__(16)));
float4 v = (float3){1,2,3}; // this is accepted
float3 foo() {
  float4 f;
  return f; // this causes an assertion
}
float4 bar() {
  float4 b = (float3){1,2,3}; // this causes an assertion
  return b;
}
// ----- snip -----

Attaching the crash log.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list