OSDN Git Service

* gcc.c-torture/execute/pr39339.c: Bitfield sizes changed to avoid padding.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / call-trap-1.c
1 /* Undefined behavior from a call to a function cast to a different
2    type does not appear until after the function designator and
3    arguments have been evaluated.  PR 38483.  */
4 /* Origin: Joseph Myers <joseph@codesourcery.com> */
5
6 extern void exit (int);
7 extern void abort (void);
8
9 int
10 foo (void)
11 {
12   exit (0);
13   return 0;
14 }
15
16 void
17 bar (void)
18 {
19 }
20
21 int
22 main (void)
23 {
24   ((long (*)(int))bar) (foo ());
25   abort ();
26 }