Patchwork [committed] : alpha-vms: fix ASM_OUTPUT_DEF

login
register
mail settings
Submitter Tristan Gingold
Date Nov. 4, 2011, 1:42 p.m.
Message ID <D71A1863-13DB-4D56-BC33-0B6CF1D3B55F@adacore.com>
Download mbox | patch
Permalink /patch/123634/
State New
Headers show

Comments

Tristan Gingold - Nov. 4, 2011, 1:42 p.m.
Hi,

silently switching section without calling switch_to_section is evil, and even more when this is not necessary.

Fixed by this patch.

Tristan.

2011-11-04  Tristan Gingold  <gingold@adacore.com>

	* config/alpha/vms.h (ASM_OUTPUT_DEF): Do not switch section.

Patch

Index: config/alpha/vms.h
===================================================================
--- config/alpha/vms.h	(revision 180946)
+++ config/alpha/vms.h	(working copy)
@@ -236,15 +236,16 @@ 
 /* Switch into a generic section.  */
 #define TARGET_ASM_NAMED_SECTION vms_asm_named_section
 
-#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)				\
-  do {	fprintf ((FILE), "\t.literals\n");				\
-	in_section = NULL;						\
-	fprintf ((FILE), "\t");						\
-	assemble_name (FILE, LABEL1);					\
-	fprintf (FILE, " = ");						\
-	assemble_name (FILE, LABEL2);					\
-	fprintf (FILE, "\n");						\
-  } while (0)
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)      \
+  do                                            \
+    {                                           \
+      fprintf ((FILE), "\t");                   \
+      assemble_name (FILE, LABEL1);             \
+      fprintf (FILE, " = ");                    \
+      assemble_name (FILE, LABEL2);             \
+      fprintf (FILE, "\n");                     \
+    }                                           \
+ while (0)
 
 #undef PREFERRED_DEBUGGING_TYPE
 #define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG