diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C gcc-10.2.0/gcc/testsuite/g++.dg/abi/bitfield3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/bitfield3.C	2020-07-23 09:35:17.920390800 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/abi/bitfield3.C	2020-10-26 13:07:06.410835500 +0300
@@ -3,7 +3,7 @@
 // { dg-options "-O2" }
 // Cygwin and mingw default to MASK_ALIGN_DOUBLE. Override to ensure
 // 4-byte alignment.
-// { dg-additional-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-mingw* } }
+// { dg-additional-options "-mno-align-double" { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* } }
 // As for mingw target the ms-bitfield switch is activated by default,
 // make sure for this test that it is disabled.
 // { dg-additional-options "-mno-ms-bitfields" { target i?86-*-mingw* } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C gcc-10.2.0/gcc/testsuite/g++.dg/abi/rtti3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/rtti3.C	2020-07-23 09:35:17.924390900 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/abi/rtti3.C	2020-10-26 13:07:06.413729700 +0300
@@ -2,7 +2,7 @@
 // necessarily the type info object
 
 // { dg-require-weak "" }
-// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } }
+// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin *-*-msys } }
 // { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* hppa*-*-hpux* } } } } }
 // { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } }
 // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C gcc-10.2.0/gcc/testsuite/g++.dg/abi/thunk4.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/abi/thunk4.C	2020-07-23 09:35:17.924390900 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/abi/thunk4.C	2020-10-26 13:07:06.416721400 +0300
@@ -1,5 +1,5 @@
 // { dg-require-weak "" }
-// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } }
+// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin *-*-msys } }
 // { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
 // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c gcc-10.2.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c	2020-07-23 09:35:17.924390900 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c	2020-10-26 13:08:12.124927500 +0300
@@ -46,8 +46,8 @@
 const char *dg_options[] = {
 "/* { dg-options \"%s%s-I%s -Wno-abi\" } */\n",
 "/* { dg-options \"%s%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
-"/* { dg-options \"%s%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
-"/* { dg-options \"%s%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
+"/* { dg-options \"%s%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* *-*-msys* } } */\n",
+"/* { dg-options \"%s%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* i?86-*-msys* } } */\n",
 "/* { dg-options \"%s%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
 "/* { dg-options \"%s%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
 #define NDG_OPTIONS (sizeof (dg_options) / sizeof (dg_options[0]))
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C	2020-07-23 09:35:17.944391100 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C	2020-10-26 13:07:06.427519200 +0300
@@ -1,7 +1,7 @@
 // Test for conversion from stateless lambda to function pointer.
 
 // { dg-do compile { target c++11_only } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-hpux10* } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys *-*-hpux10* } } } } }
 
 inline void f()
 {
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C	2020-07-23 09:35:17.944391100 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C	2020-10-26 13:07:06.431481700 +0300
@@ -12,7 +12,7 @@
   // The call operator of that type is _ZZ1giENKUlvE_clEv.
 
 // { dg-final { scan-assembler "_ZZ1giENKUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1giENKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1giENKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys } } } } }
 
   algo([=]{return n+bef();});
   // The captured entities do not participate in <lambda-sig>
@@ -34,7 +34,7 @@
 	 // Type: ZN1S1fEiiEd0_UlvE_
 	 // Operator: _ZZN1S1fEiiEd0_NKUlvE_clEv
 // { dg-final { scan-assembler "_ZZN1S1fEiiEd0_NKUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZN1S1fEiiEd0_NKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZN1S1fEiiEd0_NKUlvE_clEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-msys } } } } }
 	 []{return 1;}()
 	 // Type: ZN1S1fEiiEd0_UlvE0_
 	 // Operator: _ZZN1S1fEiiEd0_NKUlvE0_clEv
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C	2020-07-23 09:35:17.944391100 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle6.C	2020-10-26 13:13:18.831874900 +0300
@@ -12,4 +12,4 @@
 // Type of lambda in intializer of R<int>::x: N1RIiE1xMUlvE_E
 // Corresponding operator(): _ZNK1RIiE1xMUlvE_clEv
 // { dg-final { scan-assembler "_ZNK1RIiE1xMUlvE_clEv" } }
-// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin } } } } }
+// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZNK1RIiE1xMUlvE_clEv" { target { ! { *-*-mingw* *-*-cygwin *-*-msys } } } } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport1.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport1.C	2020-10-26 13:07:06.436561600 +0300
@@ -1,5 +1,5 @@
 // Test that inline functions are exported with -fkeep-inline-functions.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw*} }
 // { dg-options -fkeep-inline-functions } 
 
 __attribute__((dllexport)) inline int foo (int a) { return a;}
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport3.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport3.C	2020-10-26 13:07:06.439554100 +0300
@@ -1,5 +1,5 @@
 // PR c++/42870
-// { dg-do compile { target i?86-*-cygwin *-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin i?86-*-msys *-*-mingw* } }
 // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2SaD1Ev" } }
 
 #define ATTRIBUTE __attribute__ ((dllexport))
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllexport-MI1.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllexport-MI1.C	2020-10-26 13:07:06.442551000 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw*} }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw*} }
 //  Test that non-virtual MI thunks are exported.
 
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport1.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport1.C	2020-10-26 13:07:06.444512500 +0300
@@ -1,5 +1,5 @@
 //  PR c++/7910
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 // { dg-options { -Wall -W } }
 
 class __attribute__((dllimport)) Foo
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport10.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport10.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport10.C	2020-10-26 13:07:06.447504400 +0300
@@ -1,7 +1,7 @@
 // PR c++/5287, c++/11021
 // Inherit a virtual method from a dllimport'd base class.
 
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 struct __attribute__((dllimport)) A
 {
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport11.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport11.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport11.C	2020-10-26 13:07:06.450496300 +0300
@@ -1,6 +1,6 @@
 // PR target/23589
 // Template member functions do not get dllimport status of class.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 struct __attribute__((dllimport)) Foo
 {
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport12.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport12.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport12.C	2020-10-26 13:07:06.452491000 +0300
@@ -1,7 +1,7 @@
 // PR target/27650
 // Don't use dllimport semantics on virtual methods when initializing
 // vtables
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 // Use import lib thunk for vtable entry of explicitly virtual method,
 struct base
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport13.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport13.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport13.C	2020-10-26 13:07:06.455820700 +0300
@@ -1,7 +1,7 @@
 //  PR c++/34749
 //  Ensure dllimport is handled correctly for friends
 
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 int  __declspec (dllimport) bar();
 int  __declspec (dllimport) baz();
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport2.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport2.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport2.C	2020-10-26 13:07:06.458808800 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 // PR c++/9738  Dllimport attribute is overriden by later definition/redeclaration
 
 void __attribute__((dllimport)) Bar(void);
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport3.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport3.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport3.C	2020-10-26 13:07:06.461801400 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 // PR 10148  Dllimport attribute of object is overriden by later
 // redefinition without attribute.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport4.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport4.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport4.C	2020-10-26 13:07:06.464599000 +0300
@@ -1,5 +1,5 @@
 //  Report error if dllimport attribute in definition itself.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 __attribute__((dllimport))  void bar () { }	// { dg-error "definition" }
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport5.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport5.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport5.C	2020-10-26 13:07:06.467278400 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 //  Report error if static symbol definition has dllimport attribute.
 
 __attribute__((dllimport))
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport6.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport6.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport6.C	2020-10-26 13:07:06.469183300 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 //  Mark class static members as dllimport.
 
 struct Baz
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport7.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport7.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport7.C	2020-10-26 13:07:06.473208100 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 //  Report errors on definition of dllimport'd static data member . 
 
@@ -19,7 +19,7 @@
 };
 
 const int Bar::three = 3;       //  { dg-warning "redeclared without dllimport" }
-//  { dg-error "definition of static data" "C++ specific error" { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } .-1 }
+//  { dg-error "definition of static data" "C++ specific error" { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } .-1 }
 				
 const Baz Bar::null_baz;	//  { dg-warning "redeclared without dllimport" }
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport8.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport8.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport8.C	2020-10-26 13:07:06.476192000 +0300
@@ -2,7 +2,7 @@
 //  Ignore  dllimport of static members if marked inlined.
 //  or if definition follows  declaration in dllimported class.
 
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 // { dg-options { -Wall -W } }
 
 struct  __attribute__((dllimport)) Foo
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport9.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport9.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport9.C	2020-10-26 13:07:06.479183900 +0300
@@ -1,5 +1,5 @@
 //  Handle dllimport attribute for functions declared inline.
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 // { dg-options { -W } }
 
 inline __attribute__((dllimport)) void bar() { }	// { dg-warning "inline" }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-initialized.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-initialized.C	2020-10-26 13:07:06.481178400 +0300
@@ -1,3 +1,3 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 
 __attribute__((dllimport)) int i __attribute__((unused)) = 0;  // { dg-error "32:definition of .int i. is marked .dllimport." }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/dllimport-MI1.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/dllimport-MI1.C	2020-10-26 13:07:06.484664700 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
+// { dg-do compile { target i?86-*-cygwin* i?86-*-msys* i?86-*-mingw* x86_64-*-mingw* } }
 //  Test handling of MI thunks in dllimported classes.
 
 // To build the dll and client app:
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany1.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany1.C	2020-10-26 13:07:06.486658500 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-pc-cygwin } }
+// { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } }
 // { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
 
 // Check that selectany attribute puts symbols into link-once sections.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany2.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/ext/selectany2.C	2020-07-23 09:35:17.980391500 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/ext/selectany2.C	2020-10-26 13:07:06.490647700 +0300
@@ -1,4 +1,4 @@
-// { dg-do compile { target i?86-pc-cygwin } }
+// { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } }
 // { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } }
 
 // Check for errors with invalid usage of selectany attribute.
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C gcc-10.2.0/gcc/testsuite/g++.dg/opt/vt1.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/opt/vt1.C	2020-07-23 09:35:18.004391800 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/opt/vt1.C	2020-10-26 13:09:25.904916400 +0300
@@ -1,7 +1,7 @@
 // Test whether vtable for S is not put into read-only section.
 // { dg-do compile { target fpic } }
 // { dg-options "-O2 -fpic -fno-rtti" }
-// { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } }
+// { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin *-*-msys } }
 // Origin: Jakub Jelinek <jakub@redhat.com>
 
 struct S
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C gcc-10.2.0/gcc/testsuite/g++.dg/template/spec35.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.dg/template/spec35.C	2020-07-23 09:35:18.028392000 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.dg/template/spec35.C	2020-10-26 13:07:06.498280400 +0300
@@ -24,6 +24,6 @@
   // { dg-final { scan-assembler-not ".glob(a|)l\[\t \]*_?_Z2f1IiEvT_" } }
   f1(0);  // Expected to have static linkage
 
-  // { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_" { target { ! { *-*-mingw* *-*-cygwin } } } } }
+  // { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_" { target { ! { *-*-mingw* *-*-cygwin *-*-msys } } } } }
   f2(0);  // Expected to have weak global linkage
 }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C gcc-10.2.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
--- gcc-10.2.0-orig/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C	2020-07-23 09:35:18.052392300 +0300
+++ gcc-10.2.0/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C	2020-10-26 13:07:06.501420700 +0300
@@ -1,4 +1,4 @@
-// { dg-do run { xfail i?86-pc-cygwin } }
+// { dg-do run { xfail i?86-pc-cygwin i?86-pc-msys } }
 // Test that attributes weak and alias coexist.
 // { dg-require-weak "" }
 // { dg-require-alias "" }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-attrib.c	2020-07-23 09:35:18.128393100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-attrib.c	2020-10-26 13:07:06.504609800 +0300
@@ -3,7 +3,7 @@
    posted to GCC-patches
    http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */ 
 
-/* { dg-do run { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-do run { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
 
 /* We don't want the default "pedantic-errors" in this case, since we're
    testing nonstandard stuff to begin with. */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-ms-layout-3.c	2020-07-23 09:35:18.128393100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/bf-ms-layout-3.c	2020-10-26 13:07:06.507901600 +0300
@@ -1,5 +1,5 @@
 /* Test for MS bitfield layout */
-/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-* x86_64-*-* } } */
+/* { dg-do run { target *-*-mingw* *-*-cygwin* *-*-msys* i?86-*-* x86_64-*-* } } */
 
 extern void abort();
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c gcc-10.2.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/bf-no-ms-layout.c	2020-07-23 09:35:18.128393100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/bf-no-ms-layout.c	2020-10-26 13:07:06.510823900 +0300
@@ -5,7 +5,7 @@
    posted to GCC-patches
    http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00577.html */
 
-/* { dg-do run { target *-*-mingw* *-*-cygwin* i?86-*-darwin } } */
+/* { dg-do run { target *-*-mingw* *-*-cygwin* *-*-msys* i?86-*-darwin } } */
 /* { dg-options "-mno-ms-bitfields" } */
 
 #include <stddef.h>
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-3.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-3.c	2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-3.c	2020-10-26 13:07:06.514064900 +0300
@@ -1,7 +1,7 @@
 /* Ensure dllexport overrides dllimport.  */
 
 /* { dg-do compile { target arm*-*-pe* } } */
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
 /* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
 
 __declspec (dllimport) int foo1 ();
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-4.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-4.c	2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-4.c	2020-10-26 13:07:06.516725400 +0300
@@ -1,5 +1,5 @@
 /* { dg-do compile { target arm*-*-pe* } } */
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
 /* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
 
 __declspec (dllimport) int foo1;
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-5.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-5.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-5.c	2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-5.c	2020-10-26 13:07:06.519688300 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
 /* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } */
 /* { dg-do compile { target arm*-*-pe* } } */
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-8.c gcc-10.2.0/gcc/testsuite/gcc.dg/dll-8.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/dll-8.c	2020-07-23 09:35:18.148393400 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/dll-8.c	2020-10-26 13:07:06.522680200 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-pc-cygwin } } */
+/* { dg-do compile { target i?86-pc-cygwin i?86-pc-msys } } */
 /* { dg-do compile { target i?86-*-mingw* x86_64-*-mingw*} } */
 /* { dg-options "-O3 -fwhole-program" } */
 /* { dg-final { scan-assembler "foo1" } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c gcc-10.2.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/graphite/run-id-1.c	2020-07-23 09:35:18.160393500 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/graphite/run-id-1.c	2020-10-26 13:07:06.525672100 +0300
@@ -1,4 +1,4 @@
-/* { dg-options "-Wl,--stack,12582912" { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-options "-Wl,--stack,12582912" { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
 /* { dg-require-effective-target size32plus } */
 /* { dg-require-stack-size "4*1000*1000" } */
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c gcc-10.2.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/lto/20090914-2_0.c	2020-07-23 09:35:18.168393600 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/lto/20090914-2_0.c	2020-10-26 13:07:06.527666600 +0300
@@ -1,7 +1,7 @@
 /* { dg-lto-do run } */
 /* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } } */
 /* { dg-skip-if "no .type" { *-*-darwin* } } */
-/* { dg-skip-if "no @function" { *-*-mingw* *-*-cygwin* } } */
+/* { dg-skip-if "no @function" { *-*-mingw* *-*-cygwin* *-*-msys* } } */
 
 /* Doesn't work without this dummy function with -fwhopr.  */
 int foo(void) { }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c	2020-07-23 09:35:18.220394200 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c	2020-10-26 13:07:06.531449900 +0300
@@ -46,10 +46,10 @@
 /* CRIS and MSP430 keep the address in a register.  */
 /* m68k sometimes puts the address in a register, depending on CPU and PIC.  */
 
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* i?86-*-msys* x86_64-*-mingw* visium-*-* nvptx*-*-* pdp11*-*-* msp430-*-* amdgcn*-*-* } } } */
 /* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-* } } } */
 /* { dg-final { scan-assembler-times "= foo"  5 { target ia64*-*-* } } } */
-/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* } } } */
+/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* i?86-*-msys* } } } */
 /* { dg-final { scan-assembler-times "call\[ \t\]*foo" 5 { target x86_64-*-mingw* } } } */
 /* { dg-final { scan-assembler-times "jsr|bsrf|blink\ttr?,r18"  5 { target sh*-*-* } } } */
 /* { dg-final { scan-assembler-times "Jsr \\\$r" 5 { target cris-*-* } } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c	2020-07-23 09:35:18.232394300 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-2.c	2020-10-26 13:07:06.535440200 +0300
@@ -10,4 +10,4 @@
 
 /* There should be a reference to conststaticvariable since it may
    may be overriden at link time.  */
