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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [mmix-1.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* Origin: <hp@bitrange.com>
2
   Test that MMIX -mtoplevel-symbols cause a ":" to be prepended on the
3
   right symbols and only there.  */
4
/* { dg-do compile { target mmix-*-* } } */
5
/* { dg-options "-mtoplevel-symbols" } */
6
 
7
static int static_variable = 1;
8
int global_initialized_variable = 2;
9
extern int extern_declared_variable;
10
int common_variable;
11
extern int extern_declared_function (void);
12
static int static_function (void);
13
 
14
int global_defined_function ()
15
{
16
  static int static_variable_in_function = 2009;
17
  return
18
    static_variable
19
    + static_variable_in_function++
20
    + global_initialized_variable
21
    + common_variable
22
    + extern_declared_function ()
23
    + static_function ();
24
}
25
 
26
static int
27
static_function (void)
28
{
29
  if (extern_declared_variable)
30
    return 42;
31
  else
32
    return 42 + global_defined_function ();
33
}
34
 
35
/* { dg-final { scan-assembler-not ":static_variable" } } */
36
/* { dg-final { scan-assembler-not "(^|\[^:\])global_initialized_variable" } } */
37
/* { dg-final { scan-assembler-not "\[^:\]extern_declared_variable" } } */
38
/* { dg-final { scan-assembler-not "\[^:\]common_variable" } } */
39
/* { dg-final { scan-assembler-not "\[^:\]extern_declared_function" } } */
40
/* { dg-final { scan-assembler-not ":static_function" } } */
41
/* { dg-final { scan-assembler-not "(^|\[^:\])global_defined_function" } } */
42
/* { dg-final { scan-assembler-not "\[^:\]extern_declared_variable" } } */

powered by: WebSVN 2.1.0

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