File: bitint-40.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 (40 lines) | stat: -rw-r--r-- 1,770 bytes parent folder | download
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 c/102989 */
/* { dg-do run { target bitint } } */
/* { dg-options "-std=c23 -pedantic-errors" } */
/* { dg-skip-if "" { ! run_expensive_tests }  { "*" } { "-O0" "-O2" } } */
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */

#if __BITINT_MAXWIDTH__ >= 323
__attribute__((noipa)) _BitInt(323)
foo (_BitInt(318) x, _BitInt(323) y)
{
  return x + y;
}

__attribute__((noipa)) _BitInt(323)
bar (_BitInt(117) x, _BitInt(323) y)
{
  return x + y;
}
#endif

int
main ()
{
#if __BITINT_MAXWIDTH__ >= 323
  if (foo (-27733041854193447641086572824547940096595738628642819753407953445763239714154199953745005898992wb,
	   4767458710334760668834645815738583537909191474644120198636728988961922824468904018596948147773722wb)
      != 4739725668480567221193559242914035597812595736015477378883321035516159584754749818643203141874730wb
      || (foo (22167179033351019542845489620035412963406090796537167425591583962059414367893933412196721063711wb,
	       5235750662037407195417484618645691209305675673195256409842928988743249911043551311451335001624960wb)
	  != 5257917841070758214960330108265726622269081763991793577268520572705309325411445244863531722688671wb))
    __builtin_abort ();
  if (bar (-12653567664155974398995022748067044wb,
	   7190977642064159111525225823679712940862545424809645152399787447341776579576645887978584020321431wb)
      != 7190977642064159111525225823679712940862545424809645152399787434688208915420671488983561272254387wb
      || (bar (30518211833575333685611432934770228wb,
	       2152360419596992042662178082767272400451689654640037233902067223067458441134717528282349099466966wb)
	  != 2152360419596992042662178082767272400451689654640037233902067253585670274710051213893782034237194wb))
    __builtin_abort ();
#endif
}