Issue |
89474
|
Summary |
[clang] `error: alias must point to a defined variable or function` false negative when optimizations are enabled
|
Labels |
clang:diagnostics
|
Assignees |
|
Reporter |
nickdesaulniers
|
https://godbolt.org/z/TrGeazYc5
```c
extern inline __attribute__((gnu_inline))
void bar (void) {}
void foo [[gnu::alias("_Z3barv")]] (void);
void foo2 (void) __attribute__((alias("_Z3barv")));
void foo3 (void) asm("_Z3barv");
```
```
<source>:4:12: error: alias must point to a defined variable or function
4 | void foo [[gnu::alias("_Z3barv")]] (void);
| ^
<source>:4:12: note: the function or variable specified in an alias must refer to its mangled name
<source>:5:33: error: alias must point to a defined variable or function
5 | void foo2 (void) __attribute__((alias("_Z3barv")));
| ^
<source>:5:33: note: the function or variable specified in an alias must refer to its mangled name
```
via #60481
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs