Skip to content
Snippets Groups Projects
Commit 0af861c4 authored by Chris Lattner's avatar Chris Lattner
Browse files

add a testcase for a bug Duncan pointed out.

llvm-svn: 46372
parent fda82097
No related branches found
No related tags found
No related merge requests found
// 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]; }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment