This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Alpha/VMS: adjust condition to create trampoline entry point


Hi,

the alpha/vms backend emitted the trampoline entry point too often, as functions declared directly within a translation unit weren't considered as top-level functions.

Fixed by this patch, applied on trunk.

Tristan.

2011-12-20  Tristan Gingold  <gingold@adacore.com>

	* config/alpha/alpha.c (alpha_start_function): Adjust condition to
	create VMS trampoline entry point.

Index: config/alpha/alpha.c
===================================================================
--- config/alpha/alpha.c	(revision 182519)
+++ config/alpha/alpha.c	(working copy)
@@ -7935,7 +7935,8 @@
    if (TARGET_ABI_OPEN_VMS
        && !TREE_PUBLIC (decl)
        && DECL_CONTEXT (decl)
-       && !TYPE_P (DECL_CONTEXT (decl)))
+       && !TYPE_P (DECL_CONTEXT (decl))
+       && TREE_CODE (DECL_CONTEXT (decl)) != TRANSLATION_UNIT_DECL)
      {
 	strcpy (tramp_label, fnname);
 	strcat (tramp_label, "..tr");


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]