-/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { xfail { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-final { scan-tree-dump-times "conststaticvariable" 1 "optimized" { xfail { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/fastcall-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/fastcall-1.c	2020-07-23 09:35:18.388396000 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/fastcall-1.c	2020-10-26 13:07:06.538432200 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* } } */
+/* { dg-do compile { target i?86-*-mingw32* i?86-*-cygwin* i?86-*-msys* } } */
 /* { dg-options "-std=gnu89" } */
 
 void
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pad-4.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pad-4.c	2020-07-23 09:35:18.392396000 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pad-4.c	2020-10-26 13:07:06.541424000 +0300
@@ -2,7 +2,7 @@
 /* { dg-require-effective-target ia32 } */
 /* { dg-require-effective-target fpic } */
 /* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=atom" } } */
-/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } } */
+/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin *-*-msys } } */
 /* { dg-options "-O2 -fomit-frame-pointer -march=atom -fPIC" } */
 /* { dg-final { scan-assembler-times "nop" 8 } } */
 /* { dg-final { scan-assembler-not "rep" } } */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pic-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pic-1.c	2020-07-23 09:35:18.392396000 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pic-1.c	2020-10-26 13:07:06.544416200 +0300
@@ -2,7 +2,7 @@
 /* { dg-do compile } */
 /* { dg-require-effective-target ia32 } */
 /* { dg-require-effective-target fpic } */
-/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin } } */
+/* { dg-skip-if "No Windows PIC" { *-*-mingw* *-*-cygwin *-*-msys } } */
 /* { dg-options "-fPIC" } */
 
 /* Test verifies that %ebx is no longer fixed when generating PIC code on i686.  */
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr25993.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr25993.c	2020-10-26 12:02:06.876358600 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr25993.c	2020-10-26 13:07:06.546410800 +0300
@@ -1,5 +1,5 @@
 /* { dg-do assemble } */
-/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" } } */
+/* { dg-skip-if "" { "*-*-darwin*" "*-*-mingw*" "*-*-cygwin*" "*-*-msys*" } } */
 /* { dg-options "-std=c99 -x assembler-with-cpp" } */
 
 #ifndef __ASSEMBLER__
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-1.c	2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-1.c	2020-10-26 13:07:06.549062300 +0300
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ia32 } */
 /* { dg-options "-O2 -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpush-args" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
 
 void abort (void);
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-2.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr40906-2.c	2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr40906-2.c	2020-10-26 13:07:06.552082600 +0300
@@ -1,7 +1,7 @@
 /* { dg-do run } */
 /* { dg-require-effective-target ia32 } */
 /* { dg-options "-O2 -Wno-psabi -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpush-args -m128bit-long-double" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
 
 void abort (void);
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr46226.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr46226.c	2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr46226.c	2020-10-26 13:07:06.555046200 +0300
@@ -1,6 +1,6 @@
 /* { dg-do run } */
 /* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
 
 extern void abort(void);
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-1.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-1.c	2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-1.c	2020-10-26 13:07:06.558391100 +0300
@@ -1,6 +1,6 @@
 /* PR target/56564 */
 /* { dg-do compile { target { fpic && lp64 } } } */
-/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-msys* *-*-darwin* } } */
 /* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
 
 struct S { long a, b; } s = { 5, 6 };
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-3.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/pr56564-3.c	2020-07-23 09:35:18.396396100 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/pr56564-3.c	2020-10-26 13:07:06.561501600 +0300
@@ -1,6 +1,6 @@
 /* PR target/56564 */
 /* { dg-do compile { target { fpic && lp64 } } } */
-/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-msys* *-*-darwin* } } */
 /* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
 
 __thread struct S { long a, b; } s = { 5, 6 };
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/sse-10.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/sse-10.c	2020-07-23 09:35:18.408396200 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/sse-10.c	2020-10-26 13:07:06.564157200 +0300
@@ -1,7 +1,7 @@
 /* PR 17930 */
 /* { dg-do run } */
 /* { dg-options "-O1 -msse2 -mfpmath=sse -fno-omit-frame-pointer" } */
-/* { dg-additional-options "-mno-accumulate-outgoing-args -mno-omit-leaf-frame-pointer" { target { ! { *-*-mingw* *-*-cygwin* } } } } */
+/* { dg-additional-options "-mno-accumulate-outgoing-args -mno-omit-leaf-frame-pointer" { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } } */
 /* { dg-require-effective-target sse2 } */
 
 #include "sse2-check.h"
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c gcc-10.2.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/i386/stack-realign-win.c	2020-07-23 09:35:18.412396300 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/i386/stack-realign-win.c	2020-10-26 13:07:06.567119400 +0300
@@ -1,4 +1,4 @@
-/* { dg-do compile { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-do compile { target *-*-mingw* *-*-cygwin* *-*-msys* } } */
 /* { dg-require-effective-target ia32 } */
 /* { dg-options "-msse -O" } */
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp gcc-10.2.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp
--- gcc-10.2.0-orig/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp	2020-07-23 09:35:18.460396800 +0300
+++ gcc-10.2.0/gcc/testsuite/gcc.target/x86_64/abi/ms-sysv/ms-sysv.exp	2020-10-26 13:07:06.570111200 +0300
@@ -144,7 +144,7 @@
 	runtest_ms_sysv "$cflags" "$gen_opts"
 
 	# Skip unsupported -mcall-ms2sysv-xlogues on Windows
-	if { ![istarget *-*-cygwin*] && ![istarget *-*-mingw*] } {
+	if { ![istarget *-*-cygwin*] && ![istarget *-*-msys*] && ![istarget *-*-mingw*] } {
 	    runtest_ms_sysv "-mcall-ms2sysv-xlogues$cflags" "$gen_opts"
 	}
     }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2020-07-23 09:35:18.496397200 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90	2020-10-26 13:07:06.574100400 +0300
@@ -16,9 +16,9 @@
 call test(aa)
 end
 
-! { dg-final { scan-assembler-times "\[ \t\]\[$,_0-9\]*myBindC" 1 { target { ! { hppa*-*-* s390*-*-* *-*-cygwin* amdgcn*-*-* } } } } }
+! { dg-final { scan-assembler-times "\[ \t\]\[$,_0-9\]*myBindC" 1 { target { ! { hppa*-*-* s390*-*-* *-*-cygwin* *-*-msys* amdgcn*-*-* } } } } }
 ! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-* } } } }
-! { dg-final { scan-assembler-times "call\tmyBindC" 1 { target { *-*-cygwin* } } } }
+! { dg-final { scan-assembler-times "call\tmyBindC" 1 { target { *-*-cygwin* *-*-msys* } } } }
 ! { dg-final { scan-assembler-times "brasl\t%r\[0-9\]*,myBindC" 1 { target { s390*-*-* } } } }
 ! { dg-final { scan-assembler-times "add_u32\t\[sv\]\[0-9\]*, \[sv\]\[0-9\]*, myBindC@rel32@lo" 1 { target { amdgcn*-*-* } } } }
 ! { dg-final { scan-tree-dump-times "cfi_desc_to_gfc_desc \\\(&parm\\." 1 "original" } }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_1.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_1.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_1.f90	2020-07-23 09:35:18.504397300 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_1.f90	2020-10-26 13:10:06.927030700 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
 ! { dg-options "-std=gnu" }
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_2.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_2.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_2.f90	2020-07-23 09:35:18.504397300 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_2.f90	2020-10-26 13:10:20.714898700 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
 ! { dg-options "-std=gnu" }
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_3.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_3.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/chmod_3.f90	2020-07-23 09:35:18.504397300 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/chmod_3.f90	2020-10-26 13:10:31.338725600 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
 ! { dg-options "-std=gnu -fdefault-integer-8" }
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
   implicit none
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90	2020-07-23 09:35:18.512397400 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90	2020-10-26 13:11:08.149028800 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* } }
+! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* *-*-msys* } }
 ! Test XFAILed on these platforms because the system's printf() lacks
 ! proper support for denormals.
 !
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/open_errors.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/open_errors.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/open_errors.f90	2020-07-23 09:35:18.540397700 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/open_errors.f90	2020-10-26 13:11:32.908799900 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* } } } }
+! { dg-do run { target { ! { *-*-mingw* *-*-cygwin* *-*-msys* } } } }
 ! PR30005 Enhanced error messages for OPEN
 ! Submitted by Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 ! See PR38956.  Test fails on cygwin when user has Administrator rights
