File: pr58791-4.c

package info (click to toggle)
gcc-arm-none-eabi 15%3A14.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,099,328 kB
  • sloc: cpp: 3,627,108; ansic: 2,571,498; ada: 834,230; f90: 235,082; makefile: 79,231; asm: 74,984; xml: 51,692; exp: 39,736; sh: 33,298; objc: 15,629; python: 15,069; fortran: 14,429; pascal: 7,003; awk: 5,070; perl: 3,106; ml: 285; lisp: 253; lex: 204; haskell: 135
file content (41 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (10)
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
41
/* PR tree-optimization/58791 */
/* { dg-do run } */
/* { dg-options "-g -ffast-math" } */

#include "../nop.h"

__attribute__((noinline, noclone)) double
foo (float a, float b, float c, float d, float l, double u)
{
  float e = a * d;
  float f = d * e;
  double g = (double) f;
  double h = (double) b;
  double i = g * h;			/* { dg-final { gdb-test pr58791-4.c:32 "i" "486" { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
  double i2 = i + 1.0;			/* { dg-final { gdb-test pr58791-4.c:32 "i2" "487" { target { { i?86-*-* x86_64-*-* } && lp64 } } } } */
  double j = i * 3.25;
  double k = h + j;
  float m = l * 8.75;
  double n = (double) m;
  double o = (double) a;
  double p = n * o;
  double q = h * p;
  double r = q * 2.5;
  double s = k - r;
  double t = (double) c;
  double v = o * u;
  double w = o * v;
  double x = h * w;
  double y = h * x;
  double z = y * 8.5;
  asm volatile (NOP : : : "memory");
  asm volatile (NOP : : : "memory");
  return s - z;
}

int
main ()
{
  foo (3.0f, 2.0f, -1.0f, 9.0f, 1.0f, 2.0);
  return 0;
}