summaryrefslogtreecommitdiff
path: root/support/regression/tests/gcc-torture-execute-pr78378.c
blob: 193148ea46353faa4ef61c66559269a2c573b1f8 (plain)
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
/*
   pr78378.c from the execute part of the gcc torture tests.
 */

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

#ifndef __SDCC_pdk14 // Lack of memory
/* PR rtl-optimization/78378 */
unsigned long long
foo (unsigned long long x)
{
  x <<= 41;
  x /= 232;
  return 1 + (unsigned short) x;
}
#endif

void
testTortureExecute (void)
{
#ifndef __SDCC_pdk14 // Lack of memory
  unsigned long long x = foo (1);
  if (x != 0x2c24)
    ASSERT(0);
  return;
#endif
}