| Issue |
83243
|
| Summary |
Incorrect diagnostic message for global named register variable
|
| Labels |
clang:frontend
|
| Assignees |
|
| Reporter |
arakawamasahiro-fj
|
An error occurs if the asm register is specified when declaring a real floating-point type register variable.
(Error occurs regardless of architecture, but register names are architecture-dependent)
Do not throw an error if the register variable type is an integer or a pointer.
gcc produces no errors and compiles normally.
[clang version information]
```
clang version 19.0.0git (https://github.com/llvm/llvm-project.git dd7386d85f11cf6ad911b9827c7018fb08c6c205)
Target: aarch64-unknown-linux-gnu
```
[Sample Plogram for AArch64]
```
register double d1 __asm__ ("d0");
```
// Register "d0" in AArch64 is a floating-point register.
[Diagnostic Messages in an AArch64 Environment]
```
$ clang test.c
test.c:1:1: error: bad type for named register variable
1 | register double d1 __asm__ ("d0");
| ^
1 error generated.
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs