Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

bools in vector_size attribute causes crash #12751

Closed Quuxplusone closed 11 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR12649
Status RESOLVED FIXED
Importance P normal
Reported by Roland Leißa (leissa@cs.uni-saarland.de)
Reported on 2012-04-24 22:47:53 -0700
Last modified on 2013-09-13 15:43:36 -0700
Version trunk
Hardware PC Linux
CC aaron@aaronballman.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments vector_size_bool_patch.diff (608 bytes, text/plain)
vector_size_bool_patch.diff (1378 bytes, text/plain)
vector_size_bool_patch.diff (1152 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 8445
prohibits bools as gcc-vectors

Hi,

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.
Quuxplusone commented 12 years ago

Attached vector_size_bool_patch.diff (608 bytes, text/plain): prohibits bools as gcc-vectors

Quuxplusone commented 12 years ago

Attached vector_size_bool_patch.diff (1378 bytes, text/plain): fixed patch + test case

Quuxplusone commented 12 years ago

Attached vector_size_bool_patch.diff (1152 bytes, text/plain): got rid of '#include '

Quuxplusone commented 11 years ago

Fixed in r190721