3 /* Test that (p!=0) + (q!=0) is computed as int,
5 /* { dg-options "-O3" } */
7 extern void abort (void);
8 char *foo(char *p
, char *q
) {
9 int x
= (p
!=0) + (q
!= 0);
10 if (x
==2) return "a"; else return 0;
12 extern char *bar(char*, char*) __attribute__((noinline
));
13 char *bar(char *first
, char *last
)
16 if (!first
) return last
;
17 if (!last
) return first
;
19 return foo(first
, last
);
24 char *p
= "a", *q
= "b";