[LLVMbugs] [Bug 12649] New: bools in vector_size attribute causes crash

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Apr 24 20:47:53 PDT 2012


             Bug #: 12649
           Summary: bools in vector_size attribute causes crash
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: sf_knue at web.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 8445
  --> http://llvm.org/bugs/attachment.cgi?id=8445
prohibits bools as gcc-vectors


I've already posted this to cfe-commit. I don't know whether you prefer patches
here or via the mailing list.

this simple program currently causes a crash:

typedef bool  bxmm __attribute__ ((vector_size(16)));
typedef float fxmm __attribute__ ((vector_size(16)));

bxmm f(fxmm a, fxmm b) {
    return a < b;

The reason for this is that actually bools are not allowed to be declared as
gcc-vectors. (At least gcc does not allow this).
The attached patch fixes this issue by emitting an error message when using
bools in gcc-vectors.

This was tested on current trunk. I guess that current 3.1 branch has the same
problem but I haven't looked into it or tried it.

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