New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wnonportable-vector-initialization in crypto/aegis128-neon-inner.c #641
Comments
Does this help?
|
That diff has this error:
This works: diff --git a/crypto/aegis128-neon-inner.c b/crypto/aegis128-neon-inner.c
index ed55568afd1b..236c2e806470 100644
--- a/crypto/aegis128-neon-inner.c
+++ b/crypto/aegis128-neon-inner.c
@@ -55,14 +55,14 @@ uint8x16_t aegis_aes_round(uint8x16_t w)
#ifdef CONFIG_ARM64
if (!__builtin_expect(aegis128_have_aes_insn, 1)) {
- static const uint8x16_t shift_rows = {
+ const uint8x16_t shift_rows = vld1q_u8(((u8 []){
0x0, 0x5, 0xa, 0xf, 0x4, 0x9, 0xe, 0x3,
0x8, 0xd, 0x2, 0x7, 0xc, 0x1, 0x6, 0xb,
- };
- static const uint8x16_t ror32by8 = {
+ }));
+ const uint8x16_t ror32by8 = vld1q_u8(((u8 []){
0x1, 0x2, 0x3, 0x0, 0x5, 0x6, 0x7, 0x4,
0x9, 0xa, 0xb, 0x8, 0xd, 0xe, 0xf, 0xc,
- };
+ }));
uint8x16_t v;
// shift rows |
OK, I have sent another fix here: However, the Clang build error you are getting is an issue that Clang needs to fix: for some reason, they decided to use C preprocessor macros to implement vld1q_u8() et al, but the designated initializer (e.g., '(u8[]){1,2,3}') is valid C syntax, and so the compiler should not choke on it. |
Oh, that's indeed an interesting case. Let me tease out a reproducer more. (C++20 adding support for designated initializers is sure to make this a larger issue at some point). |
Fixed in @nickdesaulniers do you want to leave this open to look at the designated initializer issue or open a new issue for that? |
Leave open; I'll file a bug upstream. |
Filed: https://llvm.org/pr43331 |
The upstream issue cross references this one. If there's any movement there, I'll reopen this one or comment further. |
Pops up in arm64 all{mod,yes}config builds.
Caused by https://git.kernel.org/next/linux-next/c/198429631a85622da1d08d360ef02cfb84c95919
cc @ardbiesheuvel
The text was updated successfully, but these errors were encountered: