Debian Codegraph @

gcc/testsuite/gcc.dg/torture/pr121649.c

raw
1 /* { dg-do run { target bitint } } */
2 /* { dg-require-effective-target int128 } */
3 /* { dg-additional-options "-Wno-psabi" } */
4
5 typedef __attribute__((__vector_size__ (8))) char v64s8;
6 typedef __attribute__((__vector_size__ (8))) short v64s16;
7 typedef __attribute__((__vector_size__ (8))) int v64s32;
8 typedef __attribute__((__vector_size__ (16))) char v128s8;
9 typedef __attribute__((__vector_size__ (16))) short v128s16;
10 typedef __attribute__((__vector_size__ (16))) int v128s32;
11 typedef __attribute__((__vector_size__ (16))) long v128s64;
12 typedef __attribute__((__vector_size__ (32))) char v256s8;
13 typedef __attribute__((__vector_size__ (32))) short v256s16;
14 typedef __attribute__((__vector_size__ (32))) int v256s32;
15 typedef __attribute__((__vector_size__ (32))) long v256s64;
16 typedef __attribute__((__vector_size__ (32))) __int128 v256s128;
17 typedef __attribute__((__vector_size__ (64))) char v512s8;
18 typedef __attribute__((__vector_size__ (64))) short v512s16;
19 typedef __attribute__((__vector_size__ (64))) int v512s32;
20 typedef __attribute__((__vector_size__ (64))) long v512s64;
21 typedef __attribute__((__vector_size__ (64))) __int128 v512s128;
22
23 #if __BITINT_MAXWIDTH__ >= 60692
24 __attribute__((noipa, cold))
25 void
26 foo0 (int, int, int, int,
27 _BitInt (3) sb3_0, char, char, char,
28 char, char, char, char, char,
29 char,char,char,char,
30 _BitInt (5), _BitInt (5), short, short, char,
31 short, short, char, int,
32 int, int, int, int, char,
33 long, long, long, long, long,
34 long, char, char, char, __int128,
35 __int128, __int128, __int128, __int128,
36 __int128, char, _BitInt (129), _BitInt (129),
37 _BitInt (255), _BitInt (255), _BitInt (256), _BitInt (256),
38 _BitInt (257), _BitInt (257), _BitInt (511), _BitInt (511),
39 _BitInt (512), _BitInt (512), _BitInt (513), _BitInt (513),
40 _BitInt (1023), _BitInt (1023), _BitInt (1024),
41 _BitInt (1024), _BitInt (1025), _BitInt (1025), _BitInt (331),
42 _BitInt (331), _BitInt (412), _BitInt (412), _BitInt (985),
43 _BitInt (985), _BitInt (60692), _BitInt (60692), char, char,
44 char, char, short, short, char, char, short, short, unsigned,
45 int, v64s8, v64s8, v64s16, v64s16, v64s32, v64s32, long, long,
46 v128s8, v128s8, short, v128s16, int, v128s32, long, v128s64,
47 __int128, __int128, v256s8, v256s8, v256s16, v256s16, v256s32,
48 v256s32, v256s64, v256s64, v256s128, v256s128, v512s8, v512s8,
49 v512s16, v512s16, v512s32, v512s32, v512s64, v512s64,
50 v512s128, v512s128, char *ret)
51 {
52 *ret = sb3_0;
53 }
54 #endif
55
56 __attribute__ ((noipa))
57 void
58 xprintf (int x)
59 {
60 if (x != 0xfc)
61 __builtin_abort();
62 }
63
64 int
65 main ()
66 {
67 #if __BITINT_MAXWIDTH__ >= 60692
68 char x;
69 foo0 (0, 0, 0, 0, -4, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -11, 9, 2, 95,
70 67, -24064, 0, 5, 6, 7, 0, 8, 9, 20, 4, 3, 6018427387903, 53,
71 505857273496, 255, 6, 0, 18446744073709551612uwb,
72 70141183460469231731687303715884105726uwb,
73 0x1ab7415df78c5d6355b5bf722d2c32wb, 18266202578652419339uwb,
74 9594516560314871492uwb, 18446744073709551615uwb, 0,
75 404678514476015038251338572701189uwb, 0,
76 6044618658097711785492504343953926634992332820282019728792003956564819964uwb,
77 0, 0,
78 6044618658097711785492504343953926634992332820282019728792003956564819967uwb,
79 0,
80 0x10000000000000000000000000000000000000000000000000000000000000000wb, 0, 1, 0, 606316039853739674053402528525595147334676uwb, 0,
81 407807929942597099574024998205846127479363981533648751059337645126787177315524892796678197877342278766808798337256961671307362116160553321514205699439425uwb,
82 0,
83 40449424473557664318357520289433168951375240783177119330601884005280028469967848339414697442203604155532867238014401323013014363877264556147687333148794044698496604162935270824544179699376777403364901791967663653826658703420189949487003960239619175525152082242122474284732uwb,
84 90772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479716304835356329623282435531uwb,
85 0, 0,
86 30203714894603546035770925859109268843954143792619895153655326951406405759993601526034894524347802740350892957243539456uwb,
87 0,
88 0x24c07bd236a355dac41c3e00fed83a2c01d47d7e7c155128f8474ab8acd075fe3be2661e9ba3b0498c2wb,
89 0,
90 -0x273d7a44735564a706be6f876e8c09a64c065028fc8719feace6b4ad22b722fc6628809c1bcfda902d563717b88876aa068496bwb,
91 0, 5, 0, 4, 0, 5, 0, 0115, 3, 92, 0, 1, 840, 839, 35, 4095, (v64s8)
92 { }, (v64s8)
93 { 3, -0x4 }, (v64s16)
94 { }, (v64s16)
95 { }, (v64s32)
96 { }, (v64s32)
97 { }, 7, 40, (v128s8)
98 { }, (v128s8)
99 { }, 126, (v128s16)
100 { }, 95, (v128s32)
101 { }, 6, (v128s64)
102 { }, 18446462603027742720uwb, 11842991817553718011uwb, (v256s8)
103 { 227, 84, 73, 5, 2, 45, 107, 55, 16, 128, 23, 17, 1, 226, 15 },
104 (v256s8)
105 { 9, 111, 108, 19, 98, 27, 97, -0xe }, (v256s16)
106 { 1, 167, 65280, 35, 15286, 9, 182, 13126, 15 }, (v256s16)
107 { 72, 381, 185, 619, 978, 926, 42 }, (v256s32)
108 { 20, 72, 905, 207, 63, 40 }, (v256s32)
109 { 5, 503, 1, 152, 5519391 }, (v256s64)
110 { 1280 }, (v256s64)
111 { 94, 8851183291103289765uwb, 526 }, (v256s128)
112 { 15013856701581711399uwb }, (v256s128)
113 { 10389555769421265252uwb, 15766594437788011035uwb }, (v512s8)
114 { 104, 131, 5, 21, 32, 127, 75, 54, 232, 1, 82, 255, 28, 178, 1,
115 121, 1, 14, 210, 240, 140, 53, 4, 91, 204, 78, 130, 76, 212, 52, 1,
116 200, 11, 25, 251, 41, 88, 12, 3, 59 }, (v512s8)
117 { 13, 10, 48, -0x2f, 67, 85, 87, 123, 8, 26, 83, 114, 51, 6, 96,
118 -0x1c, 115, 49, 86, 103, 93, 31, -0x6, 112, 1, 7, -0xc, 18, 47, 5,
119 -0xf, 3 }, (v512s16)
120 { 4094, 64492, 855, 61680, 27, 47569, 55, 65534, 76, -1024, 30,
121 254, 280, 11, 10, 14, 2, 4095, 3, 111, 65535, 67, 24289, 32, 25604,
122 26, 65535, 98, 65533, 5 }, (v512s16)
123 { 615, 2032, 54, 52, 015, 45, 24, 6, 7, 68, 24015, 380, 3315, 5, 8,
124 23, -0xf, 62, 82, 4 }, (v512s32)
125 { 54, 4294967294, 6, 16, 9, 13, 300, 80000000, 700, 600, 93, 040,
126 15 }, (v512s32)
127 { 515, 3, 14, 10, 2, 80, 39, 215, 7, 3, 4 }, (v512s64)
128 { 4, 9, 5, 3, 505 }, (v512s64)
129 { 904293909041052234uwb, 4 }, (v512s128)
130 { 9223372036854775808uwb, 1, 4073709551612 }, (v512s128)
131 { 7, 30391054, 18446742974197923807uwb }, &x);
132 xprintf ((int)(unsigned char) x);
133 #endif
134 }