2 ! { dg-options "-Wcompare-reals" }
8 if (a
.eq
. 3.14) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
9 if (3.14 == a
) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
10 if (a
.eq
. 3) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
11 if (3. == a
) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
12 if (a
.ne
. 4.14) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
13 if (4.14 /= a
) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
14 if (a
.ne
. 4) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
15 if (4 /= a
) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
17 if (c
.eq
. (3.14, 2.11)) print *,"foo" ! { dg-warning "Equality comparison for COMPLEX" }
18 if ((3.14, 2.11) == a
) print *,"foo" ! { dg-warning "Equality comparison for COMPLEX" }
19 if (c
.ne
. (3.14, 2.11)) print *,"foo" ! { dg-warning "Inequality comparison for COMPLEX" }
20 if ((3.14, 2.11) /= a
) print *,"foo" ! { dg-warning "Inequality comparison for COMPLEX" }