mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
c2df169459
llvm-svn: 46372
11 lines
392 B
C
11 lines
392 B
C
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep readonly
|
|
// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | not grep readnone
|
|
|
|
|
|
// The struct being passed byval means that we need to mark the
|
|
// function readonly instead of readnone. Readnone would allow
|
|
// stores to the arg to be deleted in the caller.
|
|
struct S { int A[1000]; };
|
|
int __attribute__ ((const)) f(struct S x) { return x.A[0]; }
|
|
|