* config/xtensa/xtensa.c (function_arg): Generalize logic so that it
[official-gcc.git] / gcc / testsuite / gcc.dg / mmix-1.c
blob802ae18ff657fac7812b833a65ffa13088d92f72
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;
10 int common_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;
17 return
18 static_variable
19 + static_variable_in_function++
20 + global_initialized_variable
21 + common_variable
22 + extern_declared_function ()
23 + static_function ();
26 static int
27 static_function (void)
29 if (extern_declared_variable)
30 return 42;
31 else
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" } } */