aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-04-13 11:25:26 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2020-04-13 11:35:28 +0200
commita1ccbae63cdf25b8ff66da18ed0d081cb9411ccf (patch)
tree5c0266feb2fee3b909db9586eebd8bc8a9afc560 /gcc/testsuite/gdc.test
parentaf4c92573dc462a17a6c345756889d28054ed591 (diff)
downloadgcc-a1ccbae63cdf25b8ff66da18ed0d081cb9411ccf.zip
gcc-a1ccbae63cdf25b8ff66da18ed0d081cb9411ccf.tar.gz
gcc-a1ccbae63cdf25b8ff66da18ed0d081cb9411ccf.tar.bz2
d: Merge update dmd 799066f49
Removes the implementation of __traits(argTypes), which only supported x86_64 targets. The only use of this trait is an unused va_arg() function, this has been removed as well. Reviewed-on: https://github.com/dlang/dmd/pull/11022 gcc/d/ChangeLog: 2020-04-13 Iain Buclaw <ibuclaw@gdcproject.org> * Make-lang.in (D_FRONTEND_OBJS): Remove d/argtypes.o. * d-target.cc (Target::toArgTypes): New function. libphobos/ChangeLog: 2020-04-13 Iain Buclaw <ibuclaw@gdcproject.org> * libdruntime/core/stdc/stdarg.d: Remove run-time va_list template.
Diffstat (limited to 'gcc/testsuite/gdc.test')
-rw-r--r--gcc/testsuite/gdc.test/runnable/testargtypes.d113
1 files changed, 0 insertions, 113 deletions
diff --git a/gcc/testsuite/gdc.test/runnable/testargtypes.d b/gcc/testsuite/gdc.test/runnable/testargtypes.d
deleted file mode 100644
index 343a1c8..0000000
--- a/gcc/testsuite/gdc.test/runnable/testargtypes.d
+++ /dev/null
@@ -1,113 +0,0 @@
-
-void chkArgTypes(S, V...)()
-{
- pragma(msg, S);
- static if (is(S U == __argTypes))
- {
- foreach (T; U) { pragma(msg, T); }
- static assert(U.length == V.length);
- foreach (i, T; U)
- static assert(is(V[i] == T));
- }
- else
- static assert(0);
-}
-
-void chkSingle(T,U)()
-{
- struct S { T a; }
- chkArgTypes!(S, U)();
-}
-
-void chkIdentity(T)()
-{
- chkSingle!(T,T)();
-}
-
-void chkPair(T,U,V)()
-{
- struct S { T a; U b; }
- chkArgTypes!(S, V)();
-}
-
-version (X86_64)
-{
- int main()
- {
- chkIdentity!byte();
- chkIdentity!ubyte();
- chkIdentity!short();
- chkIdentity!ushort();
- chkIdentity!int();
- chkIdentity!uint();
- chkIdentity!long();
- chkIdentity!ulong();
- chkSingle!(char,ubyte)();
- chkSingle!(wchar,ushort)();
- chkSingle!(dchar,uint)();
-
- chkIdentity!float();
- chkIdentity!double();
- chkIdentity!real();
-
- chkIdentity!(void*)();
-
- chkIdentity!(__vector(byte[16]))();
- chkIdentity!(__vector(ubyte[16]))();
- chkIdentity!(__vector(short[8]))();
- chkIdentity!(__vector(ushort[8]))();
- chkIdentity!(__vector(int[4]))();
- chkIdentity!(__vector(uint[4]))();
- chkIdentity!(__vector(long[2]))();
- chkIdentity!(__vector(ulong[2]))();
-
- chkIdentity!(__vector(float[4]))();
- chkIdentity!(__vector(double[2]))();
-
- chkPair!(byte,byte,short);
- chkPair!(ubyte,ubyte,short);
- chkPair!(short,short,int);
- chkPair!(int,int,long);
-
- chkPair!(byte,short,int);
- chkPair!(short,byte,int);
-
- chkPair!(int,float,long);
- chkPair!(float,int,long);
- chkPair!(byte,float,long);
- chkPair!(float,short,long);
-
- //struct S1 { long a; long b; }
- //chkArgTypes!(S1, long, long)();
-
- struct S2 { union { long a; double d; }}
- chkArgTypes!(S2, long)();
-
- struct S3 { union { double d; long a; }}
- chkArgTypes!(S3, long)();
-
- struct S4 { int a,b,c,d,e; }
- chkArgTypes!(S4)();
-
- struct S5 { align(1): char a; int b; }
- chkArgTypes!(S5)();
-
- struct S6 { align(1): int a; void* b; }
- chkArgTypes!(S5)();
-
- struct S7 { union { void* p; real r; }}
- chkArgTypes!(S7)();
-
- struct S8 { union { real r; void* p; }}
- chkArgTypes!(S8)();
-
- return 0;
- }
-}
-else
-{
- int main()
- {
- return 0;
- }
-}