[testsuite] require profiling for -pg

Message ID orv8gipaox.fsf@lxoliva.fsfla.org
State Accepted
Headers
Series [testsuite] require profiling for -pg |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Alexandre Oliva May 24, 2023, 5:20 a.m. UTC
  Fix two tests that use -pg but don't declare their requirement for
profiling support.

Bootstrapped on x86_64-linux-gnu.  Also tested on ppc- and x86-vx7r2
with gcc-12.

for  gcc/testsuite/ChangeLog

	* gcc.target/i386/mcount_pic.c: Add dg-require-profiling.
	* gcc.target/i386/pr104447: Likewise.
---
 gcc/testsuite/gcc.target/i386/mcount_pic.c |    1 +
 gcc/testsuite/gcc.target/i386/pr104447.c   |    1 +
 2 files changed, 2 insertions(+)
  

Comments

Richard Biener May 24, 2023, 9:03 a.m. UTC | #1
On Wed, May 24, 2023 at 7:21 AM Alexandre Oliva via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
> Fix two tests that use -pg but don't declare their requirement for
> profiling support.
>
> Bootstrapped on x86_64-linux-gnu.  Also tested on ppc- and x86-vx7r2
> with gcc-12.

OK.

> for  gcc/testsuite/ChangeLog
>
>         * gcc.target/i386/mcount_pic.c: Add dg-require-profiling.
>         * gcc.target/i386/pr104447: Likewise.
> ---
>  gcc/testsuite/gcc.target/i386/mcount_pic.c |    1 +
>  gcc/testsuite/gcc.target/i386/pr104447.c   |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/gcc/testsuite/gcc.target/i386/mcount_pic.c b/gcc/testsuite/gcc.target/i386/mcount_pic.c
> index 5546933d1946d..732be66b7b33d 100644
> --- a/gcc/testsuite/gcc.target/i386/mcount_pic.c
> +++ b/gcc/testsuite/gcc.target/i386/mcount_pic.c
> @@ -3,6 +3,7 @@
>  /* { dg-do run } */
>  /* { dg-require-effective-target fpic } */
>  /* { dg-require-effective-target ia32 } */
> +/* { dg-require-profiling "-pg" } */
>  /* { dg-options "-O2 -fpic -pg -save-temps" } */
>
>  int main ()
> diff --git a/gcc/testsuite/gcc.target/i386/pr104447.c b/gcc/testsuite/gcc.target/i386/pr104447.c
> index bf11e8696e68f..cb618c7b8bb32 100644
> --- a/gcc/testsuite/gcc.target/i386/pr104447.c
> +++ b/gcc/testsuite/gcc.target/i386/pr104447.c
> @@ -1,4 +1,5 @@
>  /* { dg-do compile } */
> +/* { dg-require-profiling "-pg" } */
>  /* { dg-options "-O2 -pg" } */
>
>  int
>
> --
> Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
>    Free Software Activist                       GNU Toolchain Engineer
> Disinformation flourishes because many people care deeply about injustice
> but very few check the facts.  Ask me about <https://stallmansupport.org>
  

Patch

diff --git a/gcc/testsuite/gcc.target/i386/mcount_pic.c b/gcc/testsuite/gcc.target/i386/mcount_pic.c
index 5546933d1946d..732be66b7b33d 100644
--- a/gcc/testsuite/gcc.target/i386/mcount_pic.c
+++ b/gcc/testsuite/gcc.target/i386/mcount_pic.c
@@ -3,6 +3,7 @@ 
 /* { dg-do run } */
 /* { dg-require-effective-target fpic } */
 /* { dg-require-effective-target ia32 } */
+/* { dg-require-profiling "-pg" } */
 /* { dg-options "-O2 -fpic -pg -save-temps" } */
 
 int main ()
diff --git a/gcc/testsuite/gcc.target/i386/pr104447.c b/gcc/testsuite/gcc.target/i386/pr104447.c
index bf11e8696e68f..cb618c7b8bb32 100644
--- a/gcc/testsuite/gcc.target/i386/pr104447.c
+++ b/gcc/testsuite/gcc.target/i386/pr104447.c
@@ -1,4 +1,5 @@ 
 /* { dg-do compile } */
+/* { dg-require-profiling "-pg" } */
 /* { dg-options "-O2 -pg" } */
 
 int