-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test compilation failures on GCC 11: error: array subscript -1 is outside array bounds of 'char[6]' [-Werror=array-bounds] #303
Comments
I'm seeing similar errors on Fedora 33 which is on GCC 10, so this may not be a GCC related issue. Build log for GCC 10 build: |
Thanks for the report. This appears to be a compiler bug which first surfaced in GCC 10.3. Here's a minimal repro: The problem only occurs when "-O2" or higher is enabled, hence it doesn't appear in our CI because we only test with the Debug build configuration (to keep the overall build times low). I'll change that so at least one version of each compiler will also build the RelWithDebInfo configuration. I'll issue a bug report with GCC. |
Thanks very much. If there's anything we can do to help with this, please do let us know. |
Bug report: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100137 For the time being, you can make your build work by adding |
Thanks, I've added that to our build now. Fedora currently builds for a number of architectures: https://fedoraproject.org/wiki/Architectures
I'm happy to report that it builds correctly and all tests pass on all architectures apart from s390x. I've filed a separate issue for that here: #304 Here are the test builds:
|
Hi there,
While packaging the 0.38.0 release for Fedora, we're seeing the build fail when tests are enabled. (This is on Fedora 34 and 35, which are both using GCC 11 now). The failures are of this form:
The complete build log is here: gsl-lite-0.38.0-buildlog.txt
The text was updated successfully, but these errors were encountered: