summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug-868103.c
blob: bec1cbcc707e17af88ce78fa8e0d3b7fb9437eb7 (plain) (blame)
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
/** Bug 868103 tests.

    storage1: __near, __far, __code,
    storage2: __near, __far,
*/

#ifndef STORAGE1
#define STORAGE1 {storage1}
#endif

#ifndef STORAGE2
#define STORAGE2 {storage2}
#endif

#include <testfwk.h>

typedef struct {
  STORAGE1 char * bar[2];
} foo;

STORAGE1 char c = 'x';
STORAGE2 foo f;

void
testBug868103 (void)
{
  f.bar[1] = &c;
  ASSERT (f.bar[1] == &c);
}