This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix misuse of always_inline attribute in 3 hotpatch tests


Hi!

always_inline attribute is meaningful only for functions declared
inline, and the compiler even warns about this, so it is unclear
to me why the tests are attempting to use that.

2015-06-01  Jakub Jelinek  <jakub@redhat.com>

	* gcc.target/s390/hotpatch-compile-15.c: Remove dg-prune-output
	directives.
	(hp3, hp4): Add inline keyword.
	* gcc.target/s390/hotpatch-19.c: Remove dg-prune-output directive.
	(hp2): Add inline keyword.
	* gcc.target/s390/hotpatch-19.c: Remove dg-prune-output directives.
	(hp2): Add inline keyword.

--- gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c.jj	2015-01-28 08:39:51.000000000 +0100
+++ gcc/testsuite/gcc.target/s390/hotpatch-compile-15.c	2015-06-01 10:34:23.031252383 +0200
@@ -3,9 +3,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O3 -mzarch" } */
 
-/* { dg-prune-output "always_inline function might not be inlinable" } */
-/* { dg-prune-output "called from here" } */
-
 #include <stdio.h>
 
 __attribute__ ((hotpatch(1,2)))
@@ -22,14 +19,14 @@ static inline void hp2(void)
 
 __attribute__ ((hotpatch(0,0)))
 __attribute__ ((always_inline))
-static void hp3(void)
+static inline void hp3(void)
 {
   printf("hello, world!\n");
 }
 
 __attribute__ ((hotpatch(1,2)))
 __attribute__ ((always_inline))
-static void hp4(void)
+static inline void hp4(void)
 {
   printf("hello, world!\n");
 }
--- gcc/testsuite/gcc.target/s390/hotpatch-19.c.jj	2015-06-01 09:53:36.000000000 +0200
+++ gcc/testsuite/gcc.target/s390/hotpatch-19.c	2015-06-01 10:34:44.153923362 +0200
@@ -5,9 +5,8 @@
 
 #include <stdio.h>
 
-/* { dg-prune-output "always_inline function might not be inlinable" } */
 __attribute__ ((always_inline))
-static void hp2(void)
+static inline void hp2(void)
 {
   printf("hello, world!\n");
 }
--- gcc/testsuite/gcc.target/s390/hotpatch-20.c.jj	2015-06-01 09:53:36.000000000 +0200
+++ gcc/testsuite/gcc.target/s390/hotpatch-20.c	2015-06-01 10:35:02.906631258 +0200
@@ -5,15 +5,13 @@
 
 #include <stdio.h>
 
-/* { dg-prune-output "always_inline function might not be inlinable" } */
 __attribute__ ((hotpatch(1,2)))
 __attribute__ ((always_inline))
-static void hp2(void)
+static inline void hp2(void)
 {
   printf("hello, world!\n");
 }
 
-/* { dg-prune-output "called from here" } */
 void hp1(void)
 {
   hp2();

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]