mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
1f0315462b
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46451 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
345 B
C
20 lines
345 B
C
// RUN: %llvmgcc %s -S -O1 -o - | llvm-as | opt -std-compile-opts | llvm-dis | not grep add
|
|
|
|
struct S { int A; int B; char C[1000]; };
|
|
|
|
int f(struct S x) __attribute__ ((const));
|
|
|
|
static int __attribute__ ((const)) g(struct S x) {
|
|
x.A = x.B;
|
|
return f(x);
|
|
}
|
|
|
|
int h(void) {
|
|
struct S x;
|
|
int r;
|
|
x.A = 0;
|
|
x.B = 9;
|
|
r = g(x);
|
|
return r + x.A;
|
|
}
|