diff mbox

[Cilkplus] Fix a 2.21 assembler bug

Message ID BF230D13CA30DD48930C31D40993300007FB04@FMSMSX102.amr.corp.intel.com
State New
Headers show

Commit Message

Iyer, Balaji V April 23, 2012, 7:08 p.m. UTC
Hello Everyone,
   This patch is for the Cilkplus branch affecting the C and C++ compilers. This patch fixes a bug that occurs when low-cost annotations is enabled. The bug only occurs when the user is using an assembler later than 2.20.

Thanks,

Balaji V. Iyer.
diff mbox

Patch

Index: gcc/final.c
===================================================================
--- gcc/final.c	(revision 186712)
+++ gcc/final.c	(working copy)
@@ -4327,11 +4327,15 @@ 
      Otherwise it's not strictly necessary, but it doesn't hurt either.  */
   output_function_exception_table (fnname);
 
+  assemble_end_function (current_function_decl, fnname);
+
+  /* We output the ZCA information after the end function so that the function
+     specific information such as .size are all together with the function.
+     The metadata is a separate section so it wont interfere with things inside
+     the function. */
   if (flag_enable_cilk)
     cilk_output_metadata ();
 
-  assemble_end_function (current_function_decl, fnname);
-
   user_defined_section_attribute = false;
 
   /* Free up reg info memory.  */
Index: gcc/ChangeLog.cilk
===================================================================
--- gcc/ChangeLog.cilk	(revision 186712)
+++ gcc/ChangeLog.cilk	(working copy)
@@ -1,3 +1,8 @@ 
+2012-04-20  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+	* final.c (rest_of_handle_final): Moved outputing ZCA data after
+	assembling end function.
+
 2012-04-16  Balaji V. Iyer  <balaji.v.iyer@intel.com>
 
 	* elem-function.c (is_elem_fn): Changed the parameter type from a