struct_array_copy.rs revision 2bb67db8364162b30e6920baddf6c2e890b3ce79
1// Copyright (C) 2011 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma version(1)
16#pragma rs java_package_name(foo)
17
18struct myStruct {
19    rs_allocation a;
20    int i;
21    rs_font f[100];
22};
23
24struct myStruct mS;
25
26struct outerStruct {
27    struct myStruct inner;
28};
29
30void bar() {
31    struct myStruct localStruct;
32
33    localStruct.i = 5;
34    mS = localStruct;
35}
36
37int root(int num) {
38    return 10;
39}
40
41