aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Yong <10walls@gmail.com>2023-02-14 10:29:05 +0000
committerJonathan Yong <10walls@gmail.com>2023-03-12 01:56:17 +0000
commit1dced4352664523821643fbc074648663db2a152 (patch)
tree86f85340694c68170a7d88ae5647c357b5eba4d1 /gcc
parent9f3214a5b6298e0e5f1fcf19afb3daa3e54aec39 (diff)
downloadgcc-1dced4352664523821643fbc074648663db2a152.zip
gcc-1dced4352664523821643fbc074648663db2a152.tar.gz
gcc-1dced4352664523821643fbc074648663db2a152.tar.bz2
gcc/testsuite/gcc.dg: Fix LLP64 targets
gcc/testsuite/ChangeLog: * gcc.dg/builtins-69.c: Use (long )*regex pattern to allow long long instead of just long. * gcc.dg/pr80163.c: Use __INTPTR_TYPE__ for LLP64 tagets. Signed-off-by: Jonathan Yong <10walls@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/builtins-69.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr80163.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/builtins-69.c b/gcc/testsuite/gcc.dg/builtins-69.c
index 26dfb3b..b754b5d 100644
--- a/gcc/testsuite/gcc.dg/builtins-69.c
+++ b/gcc/testsuite/gcc.dg/builtins-69.c
@@ -14,7 +14,7 @@ int test_index (void)
/* PR middle-end/86202 - ICE in get_range_info calling an invalid memcpy()
declaration */
-void *memcpy (void *, void *, __SIZE_TYPE__ *); /* { dg-warning "conflicting types for built-in function .memcpy.; expected .void \\\*\\\(void \\\*, const void \\\*, \(long \)?unsigned int\\\)." } */
+void *memcpy (void *, void *, __SIZE_TYPE__ *); /* { dg-warning "conflicting types for built-in function .memcpy.; expected .void \\\*\\\(void \\\*, const void \\\*, \(long \)*unsigned int\\\)." } */
void test_memcpy (void *p, void *q, __SIZE_TYPE__ *r)
{
diff --git a/gcc/testsuite/gcc.dg/pr80163.c b/gcc/testsuite/gcc.dg/pr80163.c
index 37a7abd..f65955c 100644
--- a/gcc/testsuite/gcc.dg/pr80163.c
+++ b/gcc/testsuite/gcc.dg/pr80163.c
@@ -2,6 +2,7 @@
/* { dg-do compile { target int128 } } */
/* { dg-options "-O0" } */
+typedef __INTPTR_TYPE__ intptr_t;
void bar (void);
__int128_t *
@@ -10,7 +11,7 @@ foo (void)
a:
bar ();
b:;
- static __int128_t d = (long) &&a - (long) &&b; /* { dg-error "initializer element is not computable at load time" } */
+ static __int128_t d = (intptr_t) &&a - (intptr_t) &&b; /* { dg-error "initializer element is not computable at load time" } */
return &d;
}