Skip to content

ext_vector_type crashes on bool #152954

@4vtomat

Description

@4vtomat

The following code crashed:

$ cat fail.c

#include <stdbool.h>

typedef bool bx16 __attribute__((ext_vector_type(16)));
bx16 test(bx16 a) {
  bx16 ret;
  asm volatile ("vmand.mm %0, %1, %2" : "=vm"(ret) : "vm"(a), "vm"(a));
  return ret;
}

with command

bin/clang -target riscv64 -march=rv64gcv fail.c -S

Note: Only inline assembly with output failed, if removing ret and it won't crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:RISC-Vclang:codegenIR generation bugs: mangling, exceptions, etc.crashPrefer [crash-on-valid] or [crash-on-invalid]inline-asm

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions