* [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
@ 2023-02-27 9:52 Jonathan Yong
2023-02-27 16:51 ` Richard Sandiford
2023-02-28 3:06 ` Hans-Peter Nilsson
0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Yong @ 2023-02-27 9:52 UTC (permalink / raw)
To: Gcc Patch List
[-- Attachment #1: Type: text/plain, Size: 56 bytes --]
This test is for LP64 only, exclude LLP64 too.
Patch OK?
[-- Attachment #2: 0001-gcc.dg-overflow-warn-9.c-exclude-from-LLP64.patch --]
[-- Type: text/x-patch, Size: 1866 bytes --]
From fbc83ae10df1a0e10c302fb0fee13092eb65818e Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Mon, 27 Feb 2023 09:49:31 +0000
Subject: [PATCH] gcc.dg/overflow-warn-9.c: exclude from LLP64
gcc/testsuite/ChangeLog:
* gcc.dg/overflow-warn-9.c: Exclude from LLP64.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
gcc/testsuite/gcc.dg/overflow-warn-9.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c
index 57c0f17bc91..012892dd343 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-9.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c
@@ -59,7 +59,7 @@ const struct Types t1 = {
.ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
.ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
- .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */
- /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
+ .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
+ /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "not-lp64" { target { ! lp64 } } .-1 } */
.ul = ULONG_MAX + 1LU /* there should be some warning here */
};
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-02-27 9:52 [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64 Jonathan Yong
@ 2023-02-27 16:51 ` Richard Sandiford
2023-02-28 3:06 ` Hans-Peter Nilsson
1 sibling, 0 replies; 8+ messages in thread
From: Richard Sandiford @ 2023-02-27 16:51 UTC (permalink / raw)
To: Jonathan Yong via Gcc-patches; +Cc: Jonathan Yong
Jonathan Yong via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> This test is for LP64 only, exclude LLP64 too.
> Patch OK?
OK, thanks.
Richard
> From fbc83ae10df1a0e10c302fb0fee13092eb65818e Mon Sep 17 00:00:00 2001
> From: Jonathan Yong <10walls@gmail.com>
> Date: Mon, 27 Feb 2023 09:49:31 +0000
> Subject: [PATCH] gcc.dg/overflow-warn-9.c: exclude from LLP64
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/overflow-warn-9.c: Exclude from LLP64.
>
> Signed-off-by: Jonathan Yong <10walls@gmail.com>
> ---
> gcc/testsuite/gcc.dg/overflow-warn-9.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c
> index 57c0f17bc91..012892dd343 100644
> --- a/gcc/testsuite/gcc.dg/overflow-warn-9.c
> +++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c
> @@ -59,7 +59,7 @@ const struct Types t1 = {
> .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
> .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
>
> - .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */
> - /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
> + .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
> + /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "not-lp64" { target { ! lp64 } } .-1 } */
> .ul = ULONG_MAX + 1LU /* there should be some warning here */
> };
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-02-27 9:52 [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64 Jonathan Yong
2023-02-27 16:51 ` Richard Sandiford
@ 2023-02-28 3:06 ` Hans-Peter Nilsson
2023-02-28 10:30 ` Jonathan Yong
1 sibling, 1 reply; 8+ messages in thread
From: Hans-Peter Nilsson @ 2023-02-28 3:06 UTC (permalink / raw)
To: Jonathan Yong; +Cc: Gcc Patch List
On Mon, 27 Feb 2023, Jonathan Yong via Gcc-patches wrote:
> This test is for LP64 only, exclude LLP64 too.
> Patch OK?
I may be confused, but you're not making use of the "llp64"
effective target, there instead excluding/including lp64 /
ilp32 in sets that not obviously mean "exclude LLP64".
To wit, how is "! ilp32" -> "lp64" and "ilp32" -> "! lp64"
expressing "! llp64"?
brgds, H-P
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-02-28 3:06 ` Hans-Peter Nilsson
@ 2023-02-28 10:30 ` Jonathan Yong
2023-03-01 0:15 ` Hans-Peter Nilsson
2023-03-02 10:44 ` Richard Sandiford
0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Yong @ 2023-02-28 10:30 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: Gcc Patch List
[-- Attachment #1: Type: text/plain, Size: 508 bytes --]
On 2/28/23 03:06, Hans-Peter Nilsson wrote:
>
> On Mon, 27 Feb 2023, Jonathan Yong via Gcc-patches wrote:
>
>> This test is for LP64 only, exclude LLP64 too.
>> Patch OK?
>
> I may be confused, but you're not making use of the "llp64"
> effective target, there instead excluding/including lp64 /
> ilp32 in sets that not obviously mean "exclude LLP64".
>
> To wit, how is "! ilp32" -> "lp64" and "ilp32" -> "! lp64"
> expressing "! llp64"?
>
> brgds, H-P
Attached new version, hopefully it is clearer.
[-- Attachment #2: 0005-gcc.dg-overflow-warn-9.c-Fix-LLP64.patch --]
[-- Type: text/x-patch, Size: 1847 bytes --]
From 91102d00dc701a65dfac5820a2bc57e1e4bed5b2 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Mon, 27 Feb 2023 09:49:31 +0000
Subject: [PATCH 5/7] gcc.dg/overflow-warn-9.c: Fix LLP64
gcc/testsuite/ChangeLog:
* gcc.dg/overflow-warn-9.c: Add LLP64 case.
Signed-off-by: Jonathan Yong <10walls@gmail.com>
---
gcc/testsuite/gcc.dg/overflow-warn-9.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c
index 57c0f17bc91..ae588bd8491 100644
--- a/gcc/testsuite/gcc.dg/overflow-warn-9.c
+++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c
@@ -59,7 +59,8 @@ const struct Types t1 = {
.ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
.ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
- .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */
+ .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
/* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
+ /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "llp64" { target llp64 } .-2 } */
.ul = ULONG_MAX + 1LU /* there should be some warning here */
};
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-02-28 10:30 ` Jonathan Yong
@ 2023-03-01 0:15 ` Hans-Peter Nilsson
2023-03-02 10:44 ` Richard Sandiford
1 sibling, 0 replies; 8+ messages in thread
From: Hans-Peter Nilsson @ 2023-03-01 0:15 UTC (permalink / raw)
To: Jonathan Yong; +Cc: Gcc Patch List
On Tue, 28 Feb 2023, Jonathan Yong wrote:
> On 2/28/23 03:06, Hans-Peter Nilsson wrote:
> >
> > On Mon, 27 Feb 2023, Jonathan Yong via Gcc-patches wrote:
> >
> > > This test is for LP64 only, exclude LLP64 too.
> > > Patch OK?
> >
> > I may be confused, but you're not making use of the "llp64"
> > effective target, there instead excluding/including lp64 /
> > ilp32 in sets that not obviously mean "exclude LLP64".
> >
> > To wit, how is "! ilp32" -> "lp64" and "ilp32" -> "! lp64"
> > expressing "! llp64"?
> >
> > brgds, H-P
>
> Attached new version, hopefully it is clearer.
>
Yes, thank you! (Not an approver; not an approval.)
brgds, H-P
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-02-28 10:30 ` Jonathan Yong
2023-03-01 0:15 ` Hans-Peter Nilsson
@ 2023-03-02 10:44 ` Richard Sandiford
2023-03-02 13:42 ` Jonathan Yong
1 sibling, 1 reply; 8+ messages in thread
From: Richard Sandiford @ 2023-03-02 10:44 UTC (permalink / raw)
To: Jonathan Yong via Gcc-patches; +Cc: Hans-Peter Nilsson, Jonathan Yong
Jonathan Yong via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> On 2/28/23 03:06, Hans-Peter Nilsson wrote:
>>
>> On Mon, 27 Feb 2023, Jonathan Yong via Gcc-patches wrote:
>>
>>> This test is for LP64 only, exclude LLP64 too.
>>> Patch OK?
>>
>> I may be confused, but you're not making use of the "llp64"
>> effective target, there instead excluding/including lp64 /
>> ilp32 in sets that not obviously mean "exclude LLP64".
>>
>> To wit, how is "! ilp32" -> "lp64" and "ilp32" -> "! lp64"
>> expressing "! llp64"?
>>
>> brgds, H-P
>
> Attached new version, hopefully it is clearer.
>
> From 91102d00dc701a65dfac5820a2bc57e1e4bed5b2 Mon Sep 17 00:00:00 2001
> From: Jonathan Yong <10walls@gmail.com>
> Date: Mon, 27 Feb 2023 09:49:31 +0000
> Subject: [PATCH 5/7] gcc.dg/overflow-warn-9.c: Fix LLP64
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/overflow-warn-9.c: Add LLP64 case.
>
> Signed-off-by: Jonathan Yong <10walls@gmail.com>
> ---
> gcc/testsuite/gcc.dg/overflow-warn-9.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c
> index 57c0f17bc91..ae588bd8491 100644
> --- a/gcc/testsuite/gcc.dg/overflow-warn-9.c
> +++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c
> @@ -59,7 +59,8 @@ const struct Types t1 = {
> .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
> .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
>
> - .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */
> + .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
> /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
> + /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "llp64" { target llp64 } .-2 } */
> .ul = ULONG_MAX + 1LU /* there should be some warning here */
> };
OK, although in general I think would be good to use
{ target { ilp32 || llp64 } } for this kind of thing.
No need to change this patch though, just saying for the future.
Thanks,
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-03-02 10:44 ` Richard Sandiford
@ 2023-03-02 13:42 ` Jonathan Yong
2023-03-02 13:55 ` Richard Sandiford
0 siblings, 1 reply; 8+ messages in thread
From: Jonathan Yong @ 2023-03-02 13:42 UTC (permalink / raw)
To: Jonathan Yong via Gcc-patches, Hans-Peter Nilsson, richard.sandiford
On 3/2/23 10:44, Richard Sandiford wrote:
>> diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c
>> index 57c0f17bc91..ae588bd8491 100644
>> --- a/gcc/testsuite/gcc.dg/overflow-warn-9.c
>> +++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c
>> @@ -59,7 +59,8 @@ const struct Types t1 = {
>> .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
>> .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
>>
>> - .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */
>> + .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
>> /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
>> + /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "llp64" { target llp64 } .-2 } */
>> .ul = ULONG_MAX + 1LU /* there should be some warning here */
>> };
>
> OK, although in general I think would be good to use
> { target { ilp32 || llp64 } } for this kind of thing.
>
> No need to change this patch though, just saying for the future.
>
Thanks for reviewing, how does the "ilp32" or "llp64" before the curly
target brackets work?
Pushed existing patch to master branch.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64
2023-03-02 13:42 ` Jonathan Yong
@ 2023-03-02 13:55 ` Richard Sandiford
0 siblings, 0 replies; 8+ messages in thread
From: Richard Sandiford @ 2023-03-02 13:55 UTC (permalink / raw)
To: Jonathan Yong; +Cc: Jonathan Yong via Gcc-patches, Hans-Peter Nilsson
Jonathan Yong <10walls@gmail.com> writes:
> On 3/2/23 10:44, Richard Sandiford wrote:
>>> diff --git a/gcc/testsuite/gcc.dg/overflow-warn-9.c b/gcc/testsuite/gcc.dg/overflow-warn-9.c
>>> index 57c0f17bc91..ae588bd8491 100644
>>> --- a/gcc/testsuite/gcc.dg/overflow-warn-9.c
>>> +++ b/gcc/testsuite/gcc.dg/overflow-warn-9.c
>>> @@ -59,7 +59,8 @@ const struct Types t1 = {
>>> .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
>>> .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
>>>
>>> - .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "not-ilp32" { target { ! ilp32 } } } */
>>> + .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
>>> /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
>>> + /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "llp64" { target llp64 } .-2 } */
>>> .ul = ULONG_MAX + 1LU /* there should be some warning here */
>>> };
>>
>> OK, although in general I think would be good to use
>> { target { ilp32 || llp64 } } for this kind of thing.
>>
>> No need to change this patch though, just saying for the future.
>>
>
> Thanks for reviewing, how does the "ilp32" or "llp64" before the curly
> target brackets work?
That's just a free-form string, to make the test name unique.
Richard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-03-02 13:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 9:52 [Patch] gcc.dg/overflow-warn-9.c: exclude from LLP64 Jonathan Yong
2023-02-27 16:51 ` Richard Sandiford
2023-02-28 3:06 ` Hans-Peter Nilsson
2023-02-28 10:30 ` Jonathan Yong
2023-03-01 0:15 ` Hans-Peter Nilsson
2023-03-02 10:44 ` Richard Sandiford
2023-03-02 13:42 ` Jonathan Yong
2023-03-02 13:55 ` Richard Sandiford
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).