1// RUN: %Slang %s 2// RUN: %rs-filecheck-wrapper %s 3 4#pragma version(1) 5#pragma rs java_package_name(ref_count2) 6 7// CHECK: %[[RETVAL:[A-Za-z][A-Za-z0-9]*]] = call i32 @_Z18rsGetElementAt_int13rs_allocationj{{.*}} 8// CHECK: call void @_Z13rsClearObjectP13rs_allocation(%struct.rs_allocation{{.*}}* {{.*}}) 9// CHECK: ret i32 %[[RETVAL]] 10static int goo(rs_allocation a) { 11 return rsGetElementAt_int(a, 0); 12} 13 14void entrypoint() { 15 rs_allocation a = rsCreateAllocation_int(100); 16 rsDebug("val at 0:", goo(a)); 17} 18