[cfe-commits] [PATCH] bools in vector_size attribute causes crash
Roland Leißa
leissa at cs.uni-saarland.de
Thu May 3 15:33:02 PDT 2012
fixed in this version of the patch.
--
Roland
----- Original Message -----
> From: "Douglas Gregor" <dgregor at apple.com>
> To: "Roland Leißa" <leissa at cs.uni-saarland.de>
> Cc: cfe-commits at cs.uiuc.edu
> Sent: Montag, 30. April 2012 16:57:54
> Subject: Re: [cfe-commits] bools in vector_size attribute causes crash
>
>
> On Apr 25, 2012, at 7:46 PM, Roland Leißa <leissa at cs.uni-saarland.de>
> wrote:
>
> > my old patch seemed to have a problem. Now I'm doing the check
> > differently.
> >
> > Is the test case OK like this?
>
> @@ -107,6 +109,7 @@ const int test17_n = 0;
> const char test17_c[] = {1, 2, 3, 0};
> const char test17_d[] = {1, 2, 3, 4};
> typedef int __attribute__((vector_size(16))) IntVector;
> +typedef bool __attribute__((vector_size(16))) BoolVector; //
> expected-error
>
> How about just using _Bool here, so we don't have to #include
> <stdbool.h>?
>
> - Doug
>
> > --
> > Roland
> >
> > ----- Original Message -----
> >> From: "Chandler Carruth" <chandlerc at google.com>
> >> To: "Roland Leißa" <leissa at cs.uni-saarland.de>
> >> Cc: cfe-commits at cs.uiuc.edu
> >> Sent: Mittwoch, 25. April 2012 19:03:09
> >> Subject: Re: [cfe-commits] bools in vector_size attribute causes
> >> crash
> >>
> >>
> >>
> >> On Tue, Apr 24, 2012 at 5:38 PM, Roland Leißa <
> >> leissa at cs.uni-saarland.de > wrote:
> >>
> >>
> >> 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.
> >>
> >>
> >>
> >> Test case as well please.
> > <vector_size_bool_patch.diff>_______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vector_size_bool_patch.diff
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120504/321a1be3/attachment.bin>
More information about the cfe-commits
mailing list