1 /* 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" } */
7 static int static_variable
= 1;
8 int global_initialized_variable
= 2;
9 extern int extern_declared_variable
;
11 extern int extern_declared_function (void);
12 static int static_function (void);
14 int global_defined_function ()
16 static int static_variable_in_function
= 2009;
19 + static_variable_in_function
++
20 + global_initialized_variable
22 + extern_declared_function ()
27 static_function (void)
29 if (extern_declared_variable
)
32 return 42 + global_defined_function ();
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" } } */