diff -Naur gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/winapi.f90 gcc-10.2.0/gcc/testsuite/gfortran.dg/winapi.f90
--- gcc-10.2.0-orig/gcc/testsuite/gfortran.dg/winapi.f90	2020-07-23 09:35:18.564397900 +0300
+++ gcc-10.2.0/gcc/testsuite/gfortran.dg/winapi.f90	2020-10-26 13:07:06.610016800 +0300
@@ -1,4 +1,4 @@
-! { dg-do run { target *-*-cygwin* *-*-mingw* } }
+! { dg-do run { target *-*-cygwin* *-*-msys* *-*-mingw* } }
 ! { dg-options "-lkernel32" }
 ! Test case provided by Dennis Wassel.
 
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/g++.exp gcc-10.2.0/gcc/testsuite/lib/g++.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/g++.exp	2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/g++.exp	2020-10-26 13:07:06.614049400 +0300
@@ -205,7 +205,7 @@
 
     # Many hosts now default to a non-ASCII C locale, however, so
     # they can set a charset encoding here if they need.
-    if { [ishost "*-*-cygwin*"] } {
+    if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
       setenv LC_ALL C.ASCII
       setenv LANG C.ASCII
     }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/gcc-dg.exp gcc-10.2.0/gcc/testsuite/lib/gcc-dg.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/gcc-dg.exp	2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/gcc-dg.exp	2020-10-26 13:07:06.617486000 +0300
@@ -40,7 +40,7 @@
 
 # Many hosts now default to a non-ASCII C locale, however, so
 # they can set a charset encoding here if they need.
-if { [ishost "*-*-cygwin*"] } {
+if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
   setenv LC_ALL C.ASCII
   setenv LANG C.ASCII
 }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/gfortran.exp gcc-10.2.0/gcc/testsuite/lib/gfortran.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/gfortran.exp	2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/gfortran.exp	2020-10-26 13:07:06.620615100 +0300
@@ -161,7 +161,7 @@
 
     # Many hosts now default to a non-ASCII C locale, however, so
     # they can set a charset encoding here if they need.
-    if { [ishost "*-*-cygwin*"] } {
+    if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
       setenv LC_ALL C.ASCII
       setenv LANG C.ASCII
     }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/objc.exp gcc-10.2.0/gcc/testsuite/lib/objc.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/objc.exp	2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/objc.exp	2020-10-26 13:07:06.624053400 +0300
@@ -105,7 +105,7 @@
 
     # Many hosts now default to a non-ASCII C locale, however, so
     # they can set a charset encoding here if they need.
-    if { [ishost "*-*-cygwin*"] } {
+    if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
       setenv LC_ALL C.ASCII
       setenv LANG C.ASCII
     }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/options.exp gcc-10.2.0/gcc/testsuite/lib/options.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/options.exp	2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/options.exp	2020-10-26 13:07:06.626077400 +0300
@@ -20,7 +20,7 @@
 
 # Many hosts now default to a non-ASCII C locale, however, so
 # they can set a charset encoding here if they need.
-if { [ishost "*-*-cygwin*"] } {
+if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
   setenv LC_ALL C.ASCII
   setenv LANG C.ASCII
 }
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-libpath.exp gcc-10.2.0/gcc/testsuite/lib/target-libpath.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/target-libpath.exp	2020-07-23 09:35:18.608398400 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/target-libpath.exp	2020-10-26 13:07:06.630058500 +0300
@@ -171,7 +171,7 @@
   } else {
     setenv DYLD_LIBRARY_PATH "$ld_library_path"
   }
-  if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+  if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
     if { $orig_path_saved } {
       setenv PATH "$ld_library_path:$orig_path"
     } else {
@@ -277,7 +277,7 @@
 
     if { [istarget *-*-darwin*] } {
 	set shlib_ext "dylib"
-    } elseif { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+    } elseif { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
 	set shlib_ext "dll"
     } elseif { [istarget hppa*-*-hpux*] } {
 	set shlib_ext "sl"
diff -Naur gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp gcc-10.2.0/gcc/testsuite/lib/target-supports.exp
--- gcc-10.2.0-orig/gcc/testsuite/lib/target-supports.exp	2020-07-23 09:35:18.612398500 +0300
+++ gcc-10.2.0/gcc/testsuite/lib/target-supports.exp	2020-10-26 13:07:06.636118300 +0300
@@ -301,7 +301,7 @@
 
     # Windows targets Cygwin and MingW32 support it
 
-    if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+    if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
 	return 1
     }
 
@@ -678,6 +678,11 @@
 	return 0
     }
 
