On Wed, Feb 12, 2014 at 11:30:30AM +0100, Dominik Vogt wrote:
> On Wed, Feb 12, 2014 at 11:28:38AM +0100, Dominik Vogt wrote:
> > The attached patch fixes a crash if gfortran encounters a nested
> > function when -mhotpatch is enabled.  (It slightly improves the
> > warning message too.)
> > 
> > This patch affects s390 only.  Andreas Krebbel will commit the
> > patch soon, if there are no objections.
> 
> Same patch for gcc-4.8.

Patch updated according to Richard's suggestion in the 4.9 thread.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany
>From 81264c60640ae4b61cc7fa0129857ca3b3d253e8 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <v...@de.ibm.com>
Date: Wed, 12 Feb 2014 05:53:34 +0000
Subject: [PATCH 1/2] S390: Fix crash when -mhotpatch encounters nested
 functions

(e.g. with gfortran).
---
 gcc/config/s390/s390.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 2ba1d8a..6612bf9 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -5475,9 +5475,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname,
       if (hotpatch_trampoline_halfwords >= 0
 	  && decl_function_context (decl) != NULL_TREE)
 	{
-	  warning_at (0, DECL_SOURCE_LOCATION (decl),
-		      "hotpatch_prologue is not compatible with nested"
-		      " function");
+	  warning_at (DECL_SOURCE_LOCATION (decl), OPT_mhotpatch,
+		      "hotpatching is not compatible with nested functions");
 	  hotpatch_trampoline_halfwords = -1;
 	}
     }
-- 
1.8.3.1

2014-02-12  Dominik Vogt  <v...@linux.vnet.ibm.com>

        * config/s390/s390.c (s390_asm_output_function_label):
        fix crash caused by bad second argument to warning_at() with -mhotpatch
        and nested functions (e.g. with gfortran)

Reply via email to