summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug1253.c
blob: 84d9c51da17a2e155bbdf83a35abfec0c8962c80 (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
/*  Bug 1253, was bug 1609244
 */

#include <testfwk.h>

typedef char * PCHAR;

char KAR;

// bug.c:7: warning 60: function return value mismatch from type 'char near* '
// to type 'char generic* unknown type'
// bug.c:5: warning 59: function 'foo' must return value

PCHAR foo(void) __reentrant //this fails
{
  return &KAR;
}

PCHAR bar(void) // this is ok
{
  return &KAR;
}

void
testBug(void)
{
  ASSERT(foo() == bar());
}