public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] add test for PR 86058
@ 2021-04-13 19:49 Martin Sebor
  2021-04-14  8:11 ` Christophe Lyon
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Sebor @ 2021-04-13 19:49 UTC (permalink / raw)
  To: gcc-patches

The issue has been fixed so r11-8161 just adds the test case:
   https://gcc.gnu.org/g:8084ab15a3e300e3b2c537e56e0f3a1b00778aec

Martin

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

* Re: [committed] add test for PR 86058
  2021-04-13 19:49 [committed] add test for PR 86058 Martin Sebor
@ 2021-04-14  8:11 ` Christophe Lyon
  2021-04-14 16:49   ` Martin Sebor
  0 siblings, 1 reply; 5+ messages in thread
From: Christophe Lyon @ 2021-04-14  8:11 UTC (permalink / raw)
  To: Martin Sebor; +Cc: gcc-patches

On Tue, 13 Apr 2021 at 21:50, Martin Sebor via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> The issue has been fixed so r11-8161 just adds the test case:
>    https://gcc.gnu.org/g:8084ab15a3e300e3b2c537e56e0f3a1b00778aec
>

Hi,

This new test fails on arm (and aarch64 with -mabi=ilp32):
XFAIL: gcc.dg/pr86058.c pr????? (test for warnings, line 13)
FAIL: gcc.dg/pr86058.c actual (test for warnings, line 13)
PASS: gcc.dg/pr86058.c (test for excess errors)

Can you check?

Thanks

> Martin

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

* Re: [committed] add test for PR 86058
  2021-04-14  8:11 ` Christophe Lyon
@ 2021-04-14 16:49   ` Martin Sebor
  2021-04-14 17:50     ` Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Sebor @ 2021-04-14 16:49 UTC (permalink / raw)
  To: Christophe Lyon; +Cc: gcc-patches

On 4/14/21 2:11 AM, Christophe Lyon wrote:
> On Tue, 13 Apr 2021 at 21:50, Martin Sebor via Gcc-patches
> <gcc-patches@gcc.gnu.org> wrote:
>>
>> The issue has been fixed so r11-8161 just adds the test case:
>>     https://gcc.gnu.org/g:8084ab15a3e300e3b2c537e56e0f3a1b00778aec
>>
> 
> Hi,
> 
> This new test fails on arm (and aarch64 with -mabi=ilp32):
> XFAIL: gcc.dg/pr86058.c pr????? (test for warnings, line 13)
> FAIL: gcc.dg/pr86058.c actual (test for warnings, line 13)
> PASS: gcc.dg/pr86058.c (test for excess errors)
> 
> Can you check?

Apparently the IL GCC emits on some targets (arm and aarach64 with
mabi=ilp32, and powerpc64 to name the three where the failures have
been pointed out) isn't handled by the uninit pass and so it doesn't
issue the expected warning.  That might be a new (as in previously
unknown) limitation in the warning or one I don't remember coming
across.

I don't see excess warnings with my arm-eabi cross-compiler.  What
are they in your environment?

I have limited the test to just x86_64 for now and repurposed pr100073
where the same failure was reported on powerpc64 to track the missing
warning on these targets.

Martin

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

