annotate gcc/testsuite/c-c++-common/pr57371-2.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-O -fdump-tree-optimized" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 /* We can not get rid of comparison in tests below because of
kono
parents:
diff changeset
5 potential inexact exception.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 TODO: enable when -fno-trapping-math. */
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 int foo1(int x) {
kono
parents:
diff changeset
10 return (float) x != 0;
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
11 /* { dg-final { scan-tree-dump "\\(float\\)" "optimized" { xfail { ! int_eq_float } } } } */
111
kono
parents:
diff changeset
12 }
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 int foo2(long long x) {
kono
parents:
diff changeset
15 /* { dg-final { scan-tree-dump "\\(double\\)" "optimized" } } */
kono
parents:
diff changeset
16 return (double) x != 0;
kono
parents:
diff changeset
17 }