public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
@ 2024-01-04 0:59 hp at gcc dot gnu.org
2024-01-04 16:08 ` [Bug testsuite/113226] " ppalka at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: hp at gcc dot gnu.org @ 2024-01-04 0:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
Bug ID: 113226
Summary: [14 Regression]
testsuite/std/ranges/iota/max_size_type.cc fails for
cris-elf after r14-6888-ga138b99646a555
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: hp at gcc dot gnu.org
Target Milestone: ---
After r14-6888-ga138b99646a555, I see, for cris-elf (32-bit target, no 128bit):
FAIL: std/ranges/iota/max_size_type.cc -std=gnu++20 execution test
FAIL: std/ranges/iota/max_size_type.cc -std=gnu++26 execution test
And in the .log:
spawn cris-elf-run ./max_size_type.exe^
Inconsistency found: 1 0 -100 -100^
/x/gcc/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc:246: void
test02() [with bool signed_p = true; bool shorten_p = false]: Assertion '0'
failed.
program stopped with signal 6 (Aborted).
FAIL: std/ranges/iota/max_size_type.cc -std=gnu++20 execution test
Changing all s/ok &=/VERIFY/ (plus adding one level of parentheses to one of
the lines) show:
/x/gcc/libstdc++-v3/testsuite/std/ranges/iota/max_size_type.cc:217: void
test02() [with bool signed_p = true; bool shorten_p = false]: Assertion 'i*j ==
shorten_type(max_type(i)*j)' failed.
program stopped with signal 6 (Aborted).
Further instrumentation, adding among other lines:
```
if (signed_p && ! shorten_p)
std::cerr << "j == " << int64_t(j) << std::endl;
if (!(i*j == shorten_type(max_type(i)*j)))
{
std::cerr << "i == " << int64_t(i) << ", j == " << j << ", i*j ==
" << int64_t(i*j) << ", max_type(i) == \
" << int64_t(max_type(i));
std::cerr << ", max_type(i)*j == " << int64_t(max_type(i)*j) <<
std::endl;
}
'''
shows that this is (see above for template parameters):
i == 1, j == -100, i*j == 4294967196, max_type(i) == 1, max_type(i)*j == -100
and that large number is as you might guess, (unsigned) -100.
Not sure if this is a bug in the testcase or elsewhere, but I'll start my
guessing with testsuite.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/113226] [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
@ 2024-01-04 16:08 ` ppalka at gcc dot gnu.org
2024-01-04 16:58 ` ppalka at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-04 16:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Huh, how bizarre.
> i == 1, j == -100, i*j == 4294967196, max_type(i) == 1, max_type(i)*j == -100
Here i and j are just ordinary 'long long', so I don't get why i*j is
4294967196 instead of -100?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/113226] [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
2024-01-04 16:08 ` [Bug testsuite/113226] " ppalka at gcc dot gnu.org
@ 2024-01-04 16:58 ` ppalka at gcc dot gnu.org
2024-01-04 17:57 ` hp at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-04 16:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #1)
> Huh, how bizarre.
>
> > i == 1, j == -100, i*j == 4294967196, max_type(i) == 1, max_type(i)*j == -100
>
> Here i and j are just ordinary 'long long', so I don't get why i*j is
> 4294967196 instead of -100?
Everything else, in particular that int64_t(max_type(i)*j) is -100, seems
correct/expected to me. FWIW that expression computes the product of the
corresponding promoted/sign-extended 65-bit precision values, and the overall
check is analogous to
int32_t i = 1, j = -100;
assert (int64_t(i*j) == int64_t(i)*j);
except the two precisions are 64/65 bits instead of 32/64 bits.
(When shorten_p is true, the overall check is analogous to
assert (i*j == int32_t(int64_t(i)*j)) instead.)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/113226] [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
2024-01-04 16:08 ` [Bug testsuite/113226] " ppalka at gcc dot gnu.org
2024-01-04 16:58 ` ppalka at gcc dot gnu.org
@ 2024-01-04 17:57 ` hp at gcc dot gnu.org
2024-01-08 14:44 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hp at gcc dot gnu.org @ 2024-01-04 17:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #1)
> Huh, how bizarre.
Indeed. I'm *not* ruling out an actual gcc bug. Whether in the target or
middle-end this time I dare not guess; too few posts.
JFTR; I already mentioned this in the gcc-patches post: I see only posts on
gcc-testresults@ that include r14-6888-ga138b99646a555 for 64-bit-targets with
"-m32" multilibs, and I don't trust them to treat that hw_type the same.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug testsuite/113226] [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
` (2 preceding siblings ...)
2024-01-04 17:57 ` hp at gcc dot gnu.org
@ 2024-01-08 14:44 ` rguenth at gcc dot gnu.org
2024-01-08 22:13 ` [Bug target/113226] " hp at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-08 14:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/113226] [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
` (3 preceding siblings ...)
2024-01-08 14:44 ` rguenth at gcc dot gnu.org
@ 2024-01-08 22:13 ` hp at gcc dot gnu.org
2024-03-04 4:19 ` law at gcc dot gnu.org
2024-05-07 7:43 ` [Bug target/113226] [14/15 " rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: hp at gcc dot gnu.org @ 2024-01-08 22:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|testsuite |target
--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Hans-Peter Nilsson from comment #3)
> (In reply to Patrick Palka from comment #1)
> > Huh, how bizarre.
>
> Indeed. I'm *not* ruling out an actual gcc bug. Whether in the target or
> middle-end this time I dare not guess; too few posts.
I don't see this FAIL for m68k-unknown-linux-gnu in
https://gcc.gnu.org/pipermail/gcc-testresults/2024-January/804595.html so let's
change to target component.
I'll see if I can revive one of the other *-elf toolchains to the point where
the libstdc++-v3 tests are useful before digging in. (But also subject to
other priorities and unfortunately not among the highest.)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/113226] [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
` (4 preceding siblings ...)
2024-01-08 22:13 ` [Bug target/113226] " hp at gcc dot gnu.org
@ 2024-03-04 4:19 ` law at gcc dot gnu.org
2024-05-07 7:43 ` [Bug target/113226] [14/15 " rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-04 4:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
Priority|P3 |P4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/113226] [14/15 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
` (5 preceding siblings ...)
2024-03-04 4:19 ` law at gcc dot gnu.org
@ 2024-05-07 7:43 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-07 7:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113226
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|14.0 |14.2
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 14.1 is being released, retargeting bugs to GCC 14.2.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-05-07 7:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04 0:59 [Bug testsuite/113226] New: [14 Regression] testsuite/std/ranges/iota/max_size_type.cc fails for cris-elf after r14-6888-ga138b99646a555 hp at gcc dot gnu.org
2024-01-04 16:08 ` [Bug testsuite/113226] " ppalka at gcc dot gnu.org
2024-01-04 16:58 ` ppalka at gcc dot gnu.org
2024-01-04 17:57 ` hp at gcc dot gnu.org
2024-01-08 14:44 ` rguenth at gcc dot gnu.org
2024-01-08 22:13 ` [Bug target/113226] " hp at gcc dot gnu.org
2024-03-04 4:19 ` law at gcc dot gnu.org
2024-05-07 7:43 ` [Bug target/113226] [14/15 " rguenth at gcc dot gnu.org
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).