mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-17 03:07:06 +00:00
13 lines
194 B
C
13 lines
194 B
C
|
// RUN: %llvmgcc -S %s -O1 -o - | grep {ret.*123}
|
||
|
// Check for bug compatibility with gcc.
|
||
|
|
||
|
const int x __attribute((weak)) = 123;
|
||
|
|
||
|
int* f(void) {
|
||
|
return &x;
|
||
|
}
|
||
|
|
||
|
int g(void) {
|
||
|
return *f();
|
||
|
}
|