aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/calls-void.c
blob: fc0a7ff6e1a0bd2ef77216f57b4fbd878d0b4df4 (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
/* { dg-require-effective-target ptr32plus } */
/* { dg-require-effective-target untyped_assembly } */
/* { dg-require-effective-target indirect_calls } */
/* { dg-additional-options "-std=gnu89" } */

typedef void  (*T)(void);
f1 ()
{
  ((T) 0)();
}
f2 ()
{
  ((T) 1000)();
}
f3 ()
{
  ((T) 10000000)();
}
f4 (r)
{
  ((T) r)();
}
f5 ()
{
  int (*r)() = f3;
  ((T) r)();
}