modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/usmul.c (about) 1 /* { dg-require-effective-target int32plus } */ 2 int __attribute__ ((noinline)) foo (short x, unsigned short y) 3 { 4 return x * y; 5 } 6 7 int __attribute__ ((noinline)) bar (unsigned short x, short y) 8 { 9 return x * y; 10 } 11 12 int main () 13 { 14 if (foo (-2, 0xffff) != -131070) 15 abort (); 16 if (foo (2, 0xffff) != 131070) 17 abort (); 18 if (foo (-32768, 0x8000) != -1073741824) 19 abort (); 20 if (foo (32767, 0x8000) != 1073709056) 21 abort (); 22 23 if (bar (0xffff, -2) != -131070) 24 abort (); 25 if (bar (0xffff, 2) != 131070) 26 abort (); 27 if (bar (0x8000, -32768) != -1073741824) 28 abort (); 29 if (bar (0x8000, 32767) != 1073709056) 30 abort (); 31 32 exit (0); 33 } 34