OSDN Git Service

PR c/10175
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ultrasp8.c
1 /* PR target/10067 */
2 /* Originator: <dat94ali@ludat.lth.se> */
3 /* { dg-do compile { target sparc-*-* } } */
4 /* { dg-options "-O2 -m64 -mtune=supersparc" } */
5
6 struct _reent;
7
8 extern unsigned long __malloc_trim_threshold;
9 extern unsigned long __malloc_top_pad;
10
11 int _mallopt_r(struct _reent *reent_ptr, int param_number, int value)
12 {
13   __malloc_lock(reent_ptr);
14
15   switch(param_number)
16   {
17     case -1:
18       __malloc_trim_threshold = value;
19       __malloc_unlock(reent_ptr);
20       return 1;
21
22     case -2:
23       __malloc_top_pad = value;
24       __malloc_unlock(reent_ptr);
25       return 1;
26
27     case -3:
28       __malloc_unlock(reent_ptr);
29       return 1;
30
31     case -4:
32       __malloc_unlock(reent_ptr);
33       return value == 0;
34
35     default:
36       __malloc_unlock(reent_ptr);
37       return 0;
38   }
39 }