summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr56989.c
blob: beb980678b2ab9453fab2db2cabd777d500569a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR c/56989 */
/* { dg-do compile } */

extern void voidf (void);
extern int intf (void);

int
f (void)
{
  if (intf () < 0
      || voidf () < 0) /* { dg-error "10:void value not ignored as it ought to be" } */
    return 1;

  if (voidf () < 0 /* { dg-error "7:void value not ignored as it ought to be" } */
      || intf () < 0)
    return 1;

  return 0;
}