You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tested where begin() and end() of each span was pointing to - they point at the same addresses, so even when size is incorrectly reported as 0, begin() and end() works fine.
I am aware that gcc >= 6 is not listed in supported platforms, so please close this issue if it is irrelevant.
For reference, after stripping down this snippet it turns out to be a gcc bug [1], affecting compiler versions from 6.1.0 onwards.
So, this issue can be closed or left open for future reference.
However, I tried and GSL tests passed successfully at gcc-6.3.0 on both Debug and Release targets.
Maybe it could be worth having test checking for this condition, so when the test pass we know that this is fixed? I could submit a PR if you think that would be valuable contribution.
As a follow-up: this turned out to be a gcc bug, affecting every version above 5.4 - [1].
This bug was fixed now in the trunk, fixing this test case as well - [2]. Target milestone for gcc is 6.5.
Daniel599 You can ifdef the test out based on gcc versions, only for the versions that fail, or better change the tests to expect failure for those versions, with a comment that this is a gcc bug
Activity
ggajoch commentedon Nov 24, 2017
For reference, after stripping down this snippet it turns out to be a gcc bug [1], affecting compiler versions from 6.1.0 onwards.
So, this issue can be closed or left open for future reference.
However, I tried and GSL tests passed successfully at gcc-6.3.0 on both
DebugandReleasetargets.Maybe it could be worth having test checking for this condition, so when the test pass we know that this is fixed? I could submit a PR if you think that would be valuable contribution.
[1] - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83116
neilmacintosh commentedon Dec 21, 2017
Thanks for such a detailed investigation and write-up Grzegorz Gajoch (@ggajoch)!
ggajoch commentedon Dec 21, 2017
As a follow-up: this turned out to be a gcc bug, affecting every version above 5.4 - [1].
This bug was fixed now in the trunk, fixing this test case as well - [2]. Target milestone for gcc is 6.5.
[1] - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83116
[2] - https://godbolt.org/g/L6uUaZ
[-]Span size() broken on GCC >= 6[/-][+]Span size() broken on GCC > 5.4[/+]neilmacintosh commentedon Apr 19, 2018
I think it would be very useful to have a unit test that noticed whether the bug is present as Grzegorz Gajoch (@ggajoch) suggested.
added test for size check (microsoft#590)
Daniel599 commentedon Jul 3, 2018
Hi, I would like to help adding this test.
The test fails on gcc-6.4 + release, should I disable the test for this config, or is there another option?
annagrin commentedon Jul 3, 2018
Daniel599 You can ifdef the test out based on gcc versions, only for the versions that fail, or better change the tests to expect failure for those versions, with a comment that this is a gcc bug
added #if for gcc 6.4 bug (microsoft#590)
hopefully fix #if for gcc 6.4 bug (microsoft#590)
fixed CHECK usage (microsoft#590)
Daniel599 commentedon Jul 9, 2018
Anna Gringauze (@annagrin) can you look into my PR please? Is that what you meant?
Thanks.
Test broken size (#704)
JordanMaples commentedon Aug 26, 2020
Maintainers' call: We believe this has now been fixed. Sorry about the delay.