[testsuite,riscv] uninit-pred-9_b bogus warning

Message ID or5yeuyxdv.fsf@lxoliva.fsfla.org
State Committed
Commit cebd31757800158704d4a301076027df52418773
Headers
Series [testsuite,riscv] uninit-pred-9_b bogus warning |

Commit Message

Alexandre Oliva Dec. 2, 2022, 9:21 a.m. UTC
  Like other platforms, riscv hits the uninitialized warning because the
optimizations don't eliminate the nonviable path that would enable it
to be omitted.

Regstraped on x86_64-linux-gnu, also tested with crosses to riscv64-elf
and arm-eabi.  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.dg/uninit-pred-9_b.c: Add riscv*-*-* to the xfail list
	for the bogus warning.
---
 gcc/testsuite/gcc.dg/uninit-pred-9_b.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Kito Cheng Dec. 2, 2022, 9:37 a.m. UTC | #1
OK, thanks :)

On Fri, Dec 2, 2022 at 5:21 PM Alexandre Oliva via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
> Like other platforms, riscv hits the uninitialized warning because the
> optimizations don't eliminate the nonviable path that would enable it
> to be omitted.
>
> Regstraped on x86_64-linux-gnu, also tested with crosses to riscv64-elf
> and arm-eabi.  Ok to install?
>
>
> for  gcc/testsuite/ChangeLog
>
>         * gcc.dg/uninit-pred-9_b.c: Add riscv*-*-* to the xfail list
>         for the bogus warning.
> ---
>  gcc/testsuite/gcc.dg/uninit-pred-9_b.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
> index 53c4a5399eaa3..c8f427b12c0ab 100644
> --- a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
> +++ b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
> @@ -17,7 +17,7 @@ int foo (int n, int l, int m, int r)
>
>    if (l > 100)
>      if ( (n <= 9) &&  (m < 100)  && (r < 19) )
> -      blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail powerpc64*-*-* cris-*-* } } */
> +      blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail powerpc64*-*-* cris-*-* riscv*-*-* } } */
>
>    if ( (n <= 8) &&  (m < 99)  && (r < 19) )
>        blah(v); /* { dg-bogus "uninitialized" "pr101674" { xfail mmix-*-* } } */
> --
> 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.dg/uninit-pred-9_b.c b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
index 53c4a5399eaa3..c8f427b12c0ab 100644
--- a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
+++ b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
@@ -17,7 +17,7 @@  int foo (int n, int l, int m, int r)
 
   if (l > 100)
     if ( (n <= 9) &&  (m < 100)  && (r < 19) )
-      blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail powerpc64*-*-* cris-*-* } } */
+      blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail powerpc64*-*-* cris-*-* riscv*-*-* } } */
 
   if ( (n <= 8) &&  (m < 99)  && (r < 19) )
       blah(v); /* { dg-bogus "uninitialized" "pr101674" { xfail mmix-*-* } } */