aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr120231-3.c
blob: d578c5b669f2ee90a9a4e14a7760356de2d244b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* PR tree-optimization/120231 */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
/* { dg-add-options float64 } */
/* { dg-require-effective-target float64 } */
/* { dg-final { scan-tree-dump-not "link_failure \\\(\\\);" "optimized" } } */

void link_failure (void);

void
foo (long long x)
{
  _Float64 y = x;
  if (y >= -8577328745032543176.25f64 && y <= 699563045341050951.75f64)
    {
      if (x < -8577328745032544256LL || x > 699563045341051136LL)
	link_failure ();
    }
  if (y >= -49919160463252.125f64 && y <= 757060336735329.625f64)
    {
      if (x < -49919160463252LL || x > 757060336735329LL)
	link_failure ();
    }
}

void
bar (_Float64 x)
{
  long long y = x;
  if (y >= -6923230004751524066LL && y <= 2202103129706786704LL)
    {
      if (x < -6923230004751524864.0f64 || x > 2202103129706786816.0f64)
	link_failure ();
    }
  if (y >= -171621738469699LL && y <= 45962470357748LL)
    {
      if (x <= -1716217384696970.f64 || x >= 45962470357749.0f64)
	link_failure ();
    }
}