OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [builtin-constant.c] - Blame information for rev 308

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* PR optimization/8423.  */
2
 
3
#define btest(x) __builtin_constant_p(x) ? "1" : "0"
4
 
5
#ifdef __OPTIMIZE__
6
void
7
foo (char *i)
8
{
9
  if (*i == '0')
10
    abort ();
11
}
12
#else
13
void
14
foo (char *i)
15
{
16
}
17
#endif
18
 
19
int
20
main (void)
21
{
22
  int size = sizeof (int);
23
  foo (btest (size));
24
  foo (btest (size));
25
  exit (0);
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.