]>
Commit | Line | Data |
---|---|---|
2b8b9f74 BE |
1 | /* Copyright (C) 2009 Free Software Foundation, Inc. |
2 | ||
3 | This file is free software; you can redistribute it and/or modify it under | |
4 | the terms of the GNU General Public License as published by the Free | |
5 | Software Foundation; either version 3 of the License, or (at your option) | |
6 | any later version. | |
7 | ||
8 | This file is distributed in the hope that it will be useful, but WITHOUT | |
9 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
10 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
11 | for more details. | |
12 | ||
13 | You should have received a copy of the GNU General Public License | |
14 | along with this file; see the file COPYING3. If not see | |
15 | <http://www.gnu.org/licenses/>. */ | |
16 | ||
17 | /* { dg-do run } */ | |
18 | ||
19 | extern void abort (void); | |
20 | extern unsigned long long __ea_local_store; | |
21 | ||
22 | __ea int *ppu; | |
23 | int x, *spu = &x, *spu2; | |
24 | ||
25 | int | |
26 | main (int argc, char **argv) | |
27 | { | |
28 | ppu = (__ea int *) spu; | |
29 | spu2 = (int *) ppu; | |
30 | ||
31 | #ifdef __EA32__ | |
32 | if ((int) ppu != (int) __ea_local_store + (int) spu) | |
33 | #else | |
34 | if ((unsigned long long) ppu != __ea_local_store + (unsigned long long)(int) spu) | |
35 | #endif | |
36 | ||
37 | abort (); | |
38 | ||
39 | if (spu != spu2) | |
40 | abort (); | |
41 | ||
42 | return 0; | |
43 | } |