summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
blob: a9bb6c6b890ca929b73f715653943eea5b2d746d (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
extern void abort(void);
extern void main_test (void);
extern void abort (void);
int inside_main;

int
main ()
{
  inside_main = 1;
  main_test ();
  inside_main = 0;
  return 0;
}

/* When optimizing, all the constant cases should have been
   constant folded, so no calls to link_error should remain.
   In any case, link_error should not be called.  */

#ifndef __OPTIMIZE__
void
link_error (void)
{
  abort ();
}
#endif