summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/parse-else-error-4.c
blob: 617c3f3e3f00cf0760cdbef1dd79a1d2f418e6e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* PR 23722 */
/* { dg-do compile } */
/* { dg-options "-fsyntax-only" } */
int f()
{
  if (1)
    {
      return 1;
    }
  else 
    {
      else; /* { dg-error "'else' without a previous 'if'" } */
    }
}