diff --git a/gcc/testsuite/gdc.dg/bom_UTF16BE.d b/gcc/testsuite/gdc.dg/bom_UTF16BE.d
new file mode 100644
index 0000000000000000000000000000000000000000..f18cec9b1e597b96e27c8650bac552ccb5bde54e
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_UTF16LE.d b/gcc/testsuite/gdc.dg/bom_UTF16LE.d
new file mode 100644
index 0000000000000000000000000000000000000000..e79a4ddbce1617edc38aa2b8aec61698d200461e
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_UTF32BE.d b/gcc/testsuite/gdc.dg/bom_UTF32BE.d
new file mode 100644
index 0000000000000000000000000000000000000000..eaf3b04b458fe51bf8b3726af5970ded60f19ad6
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_UTF32LE.d b/gcc/testsuite/gdc.dg/bom_UTF32LE.d
new file mode 100644
index 0000000000000000000000000000000000000000..89824d611dfcef3af76b72aad6033880d9ae22ee
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_UTF8.d b/gcc/testsuite/gdc.dg/bom_UTF8.d
new file mode 100644
index 00000000000..f3e8af4eb38
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/bom_UTF8.d
@@ -0,0 +1,11 @@
+﻿// { dg-do compile }
+module object;
+
+extern(C):
+int printf(const char *, ...);
+
+int main()
+{
+    printf("hello world\n");
+    return 0;
+}
diff --git a/gcc/testsuite/gdc.dg/bom_characters.d b/gcc/testsuite/gdc.dg/bom_characters.d
new file mode 100644
index 0000000000000000000000000000000000000000..4b42b4c611ba7b2746db7df9f3ba19c760952ae9
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_error_UTF8.d b/gcc/testsuite/gdc.dg/bom_error_UTF8.d
new file mode 100644
index 00000000000..0e47e59bda3
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/bom_error_UTF8.d
@@ -0,0 +1,11 @@
+﻿// { dg-do compile }
+﻿module object; // { dg-error "character 0xfeff is not a valid token" }
+
+extern(C):
+int printf(const char *, ...);
+
+int main()
+{
+    printf("hello world\n");
+    return 0;
+}
diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF16BE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF16BE.d
new file mode 100644
index 0000000000000000000000000000000000000000..c75076252aee991e8bd5e13fb6bd54529d0bf657
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF16LE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF16LE.d
new file mode 100644
index 0000000000000000000000000000000000000000..772891d9443c9dbdc2e157ae752575b93ff1f6f4
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF32BE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF32BE.d
new file mode 100644
index 0000000000000000000000000000000000000000..c52f102ea8127712ec4d149ab237807ca72ef349
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF32LE.d b/gcc/testsuite/gdc.dg/bom_infer_UTF32LE.d
new file mode 100644
index 0000000000000000000000000000000000000000..dd290e3e1ddabd5e7282a3c8b9b25a0dd8402873
GIT binary patch
diff --git a/gcc/testsuite/gdc.dg/bom_infer_UTF8.d b/gcc/testsuite/gdc.dg/bom_infer_UTF8.d
new file mode 100644
index 00000000000..bf345ac488a
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/bom_infer_UTF8.d
@@ -0,0 +1,11 @@
+// { dg-do compile }
+module object;
+
+extern(C):
+int printf(const char *, ...);
+
+int main()
+{
+    printf("hello world\n");
+    return 0;
+}
