2016-07-11 Marek Polacek <[email protected]>
PR c/7652
* c-c++-common/Wswitch-unreachable-1.c: Add __builtin_fallthrough.
* c-c++-common/pr44832.c: Likewise.
* g++.dg/lto/20090128_0.C: Likewise.
* g++.dg/opt/pr14029.C: Likewise.
* g++.dg/opt/pr45412.C: Likewise.
* g++.dg/opt/pr56999.C: Likewise.
* g++.dg/pr48484.C: Likewise.
* g++.dg/pr57662.C: Likewise.
* g++.dg/torture/pr64565.C: Likewise.
* gcc.dg/pr20017.c: Likewise.
* gcc.dg/pr27531-1.c: Likewise.
* gcc.dg/switch-1.c: Likewise.
* gcc.dg/torture/pr64284.c: Likewise.
* c-c++-common/Wmisleading-indentation-2.c: Use -Wno-switch-fallthrough.
* g++.dg/opt/eh5.C: Likewise.
* g++.dg/torture/pr49615.C: Likewise.
* g++.dg/warn/sequence-pt-pr17880.C: Likewise.
* gcc.dg/sequence-pt-pr17880.c: Likewise.
* gcc.dg/Wjump-misses-init-2.c: Likewise.
* gcc.dg/c99-vla-jump-5.c: Likewise.
* gcc.dg/duff-1.c: Likewise.
* gcc.dg/duff-2.c: Likewise.
* gcc.dg/duff-3.c: Likewise.
* gcc.dg/duff-4.c: Likewise.
* gcc.dg/ipa/pr57539.c: Likewise.
* gcc.dg/noncompile/920923-1.c: Likewise.
* gcc.dg/pr42388.c: Likewise.
* gcc.dg/pr45055.c: Likewise.
* gcc.dg/pr52139.c: Likewise.
* gcc.dg/pr53881-2.c: Likewise.
* gcc.dg/pr53887.c: Likewise.
* gcc.dg/pr55150-2.c: Likewise.
* gcc.dg/pr59418.c: Likewise.
* gcc.dg/pr65658.c: Likewise.
* gcc.dg/pr71084.c: Likewise.
* gcc.dg/torture/pr38948.c: Likewise.
* gcc.dg/tree-ssa/20030814-2.c: Likewise.
* gcc.dg/tree-ssa/20030814-3.c: Likewise.
* gcc.dg/tree-ssa/inline-10.c: Likewise.
* gcc.dg/tree-ssa/ssa-dom-thread-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-fre-10.c: Likewise.
* gcc.target/aarch64/pic-symrefplus.c: Likewise.
* gcc.target/i386/avx2-vperm2i128-2.c: Likewise.
* gcc.target/i386/pr46939.c: Likewise.
diff --git gcc/gcc/testsuite/c-c++-common/Wmisleading-indentation-2.c
gcc/gcc/testsuite/c-c++-common/Wmisleading-indentation-2.c
index b4ee700..b00ccc2 100644
--- gcc/gcc/testsuite/c-c++-common/Wmisleading-indentation-2.c
+++ gcc/gcc/testsuite/c-c++-common/Wmisleading-indentation-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-Wmisleading-indentation" } */
+/* { dg-options "-Wmisleading-indentation -Wno-switch-fallthrough" } */
/* { dg-do compile } */
/* Based on get_attr_athlon_decode from the generated insn-attrtab.c
diff --git gcc/gcc/testsuite/c-c++-common/Wswitch-unreachable-1.c
gcc/gcc/testsuite/c-c++-common/Wswitch-unreachable-1.c
index ee6ecc1..26e085d 100644
--- gcc/gcc/testsuite/c-c++-common/Wswitch-unreachable-1.c
+++ gcc/gcc/testsuite/c-c++-common/Wswitch-unreachable-1.c
@@ -108,6 +108,7 @@ X:
{
L:
j = 16;
+ __builtin_fallthrough ();
default:
if (j < 5)
goto L;
diff --git gcc/gcc/testsuite/c-c++-common/pr44832.c
gcc/gcc/testsuite/c-c++-common/pr44832.c
index b57e525..a8d0b4d 100644
--- gcc/gcc/testsuite/c-c++-common/pr44832.c
+++ gcc/gcc/testsuite/c-c++-common/pr44832.c
@@ -93,6 +93,7 @@ half:
case V16QImode:
if (!((ix86_isa_flags & (1 << 19)) != 0))
break;
+ __builtin_fallthrough ();
case V8HImode:
if (!((ix86_isa_flags & (1 << 17)) != 0))
diff --git gcc/gcc/testsuite/g++.dg/lto/20090128_0.C
gcc/gcc/testsuite/g++.dg/lto/20090128_0.C
index d03cfc6..c639d92 100644
--- gcc/gcc/testsuite/g++.dg/lto/20090128_0.C
+++ gcc/gcc/testsuite/g++.dg/lto/20090128_0.C
@@ -79,6 +79,7 @@ Class1::f3 (const char *src, char *dst, const char *end)
{
case KXYYZ:
*dst = '\0';
+ __builtin_fallthrough ();
case KXFI9:
if (!f2 (p9t42, &src, &dst, end))
;
diff --git gcc/gcc/testsuite/g++.dg/opt/eh5.C gcc/gcc/testsuite/g++.dg/opt/eh5.C
index 3557ab2..92580ac 100644
--- gcc/gcc/testsuite/g++.dg/opt/eh5.C
+++ gcc/gcc/testsuite/g++.dg/opt/eh5.C
@@ -1,6 +1,6 @@
// PR 41377
// { dg-do compile }
-// { dg-options "-O3" }
+// { dg-options "-O3 -Wno-switch-fallthrough" }
struct A
{
diff --git gcc/gcc/testsuite/g++.dg/opt/pr14029.C
gcc/gcc/testsuite/g++.dg/opt/pr14029.C
index 1673edf..5a67b17 100644
--- gcc/gcc/testsuite/g++.dg/opt/pr14029.C
+++ gcc/gcc/testsuite/g++.dg/opt/pr14029.C
@@ -28,6 +28,7 @@ Iterator find_7(Iterator first, Iterator last)
case 1:
if (*first.ptr == 7) return first;
++first;
+ __builtin_fallthrough ();
case 0:
default:
return last;
diff --git gcc/gcc/testsuite/g++.dg/opt/pr45412.C
gcc/gcc/testsuite/g++.dg/opt/pr45412.C
index e374f52..4259c7c 100644
--- gcc/gcc/testsuite/g++.dg/opt/pr45412.C
+++ gcc/gcc/testsuite/g++.dg/opt/pr45412.C
@@ -18,6 +18,7 @@ S::vm ()
{
case 0:
bar ();
+ __builtin_fallthrough ();
case 1:
delete this;
}
diff --git gcc/gcc/testsuite/g++.dg/opt/pr56999.C
gcc/gcc/testsuite/g++.dg/opt/pr56999.C
index 8d89ffa..6c48a72 100644
--- gcc/gcc/testsuite/g++.dg/opt/pr56999.C
+++ gcc/gcc/testsuite/g++.dg/opt/pr56999.C
@@ -131,6 +131,7 @@ namespace js
JITScript *jit = script->getJIT (constructing, barriers);
if (!jit)
return false;
+ __builtin_fallthrough ();
}
case ParallelIon:
return true;
diff --git gcc/gcc/testsuite/g++.dg/pr48484.C gcc/gcc/testsuite/g++.dg/pr48484.C
index 1380c45..f8595da 100644
--- gcc/gcc/testsuite/g++.dg/pr48484.C
+++ gcc/gcc/testsuite/g++.dg/pr48484.C
@@ -96,6 +96,7 @@ bool
_stack._vals[_i_._arg2], _i_._arg2, _i_._arg1, tojump);
ci += tojump; /* { dg-warning "uninitialized" "warning" } */
+ __builtin_fallthrough ();
}
case 1:
_stack.fff (_i_._arg1);
diff --git gcc/gcc/testsuite/g++.dg/pr57662.C gcc/gcc/testsuite/g++.dg/pr57662.C
index bd5793d..0c77b65 100644
--- gcc/gcc/testsuite/g++.dg/pr57662.C
+++ gcc/gcc/testsuite/g++.dg/pr57662.C
@@ -328,6 +328,7 @@ static bool cp_parser_pragma(cp_parser * parser, enum
pragma_context context)
switch (id) {
case PRAGMA_OMP_DECLARE_REDUCTION:
cp_parser_omp_declare(parser, pragma_tok, context);
+ __builtin_fallthrough ();
case PRAGMA_OMP_TARGET:
return cp_parser_omp_target(parser, pragma_tok, context);
}
diff --git gcc/gcc/testsuite/g++.dg/torture/pr49615.C
gcc/gcc/testsuite/g++.dg/torture/pr49615.C
index 98a2f95..2aa641a 100644
--- gcc/gcc/testsuite/g++.dg/torture/pr49615.C
+++ gcc/gcc/testsuite/g++.dg/torture/pr49615.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -Wno-switch-fallthrough" } */
template <class T>
static inline bool Dispatch (T* obj, void (T::*func) ())
diff --git gcc/gcc/testsuite/g++.dg/torture/pr64565.C
gcc/gcc/testsuite/g++.dg/torture/pr64565.C
index 42b0239..eeb5f10 100644
--- gcc/gcc/testsuite/g++.dg/torture/pr64565.C
+++ gcc/gcc/testsuite/g++.dg/torture/pr64565.C
@@ -75,6 +75,7 @@ J::m_fn2 ()
F query = 0;
if (Refresh_hasDomain)
return NS_OK;
+ __builtin_fallthrough ();
}
case 0:
{
@@ -82,6 +83,7 @@ J::m_fn2 ()
F query = Refresh___trans_tmp_5.m_fn4 (0);
history.m_fn7 ();
Refresh___trans_tmp_6.m_fn5 (0);
+ __builtin_fallthrough ();
}
case 3:
m_fn2 ();
diff --git gcc/gcc/testsuite/g++.dg/warn/sequence-pt-pr17880.C
gcc/gcc/testsuite/g++.dg/warn/sequence-pt-pr17880.C
index 01d87be..58de858 100644
--- gcc/gcc/testsuite/g++.dg/warn/sequence-pt-pr17880.C
+++ gcc/gcc/testsuite/g++.dg/warn/sequence-pt-pr17880.C
@@ -1,6 +1,6 @@
// PR 17880
// { dg-do compile }
-// { dg-options "-Wsequence-point" }
+// { dg-options "-Wsequence-point -Wno-switch-fallthrough" }
int
foo (int x)
diff --git gcc/gcc/testsuite/gcc.dg/Wjump-misses-init-2.c
gcc/gcc/testsuite/gcc.dg/Wjump-misses-init-2.c
index 042c02a..c66e5da 100644
--- gcc/gcc/testsuite/gcc.dg/Wjump-misses-init-2.c
+++ gcc/gcc/testsuite/gcc.dg/Wjump-misses-init-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wjump-misses-init -std=c99" } */
+/* { dg-options "-Wjump-misses-init -std=c99 -Wno-switch-fallthrough" } */
extern void f1 ();
int
f2 (int a)
diff --git gcc/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
gcc/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
index 5b5fc74..9003279 100644
--- gcc/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
+++ gcc/gcc/testsuite/gcc.dg/c99-vla-jump-5.c
@@ -9,7 +9,7 @@
/* Origin: Joseph Myers <[email protected]> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors -Wno-switch-fallthrough" }
*/
void
f (int a, int b)
diff --git gcc/gcc/testsuite/gcc.dg/duff-1.c gcc/gcc/testsuite/gcc.dg/duff-1.c
index b718f6c..3d47576 100644
--- gcc/gcc/testsuite/gcc.dg/duff-1.c
+++ gcc/gcc/testsuite/gcc.dg/duff-1.c
@@ -5,7 +5,7 @@
Derived from PR 3846. */
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
extern void abort (void);
extern void exit (int);
diff --git gcc/gcc/testsuite/gcc.dg/duff-2.c gcc/gcc/testsuite/gcc.dg/duff-2.c
index 8b8923e..e7287f3 100644
--- gcc/gcc/testsuite/gcc.dg/duff-2.c
+++ gcc/gcc/testsuite/gcc.dg/duff-2.c
@@ -6,7 +6,7 @@
See also PR 5230. */
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
extern void abort (void);
extern void exit (int);
diff --git gcc/gcc/testsuite/gcc.dg/duff-3.c gcc/gcc/testsuite/gcc.dg/duff-3.c
index 23cddef..53f8990 100644
--- gcc/gcc/testsuite/gcc.dg/duff-3.c
+++ gcc/gcc/testsuite/gcc.dg/duff-3.c
@@ -5,7 +5,7 @@
Derived from Tom Duff's original usenet message about the device. */
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
extern void abort (void);
extern void exit (int);
diff --git gcc/gcc/testsuite/gcc.dg/duff-4.c gcc/gcc/testsuite/gcc.dg/duff-4.c
index 7032285..a8b2c63 100644
--- gcc/gcc/testsuite/gcc.dg/duff-4.c
+++ gcc/gcc/testsuite/gcc.dg/duff-4.c
@@ -5,7 +5,7 @@
Derived from duff-2.c. */
/* { dg-do run } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
extern void abort (void);
extern void exit (int);
diff --git gcc/gcc/testsuite/gcc.dg/ipa/pr57539.c
gcc/gcc/testsuite/gcc.dg/ipa/pr57539.c
index 514b600..9b5505e 100644
--- gcc/gcc/testsuite/gcc.dg/ipa/pr57539.c
+++ gcc/gcc/testsuite/gcc.dg/ipa/pr57539.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-O3 -Wno-switch-fallthrough" } */
typedef long unsigned int size_t;
typedef struct
diff --git gcc/gcc/testsuite/gcc.dg/noncompile/920923-1.c
gcc/gcc/testsuite/gcc.dg/noncompile/920923-1.c
index 1cb140e..713918d 100644
--- gcc/gcc/testsuite/gcc.dg/noncompile/920923-1.c
+++ gcc/gcc/testsuite/gcc.dg/noncompile/920923-1.c
@@ -1,3 +1,4 @@
+/* { dg-options "-Wno-switch-fallthrough" } */
/* { dg-message "undeclared identifier is reported only once" "reminder for
mmu_base" { target *-*-* } 0 } */
typedef BYTE unsigned char; /* { dg-error "expected" } */
typedef int item_n;
diff --git gcc/gcc/testsuite/gcc.dg/pr20017.c gcc/gcc/testsuite/gcc.dg/pr20017.c
index 47c048f..f77d7e8 100644
--- gcc/gcc/testsuite/gcc.dg/pr20017.c
+++ gcc/gcc/testsuite/gcc.dg/pr20017.c
@@ -32,6 +32,7 @@ foo (int *buf, int *p)
result = *p;
/* Fall through. */
+ __builtin_fallthrough ();
default:
if (result)
return 1;
diff --git gcc/gcc/testsuite/gcc.dg/pr27531-1.c
gcc/gcc/testsuite/gcc.dg/pr27531-1.c
index 990c183..e28f56cc 100644
--- gcc/gcc/testsuite/gcc.dg/pr27531-1.c
+++ gcc/gcc/testsuite/gcc.dg/pr27531-1.c
@@ -41,14 +41,19 @@ int main (int argc, char **argv)
{
case 'L':
onlylockflag = 1;
+ __builtin_fallthrough ();
case 'N':
shownames = 0;
+ __builtin_fallthrough ();
case 'R':
t = a;
+ __builtin_fallthrough ();
case 'b':
branchflag = 1;
+ __builtin_fallthrough ();
case 'r':
getrevpairs(a);
+ __builtin_fallthrough ();
}
if (onlylockflag && !Locks)
fprintf(out, "%s\n", RCSname);
diff --git gcc/gcc/testsuite/gcc.dg/pr42388.c gcc/gcc/testsuite/gcc.dg/pr42388.c
index a68a2e8..4ac4b0d 100644
--- gcc/gcc/testsuite/gcc.dg/pr42388.c
+++ gcc/gcc/testsuite/gcc.dg/pr42388.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O2 -fselective-scheduling -fmodulo-sched" } */
+/* { dg-options "-O2 -fselective-scheduling -fmodulo-sched
-Wno-switch-fallthrough" } */
enum rtx_code
{
diff --git gcc/gcc/testsuite/gcc.dg/pr45055.c gcc/gcc/testsuite/gcc.dg/pr45055.c
index 899de50..36f11e9 100644
--- gcc/gcc/testsuite/gcc.dg/pr45055.c
+++ gcc/gcc/testsuite/gcc.dg/pr45055.c
@@ -1,6 +1,6 @@
/* PR debug/45055 */
/* { dg-do compile } */
-/* { dg-options "-O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns
-fcompare-debug" } */
+/* { dg-options "-O2 -ftracer -fsched-pressure -funroll-loops -fschedule-insns
-fcompare-debug -Wno-switch-fallthrough" } */
/* { dg-require-effective-target scheduling } */
int colormap[10];
diff --git gcc/gcc/testsuite/gcc.dg/pr52139.c gcc/gcc/testsuite/gcc.dg/pr52139.c
index b2a08a6..4e691aa 100644
--- gcc/gcc/testsuite/gcc.dg/pr52139.c
+++ gcc/gcc/testsuite/gcc.dg/pr52139.c
@@ -1,6 +1,6 @@
/* PR rtl-optimization/52139 */
/* { dg-do compile } */
-/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre" } */
+/* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre
-Wno-switch-fallthrough" } */
/* { dg-additional-options "-fpic" { target fpic } } */
/* { dg-require-effective-target label_values } */
diff --git gcc/gcc/testsuite/gcc.dg/pr53881-2.c
gcc/gcc/testsuite/gcc.dg/pr53881-2.c
index f6f8f8b..735580c 100644
--- gcc/gcc/testsuite/gcc.dg/pr53881-2.c
+++ gcc/gcc/testsuite/gcc.dg/pr53881-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
int a,b,c;
void
diff --git gcc/gcc/testsuite/gcc.dg/pr53887.c gcc/gcc/testsuite/gcc.dg/pr53887.c
index b46126c..9a73c4b 100644
--- gcc/gcc/testsuite/gcc.dg/pr53887.c
+++ gcc/gcc/testsuite/gcc.dg/pr53887.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
enum
{ Failed, NoError, NoDiskette }
diff --git gcc/gcc/testsuite/gcc.dg/pr55150-2.c
gcc/gcc/testsuite/gcc.dg/pr55150-2.c
index ed571d6..5b05ca1 100644
--- gcc/gcc/testsuite/gcc.dg/pr55150-2.c
+++ gcc/gcc/testsuite/gcc.dg/pr55150-2.c
@@ -1,7 +1,7 @@
/* PR middle-end/55150 */
/* { dg-do compile } */
/* { dg-require-effective-target fpic } */
-/* { dg-options "-Os -g -fPIC" } */
+/* { dg-options "-Os -g -fPIC -Wno-switch-fallthrough" } */
typedef unsigned char DES_cblock[8];
typedef struct DES_ks {
diff --git gcc/gcc/testsuite/gcc.dg/pr59418.c gcc/gcc/testsuite/gcc.dg/pr59418.c
index 12999aa..57bbf53 100644
--- gcc/gcc/testsuite/gcc.dg/pr59418.c
+++ gcc/gcc/testsuite/gcc.dg/pr59418.c
@@ -2,7 +2,7 @@
/* Reported by Ryan Mansfield <[email protected]> */
/* { dg-do compile } */
-/* { dg-options "-Os -g" } */
+/* { dg-options "-Os -g -Wno-switch-fallthrough" } */
/* { dg-options "-march=armv7-a -mfloat-abi=hard -Os -g" { target { arm*-*-*
&& { ! arm_thumb1 } } } } */
extern int printf (const char *__format, ...);
diff --git gcc/gcc/testsuite/gcc.dg/pr65658.c gcc/gcc/testsuite/gcc.dg/pr65658.c
index bb5c37a..83a2cb1 100644
--- gcc/gcc/testsuite/gcc.dg/pr65658.c
+++ gcc/gcc/testsuite/gcc.dg/pr65658.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wuninitialized -O2 -Wno-implicit" } */
+/* { dg-options "-Wuninitialized -O2 -Wno-implicit -Wno-switch-fallthrough" }
*/
/* { dg-require-effective-target ptr32plus } */
extern int optind;
diff --git gcc/gcc/testsuite/gcc.dg/pr71084.c gcc/gcc/testsuite/gcc.dg/pr71084.c
index 46fdf9f..0994932 100644
--- gcc/gcc/testsuite/gcc.dg/pr71084.c
+++ gcc/gcc/testsuite/gcc.dg/pr71084.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/71084 */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
void babl_format (void);
void gimp_drawable_get_format (void);
diff --git gcc/gcc/testsuite/gcc.dg/sequence-pt-pr17880.c
gcc/gcc/testsuite/gcc.dg/sequence-pt-pr17880.c
index df706e5..c5ed973 100644
--- gcc/gcc/testsuite/gcc.dg/sequence-pt-pr17880.c
+++ gcc/gcc/testsuite/gcc.dg/sequence-pt-pr17880.c
@@ -1,6 +1,6 @@
/* PR 17880 */
/* { dg-do compile } */
-/* { dg-options "-Wsequence-point" } */
+/* { dg-options "-Wsequence-point -Wno-switch-fallthrough" } */
int
foo (int x)
diff --git gcc/gcc/testsuite/gcc.dg/switch-1.c
gcc/gcc/testsuite/gcc.dg/switch-1.c
index 1879790..2534f3e 100644
--- gcc/gcc/testsuite/gcc.dg/switch-1.c
+++ gcc/gcc/testsuite/gcc.dg/switch-1.c
@@ -10,6 +10,7 @@ void f (char *s)
{
case 2:
*s = '2';
+ __builtin_fallthrough ();
case 6: case 4: case 3: case 1:
break;
}
diff --git gcc/gcc/testsuite/gcc.dg/torture/pr38948.c
gcc/gcc/testsuite/gcc.dg/torture/pr38948.c
index 90906ee..0a3aad6 100644
--- gcc/gcc/testsuite/gcc.dg/torture/pr38948.c
+++ gcc/gcc/testsuite/gcc.dg/torture/pr38948.c
@@ -1,4 +1,4 @@
-/* { dg-options "-fno-tree-sra" } */
+/* { dg-options "-fno-tree-sra -Wno-switch-fallthrough" } */
/* { dg-options "-fno-tree-sra -march=v32" { target cris-*-* } } */
typedef unsigned char byte;
typedef unsigned int uint;
diff --git gcc/gcc/testsuite/gcc.dg/torture/pr64284.c
gcc/gcc/testsuite/gcc.dg/torture/pr64284.c
index 4254381..dae08a3 100644
--- gcc/gcc/testsuite/gcc.dg/torture/pr64284.c
+++ gcc/gcc/testsuite/gcc.dg/torture/pr64284.c
@@ -9,6 +9,7 @@ fn1() {
switch (*a) {
case '\'':
c = 0;
+ __builtin_fallthrough ();
default:
switch (c)
case 0:
diff --git gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c
gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c
index a99abf4..8dde43f 100644
--- gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c
+++ gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom2" } */
+/* { dg-options "-O1 -fdump-tree-dom2 -Wno-switch-fallthrough" } */
extern void abort (void);
extern void blah (void);
diff --git gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c
gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c
index 149da1b..d95e780 100644
--- gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c
+++ gcc/gcc/testsuite/gcc.dg/tree-ssa/20030814-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-dom2" } */
+/* { dg-options "-O1 -fdump-tree-dom2 -Wno-switch-fallthrough" } */
extern void abort (void);
extern void blah (void);
diff --git gcc/gcc/testsuite/gcc.dg/tree-ssa/inline-10.c
gcc/gcc/testsuite/gcc.dg/tree-ssa/inline-10.c
index 118e19e..38048bb 100644
--- gcc/gcc/testsuite/gcc.dg/tree-ssa/inline-10.c
+++ gcc/gcc/testsuite/gcc.dg/tree-ssa/inline-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Os -fdump-tree-optimized -fno-partial-inlining" } */
+/* { dg-options "-Os -fdump-tree-optimized -fno-partial-inlining
-Wno-switch-fallthrough" } */
void do_something1(void);
void do_something2(void);
void do_something3(void);
diff --git gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
index 2d9028d..d9f80f6 100644
--- gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
+++ gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
@@ -1,6 +1,6 @@
/* PR 65048 */
/* { dg-do compile } */
-/* { dg-options "-O3 -std=gnu89" } */
+/* { dg-options "-O3 -std=gnu89 -Wno-switch-fallthrough" } */
int a, b, c, d;
void fn (void);
diff --git gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
index 7f2d1eb..d04335e 100644
--- gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
+++ gcc/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-pre-stats" } */
+/* { dg-options "-O2 -fdump-tree-pre-stats -Wno-switch-fallthrough" } */
union loc { unsigned reg; signed offset; };
void __frame_state_for (volatile char *state_in, int x)
diff --git gcc/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
gcc/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
index 406568c..53e36b9 100644
--- gcc/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
+++ gcc/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mcmodel=small -fPIC -fno-builtin" } */
+/* { dg-options "-O2 -mcmodel=small -fPIC -fno-builtin
-Wno-switch-fallthrough" } */
/* { dg-do compile } */
typedef long unsigned int size_t;
diff --git gcc/gcc/testsuite/gcc.target/i386/avx2-vperm2i128-2.c
gcc/gcc/testsuite/gcc.target/i386/avx2-vperm2i128-2.c
index 96f32b8..5a8b1ef 100644
--- gcc/gcc/testsuite/gcc.target/i386/avx2-vperm2i128-2.c
+++ gcc/gcc/testsuite/gcc.target/i386/avx2-vperm2i128-2.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2" } */
+/* { dg-options "-mavx2 -O2 -Wno-switch-fallthrough" } */
/* { dg-require-effective-target avx2 } */
#include "avx2-check.h"
diff --git gcc/gcc/testsuite/gcc.target/i386/pr46939.c
gcc/gcc/testsuite/gcc.target/i386/pr46939.c
index 0fd8607..646b6a1 100644
--- gcc/gcc/testsuite/gcc.target/i386/pr46939.c
+++ gcc/gcc/testsuite/gcc.target/i386/pr46939.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -Wno-switch-fallthrough" } */
__extension__ typedef __SIZE_TYPE__ size_t;