File: gcc-bug-e.c

package info (click to toggle)
gcc-riscv64-unknown-elf 8.3.0.2019.08%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 680,956 kB
  • sloc: ansic: 3,237,715; cpp: 896,882; ada: 772,854; f90: 144,254; asm: 68,788; makefile: 67,456; sh: 29,743; exp: 28,045; objc: 15,273; fortran: 11,885; python: 7,369; pascal: 5,375; awk: 3,725; perl: 2,872; yacc: 316; xml: 311; ml: 285; lex: 198; haskell: 122
file content (44 lines) | stat: -rw-r--r-- 720 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
42
43
44
#include "harness.h"

typedef struct n_a
{
  signed char m1;
  short m2;
  int m3;
  double m4;
  vector float m5;
}
n_a;

static void
initn_a(signed char p1, short p2, int p3, double p4, vector float p5)
{
  n_a i;
  static struct
  {
    n_a b;
    char a;
  }
  x;

  i.m1 = p1;
  i.m2 = p2;
  i.m3 = p3;
  i.m4 = p4;
  i.m5 = p5;

  check(i.m1 == -17, "i.m1");
  check(i.m2 == 9165, "i.m2");
  check(i.m3 == -1857760764, "i.m3");
  check(i.m4 == 7.3e+18, "i.m4");
  check(vec_all_eq(i.m5, ((vector float){-5.02e+08,
					  -4.34e+08,
					  -1.04e+09,
					   1.42e+09})), "i.m5");
}

static void test()
{
  initn_a(-17, 9165, -1857760764, 7.3e+18,
	  ((vector float){-5.02e+08, -4.34e+08, -1.04e+09, 1.42e+09}));
}