1 /* Copyright (C) 2015-2023 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
18 #include "tst-protected1mod.h"
21 static int expected_protected1
= 3;
23 static int expected_protected2
= 4;
25 static int expected_protected3
= 5;
27 asm (".protected protected1");
28 asm (".protected protected2");
29 asm (".protected protected3");
32 set_protected1a (int i
)
35 set_expected_protected1 (i
);
39 set_expected_protected1 (int i
)
41 expected_protected1
= i
;
51 check_protected1 (void)
53 return protected1
== expected_protected1
;
57 set_protected2 (int i
)
60 expected_protected2
= i
;
64 check_protected2 (void)
66 return protected2
== expected_protected2
;
70 set_expected_protected3a (int i
)
72 expected_protected3
= i
;
76 set_protected3a (int i
)
79 set_expected_protected3a (i
);
83 check_protected3a (void)
85 return protected3
== expected_protected3
;