aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/inline-16.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@gcc.gnu.org>2006-11-24 02:46:33 +0000
committerEric Christopher <echristo@gcc.gnu.org>2006-11-24 02:46:33 +0000
commit08cdc89a543fae43d97ebf23169a71b4873a6f2a (patch)
treed95326e8b2047cc9b71c3df9c9a560097a1a3afe /gcc/testsuite/gcc.dg/inline-16.c
parent422c3a54ea4ba93eb21c1a6c72c42bd804665646 (diff)
downloadgcc-08cdc89a543fae43d97ebf23169a71b4873a6f2a.zip
gcc-08cdc89a543fae43d97ebf23169a71b4873a6f2a.tar.gz
gcc-08cdc89a543fae43d97ebf23169a71b4873a6f2a.tar.bz2
inline-16.c: Use __SIZE_TYPE__.
2006-11-23 Eric Christopher <echristo@apple.com> * gcc.dg/inline-16.c: Use __SIZE_TYPE__. From-SVN: r119144
Diffstat (limited to 'gcc/testsuite/gcc.dg/inline-16.c')
-rw-r--r--gcc/testsuite/gcc.dg/inline-16.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.dg/inline-16.c b/gcc/testsuite/gcc.dg/inline-16.c
index 02aa1bf..4f9fe97 100644
--- a/gcc/testsuite/gcc.dg/inline-16.c
+++ b/gcc/testsuite/gcc.dg/inline-16.c
@@ -1,21 +1,22 @@
/* { dg-do link } */
/* { dg-options "-std=c99" } */
-static inline int
-func1(const volatile void * base, int byteOffset)
+static inline __SIZE_TYPE__
+func1(const volatile void * base, __SIZE_TYPE__ byteOffset)
{
- volatile int *addr = (volatile int *)((int)base + byteOffset);
+ volatile __SIZE_TYPE__ *addr
+ = (volatile __SIZE_TYPE__ *)((__SIZE_TYPE__)base + byteOffset);
return *addr;
}
-static inline int
-func2(int data)
+static inline __SIZE_TYPE__
+func2(__SIZE_TYPE__ data)
{
return func1(&data, 0);
}
int main(int argc, char *argv[]) {
- int b = func2(argc);
+ __SIZE_TYPE__ b = func2(argc);
return 0;
}