* Re: [committed] add test for PR 86058
  2021-04-14 16:49   ` Martin Sebor
@ 2021-04-14 17:50     ` Jakub Jelinek
  2021-04-15 12:10       ` [committed] testsuite: enable pr86058.c also on i?86-*-* [PR100073] Jakub Jelinek
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Jelinek @ 2021-04-14 17:50 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Christophe Lyon, gcc-patches

On Wed, Apr 14, 2021 at 10:49:42AM -0600, Martin Sebor via Gcc-patches wrote:
> Apparently the IL GCC emits on some targets (arm and aarach64 with
> mabi=ilp32, and powerpc64 to name the three where the failures have
> been pointed out) isn't handled by the uninit pass and so it doesn't
> issue the expected warning.  That might be a new (as in previously
> unknown) limitation in the warning or one I don't remember coming
> across.
> 
> I don't see excess warnings with my arm-eabi cross-compiler.  What
> are they in your environment?
> 
> I have limited the test to just x86_64 for now and repurposed pr100073
> where the same failure was reported on powerpc64 to track the missing
> warning on these targets.

+   The test fails on a number of non-x86_64 targets due to pr100073.
+   { dg-do compile { target x86_64-*-* } }

change is incorrect.
Either you mean x86_64 -m64 code only, then it should be
{ i?86-*-* x86_64-*-* } && lp64
or you mean x86_64 -m64/-mx32, then it should be
{ i?86-*-* x86_64-*-* } && { ! ia32 }
or you mean x86_64 -m64/-mx32/-m32, then it should be
{ i?86-*-* x86_64-*-* }
E.g. on Solaris target triplet is i?86-*-* but it supports -m64 also,
on the other side, x86_64-*-* triplet covers all supported multilibs
(so both -m64 and -m32 and sometimes -mx32), but will not cover
i686-*-* etc. even when it is the same thing as x86_64-*-* with -m32.

	Jakub


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

* [committed] testsuite: enable pr86058.c also on i?86-*-* [PR100073]
  2021-04-14 17:50     ` Jakub Jelinek
@ 2021-04-15 12:10       ` Jakub Jelinek
  0 siblings, 0 replies; 5+ messages in thread
From: Jakub Jelinek @ 2021-04-15 12:10 UTC (permalink / raw)
  To: Martin Sebor; +Cc: Christophe Lyon, gcc-patches

On Wed, Apr 14, 2021 at 07:50:37PM +0200, Jakub Jelinek wrote:
> On Wed, Apr 14, 2021 at 10:49:42AM -0600, Martin Sebor via Gcc-patches wrote:
> > Apparently the IL GCC emits on some targets (arm and aarach64 with
> > mabi=ilp32, and powerpc64 to name the three where the failures have
> > been pointed out) isn't handled by the uninit pass and so it doesn't
> > issue the expected warning.  That might be a new (as in previously
> > unknown) limitation in the warning or one I don't remember coming
> > across.
> > 
> > I don't see excess warnings with my arm-eabi cross-compiler.  What
> > are they in your environment?
> > 
> > I have limited the test to just x86_64 for now and repurposed pr100073
> > where the same failure was reported on powerpc64 to track the missing
> > warning on these targets.
> 
> +   The test fails on a number of non-x86_64 targets due to pr100073.
> +   { dg-do compile { target x86_64-*-* } }
> 
> change is incorrect.

I have tested it and the test works the same for -m64/-m32/-mx32, therefore
I chose:
> or you mean x86_64 -m64/-mx32/-m32, then it should be
> { i?86-*-* x86_64-*-* }

Tested on x86_64-linux and i686-linux, committed to trunk.

2021-04-15  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/100073
	* gcc.dg/pr86058.c: Enable also on i?86-*-*.

--- gcc/testsuite/gcc.dg/pr86058.c.jj	2021-04-15 10:40:33.449919170 +0200
+++ gcc/testsuite/gcc.dg/pr86058.c	2021-04-15 14:04:02.247335188 +0200
@@ -1,7 +1,7 @@
 /* PR middle-end/86058 - TARGET_MEM_REF causing incorrect message for
    -Wmaybe-uninitialized warning
-   The test fails on a number of non-x86_64 targets due to pr100073.
-   { dg-do compile { target x86_64-*-* } }
+   The test fails on a number of non-x86 targets due to pr100073.
+   { dg-do compile { target i?86-*-* x86_64-*-* } }
    { dg-options "-O2 -Wuninitialized -Wmaybe-uninitialized" } */
 
 extern void foo (int *);


	Jakub


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

end of thread, other threads:[~2021-04-15 12:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 19:49 [committed] add test for PR 86058 Martin Sebor
2021-04-14  8:11 ` Christophe Lyon
2021-04-14 16:49   ` Martin Sebor
2021-04-14 17:50     ` Jakub Jelinek
2021-04-15 12:10       ` [committed] testsuite: enable pr86058.c also on i?86-*-* [PR100073] Jakub Jelinek

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).