summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pch/counter-2.c
blob: d0475ba1de37d40864bf1824db028ddd5537e807 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Copyright (C) 2007 Free Software Foundation
   Contributed by Ollie Wild <aaw@google.com> */

/* { dg-options "-I. -Winvalid-pch" } */

#if __COUNTER__ != 0
#error __COUNTER__ != 0
#endif

#include "counter-2.h" /* { dg-warning "not used because `__COUNTER__' is invalid" } */
/* { dg-error "counter-2.h: No such file or directory" "" { target *-*-* } 10 } */
/* { dg-error "one or more PCH files were found, but they were invalid" "" { target *-*-* } 10 } */

int main(void) 
{
  return __COUNTER__;
}