aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2022-10-05 11:15:36 +0200
committerMartin Liska <mliska@suse.cz>2022-10-07 15:46:30 +0200
commit1a308905c1baf64d0ea4d09d7d92b55e79a2a339 (patch)
treee549294a5e42a24d75db24c9b32e25d17a03dadd /gcc/testsuite
parentedbb2551d156d69a2e337dcd8daa69f2680d57ea (diff)
downloadgcc-1a308905c1baf64d0ea4d09d7d92b55e79a2a339.zip
gcc-1a308905c1baf64d0ea4d09d7d92b55e79a2a339.tar.gz
gcc-1a308905c1baf64d0ea4d09d7d92b55e79a2a339.tar.bz2
IPA: support -flto + -flive-patching=inline-clone
There's no fundamental reason why -flive-patching=inline-clone can't coexist with -flto. Yes, one can theoretically have many more clone function that includes a live patch. It is pretty much the same as in-module inlining. gcc/ChangeLog: * opts.cc (finish_options): Print sorry message only for -flive-patching=inline-only-static. gcc/testsuite/ChangeLog: * gcc.dg/live-patching-2.c: Update scanned pattern. * gcc.dg/live-patching-5.c: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.dg/live-patching-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/live-patching-5.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/live-patching-2.c b/gcc/testsuite/gcc.dg/live-patching-2.c
index 0dde4e9..1c4f922 100644
--- a/gcc/testsuite/gcc.dg/live-patching-2.c
+++ b/gcc/testsuite/gcc.dg/live-patching-2.c
@@ -1,10 +1,10 @@
/* { dg-do compile } */
/* { dg-require-effective-target lto } */
-/* { dg-options "-O2 -flive-patching -flto" } */
+/* { dg-options "-O2 -flive-patching=inline-only-static -flto" } */
int main()
{
return 0;
}
-/* { dg-message "sorry, unimplemented: live patching is not supported with LTO" "-flive-patching and -flto together" { target *-*-* } 0 } */
+/* { dg-message "sorry, unimplemented: live patching \\(with 'inline-only-static'\\) is not supported with LTO" "-flive-patching and -flto together" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/live-patching-5.c b/gcc/testsuite/gcc.dg/live-patching-5.c
new file mode 100644
index 0000000..098047a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/live-patching-5.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lto } */
+/* { dg-options "-O2 -flive-patching -flto" } */
+
+int main()
+{
+ return 0;
+}