* tree-ssa-loop-manip.c (split_loop_exit_edge): Return the new block.
[official-gcc.git] / gcc / testsuite / gcc.dg / pragma-init-fini.c
blob8c5c53a25aa682203927a5b51089b7724913e0c7
1 /* Tests for #pragma init and #pragma fini. */
3 /* { dg-do run { target *-*-solaris2.* } } */
5 extern void abort ();
7 #pragma init /* { dg-error "malformed" } */
8 #pragma init () /* { dg-error "malformed" } */
9 #pragma init init_func /* { dg-error "malformed" } */
11 #pragma fini /* { dg-error "malformed" } */
12 #pragma fini () /* { dg-error "malformed" } */
13 #pragma fini fini_func /* { dg-error "malformed" } */
15 #pragma init (init_func, init_static_func)
17 int glob_1, glob_2;
19 void init_func (void)
21 glob_1 = 1;
24 static void init_static_func (void)
26 glob_2 = 2;
29 #pragma fini (fini_func, fini_static_func)
31 void fini_func (void)
36 static void fini_static_func (void)
41 int main()
43 if (glob_1 != 1)
44 abort ();
46 if (glob_2 != 2)
47 abort ();
49 return 0;