public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] S390: Add test for hotpatching of nested functions
@ 2014-02-13  7:00 Dominik Vogt
  2014-02-13 12:40 ` Andreas Krebbel
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Vogt @ 2014-02-13  7:00 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andreas Krebbel

[-- Attachment #1: Type: text/plain, Size: 185 bytes --]

This patch adds a s390 specific test that verifies that
hotpatching of nested functions is not supported and generates a
warning.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany

[-- Attachment #2: 0001-S390-Add-test-for-hotpatching-of-nested-functions.patch --]
[-- Type: text/x-diff, Size: 1236 bytes --]

From ae383db14eb5a9035603e7c80126470389ea8029 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@de.ibm.com>
Date: Thu, 13 Feb 2014 06:57:14 +0000
Subject: [PATCH 1/2] S390: Add test for hotpatching of nested functions.

(Must generate a warning that it's not supported.)
---
 gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c

diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c
new file mode 100644
index 0000000..489fc5d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c
@@ -0,0 +1,23 @@
+/* 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();
+}
-- 
1.8.3.1


[-- Attachment #3: ChangeLog --]
[-- Type: text/plain, Size: 103 bytes --]

2014-02-13  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	* gcc.target/s390/hotpatch-compile-8.c: New test

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] S390: Add test for hotpatching of nested functions
  2014-02-13  7:00 [PATCH] S390: Add test for hotpatching of nested functions Dominik Vogt
@ 2014-02-13 12:40 ` Andreas Krebbel
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Krebbel @ 2014-02-13 12:40 UTC (permalink / raw)
  To: Dominik Vogt; +Cc: gcc-patches

> 2014-02-13  Dominik Vogt  <vogt@linux.vnet.ibm.com>
> 
> 	* gcc.target/s390/hotpatch-compile-8.c: New test

Ok committed.  Thanks!

-Andreas-

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-13 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13  7:00 [PATCH] S390: Add test for hotpatching of nested functions Dominik Vogt
2014-02-13 12:40 ` Andreas Krebbel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).