aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-10-13 12:42:36 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-10-13 12:42:36 +0200
commit1a1ab05e906d5fe546e72354dd79d455becd71df (patch)
treeca1888b5a59806a7abcaa4dd88da738af51d8c09 /gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c
parent5579170b40876cbf8af7a369a7b1ea98e76e8b59 (diff)
downloadgcc-1a1ab05e906d5fe546e72354dd79d455becd71df.zip
gcc-1a1ab05e906d5fe546e72354dd79d455becd71df.tar.gz
gcc-1a1ab05e906d5fe546e72354dd79d455becd71df.tar.bz2
re PR c/77946 (-Wimplicit-fallthrough=1 ICE: tree check: expected tree that contains ‘decl with visibility’ structure, have ‘label_decl’)
PR c/77946 * tree.h (FALLTHROUGH_LABEL_P): Use private_flag instead of public_flag. * varasm.c (default_binds_local_p_3): Formatting fix. * c-c++-common/Wimplicit-fallthrough-34.c: New test. From-SVN: r241094
Diffstat (limited to 'gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c')
-rw-r--r--gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c
new file mode 100644
index 0000000..9168c52
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c
@@ -0,0 +1,12 @@
+/* PR c/77946 */
+/* { dg-do compile } */
+/* { dg-options "-Wimplicit-fallthrough" } */
+
+void
+foo (void)
+{
+ static void *p = &&lab;
+ goto *p;
+ /*FALLTHRU*/
+ lab:;
+}