blob: 2716570573a9f1a981a0e7e6c0775920cfca1ed8 (
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
32
33
34
35
36
37
|
/*
pr68390.c from the execute part of the gcc torture tests.
*/
#include <testfwk.h>
#ifdef __SDCC
#pragma disable_warning 93
#endif
/* { dg-do run } */
/* { dg-options "-O2" } */
#ifndef __SDCC_pdk14 // Lack of memory
double direct(int x, ...)
{
return x*x;
}
#endif
double broken(double (*indirect)(int x, ...), int v)
{
return indirect(v);
}
void
testTortureExecute (void)
{
#ifndef __SDCC_pdk14 // Lack of memory
double d1;
int i = 2;
d1 = broken (direct, i);
ASSERT (d1 == i*i);
return;
#endif
}
|