+2014-02-13 Dominik Vogt <vogt@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).
+
2014-02-12 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
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;
}
}
+2014-02-13 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * gcc.target/s390/hotpatch-compile-8.c: New test.
+
2014-02-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/20140212-1.c: New test.
--- /dev/null
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch" } */
+
+#include <stdio.h>
+
+int hp1(void)
+{
+ int nested1(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
+ { return 1; }
+
+ __attribute__ ((hotpatch))
+ int nested2(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
+ { return 1; }
+
+ return nested1() - nested2();
+}
+
+int main (void)
+{
+ return hp1();
+}