aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/stmt-expr-label-3.c
blob: 0a6722283f4c4f86cd6caf4330c55bdd3e1bcfcb (plain)
1
2
3
4
5
6
7
8
9
10
11
/* Test for labels in statement expressions: bugs 772 and 17913.
   Test the particular case of bug 17913.  */

/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-options "-O2" } */

void f(void) { 1 ? 1 : ({ a : 1; 1; }); goto a; } /* { dg-error "jump into statement expression" } */

/* Match extra informative notes.  */
/* { dg-message "note: label '\[^\n'\]*' defined here" "note: expected" { target *-*-* } 0 } */