+    # MSYS does not support -p.
+    if { [istarget *-*-msys*] && $test_what == "-p" } {
+	return 0
+    }
+    
     # uClibc does not have gcrt1.o.
     if { [check_effective_target_uclibc]
 	 && ($test_what == "-p" || $test_what == "-pg") } {
@@ -1111,7 +1116,7 @@
 # for trivial code, 0 otherwise.
 
 proc check_effective_target_pe_aligned_commons {} {
-    if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+    if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
 	return [check_no_compiler_messages pe_aligned_commons object {
 	    int foo;
 	} "-mpe-aligned-commons"]
@@ -2598,7 +2603,7 @@
 # Returns true iff "mkfifo" is available on the target system.
 
 proc check_mkfifo_available {} {
-    if { [istarget *-*-cygwin*] } {
+    if { [istarget *-*-cygwin*] || [istarget *-*-msys*] } {
        # Cygwin has mkfifo, but support is incomplete.
        return 0
      }
@@ -8218,7 +8223,7 @@
 proc check_effective_target_automatic_stack_alignment  { } {
     # Ordinarily x86 supports automatic stack alignment ...
     if { [istarget i?86*-*-*] || [istarget x86_64-*-*] } then {
-        if { [istarget *-*-mingw*] || [istarget *-*-cygwin*] } {
+        if { [istarget *-*-mingw*] || [istarget *-*-cygwin*] || [istarget *-*-msys*] } {
 	    # ... except Win64 SEH doesn't.  Succeed for Win32 though.
 	    return [check_effective_target_ilp32];
 	}
diff -Naur gcc-10.2.0-orig/libffi/testsuite/lib/target-libpath.exp gcc-10.2.0/libffi/testsuite/lib/target-libpath.exp
--- gcc-10.2.0-orig/libffi/testsuite/lib/target-libpath.exp	2020-07-23 09:35:18.744399900 +0300
+++ gcc-10.2.0/libffi/testsuite/lib/target-libpath.exp	2020-10-26 13:07:06.640139000 +0300
@@ -175,7 +175,7 @@
   } else {
     setenv DYLD_LIBRARY_PATH "$ld_library_path"
   }
-  if { [istarget *-*-cygwin*] || [istarget *-*-mingw*] } {
+  if { [istarget *-*-cygwin*] || [istarget *-*-msys*] || [istarget *-*-mingw*] } {
     if { $orig_path_saved } {
       setenv PATH "$ld_library_path:$orig_path"
     } else {
@@ -271,7 +271,7 @@
 
     if { [ istarget *-*-darwin* ] } {
 	set shlib_ext "dylib"
-    } elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-mingw* ] } {
+    } elseif { [ istarget *-*-cygwin* ] || [ istarget *-*-msys* ] || [ istarget *-*-mingw* ] } {
 	set shlib_ext "dll"
     } elseif { [ istarget hppa*-*-hpux* ] } {
 	set shlib_ext "sl"
diff -Naur gcc-10.2.0-orig/libgomp/testsuite/lib/libgomp.exp gcc-10.2.0/libgomp/testsuite/lib/libgomp.exp
--- gcc-10.2.0-orig/libgomp/testsuite/lib/libgomp.exp	2020-07-23 09:35:19.020403000 +0300
+++ gcc-10.2.0/libgomp/testsuite/lib/libgomp.exp	2020-10-26 13:07:06.644097900 +0300
@@ -82,7 +82,7 @@
 
     # Many hosts now default to a non-ASCII C locale, however, so
     # they can set a charset encoding here if they need.
-    if { [ishost "*-*-cygwin*"] } {
+    if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
       setenv LC_ALL C.ASCII
       setenv LANG C.ASCII
     }
diff -Naur gcc-10.2.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp gcc-10.2.0/libstdc++-v3/testsuite/lib/libstdc++.exp
--- gcc-10.2.0-orig/libstdc++-v3/testsuite/lib/libstdc++.exp	2020-07-23 09:35:19.408407200 +0300
+++ gcc-10.2.0/libstdc++-v3/testsuite/lib/libstdc++.exp	2020-10-26 13:07:06.648087200 +0300
@@ -113,7 +113,7 @@
 
     # Many hosts now default to a non-ASCII C locale, however, so
     # they can set a charset encoding here if they need.
-    if { [ishost "*-*-cygwin*"] } {
+    if { [ishost "*-*-cygwin*"] || [ishost "*-*-msys*"] } {
       setenv LC_ALL C.ASCII
       setenv LANG C.ASCII
     }
