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

#include <testfwk.h>

#ifdef __SDCC
#pragma std_c99
#endif

/* PR c/42544 */

extern void abort (void);

void
testTortureExecute (void)
{
#if !defined(__SDCC_pic14) && !defined(__SDCC_pic16)
// TODO: Enable once pic14, pic16 support long long literals.
  signed short s = -1;
  if (sizeof (long long) == sizeof (unsigned int))
    return;
#ifndef PORT_HOST // Fails on Solaris for host - probably an old gcc version.
  if ((unsigned int) s >= 0x100000000ULL)
    ASSERT (0);
#endif
  return;
#endif
}