blob: c1aa90d430e4b23da3bfd0ca70a9b68a0a824e32 (
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
|
/* Undefined behavior from a call to a function cast to a different
type does not appear until after the function designator and
arguments have been evaluated. PR 38483. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-require-effective-target untyped_assembly } */
extern void exit (int);
extern void abort (void);
int
foo (void)
{
exit (0);
return 0;
}
void
bar (void)
{
}
int
main (void)
{
((long (*)(int))bar) (foo ());
abort ();
}
|