[cfe-commits] bools in vector_size attribute causes crash

Roland Leißa leissa at cs.uni-saarland.de
Tue Apr 24 17:38:53 PDT 2012


Hi all,

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 didn't look it up/tried it.

-- 
Roland

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vector_size_bool_patch.diff
Type: text/x-patch
Size: 608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120425/fb0dc3a4/attachment.bin>


More information about the cfe-commits mailing list