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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [varpool-1.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
/* { dg-final { scan-assembler-not "unnecesary_static_initialized_variable" } } */
4
 
5
static int unnecesary_static_initialized_variable;
6
static int *unnecesary_static_initialized_variable2 =
7
  &unnecesary_static_initialized_variable;
8
static inline
9
simplify_after_inline (int param1, int *param2)
10
{
11
  if (unnecesary_static_initialized_variable != param1)
12
    return unnecesary_static_initialized_variable;
13
  if (unnecesary_static_initialized_variable2 != param2)
14
    return unnecesary_static_initialized_variable;
15
}
16
 
17
main ()
18
{
19
  return simplify_after_inline (unnecesary_static_initialized_variable,
20
                                unnecesary_static_initialized_variable2) +
21
    simplify_after_inline (unnecesary_static_initialized_variable,
22
                           unnecesary_static_initialized_variable2);
23
}

powered by: WebSVN 2.1.0

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