Skip to content
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

[BUG]: GCC static analysis branch is outdated/obsolete #4256

Closed
superjamie opened this issue Nov 8, 2022 · 4 comments · Fixed by #4267
Closed

[BUG]: GCC static analysis branch is outdated/obsolete #4256

superjamie opened this issue Nov 8, 2022 · 4 comments · Fixed by #4267
Assignees
Labels

Comments

@superjamie
Copy link

Describe the bug

GCC static analysis branch is very outdated, gcc -v reports:

gcc version 10.0.0 20200115 (experimental)

Upstream GCC stopped using their devel/analyzer branch as defined in gcc-builder/build/build.sh. The last commit was Jan 2020, matching the above datestamp. Current GCC static analyzer commits are made directly into trunk.

I can think of two possible solutions:

  • Remove CE's gcc (static analysis) and add the analyzer plugin to gcc trunk in build.sh, reflecting the upstream status that the static analysis is not so experimental anymore
  • Update CE's gcc (static analysis) to track trunk (keeping the analyzer plugin enabled)

Steps to reproduce

Compile C or C++ with x86-64 gcc (static analysis) branch.

Expected behavior

Compiler is latest nightly code, like the x86-64 gcc (trunk) build.

Instead, very old build from Jan 2020 is used.

Reproduction link

https://godbolt.org/z/q3ovchq1a

Screenshots

Not applicable

Operating System

No response

Browser version

No response

@superjamie superjamie added the bug label Nov 8, 2022
@dkm
Copy link
Member

dkm commented Nov 8, 2022

True that the branch is not live anymore, but I'm not sure there's anything to do on master to use -fanalyzer. I believe it's now part of gcc and development is done in master branch.

See https://godbolt.org/z/eETcbffc6
which is part of a fresh (beg november) test case added by @davidmalcolm .

Maybe we should simply hide the old compiler (old links will still work, but we won't show the compiler in the drop down menu).

What do you think? Or is there an analyzer plugin we need to enable that I'm not aware of?

@dkm dkm self-assigned this Nov 8, 2022
@superjamie
Copy link
Author

Thanks for the quick response!

Very strange. I've got a test case which doesn't trip the analyzer on Compiler Explorer no matter what I try, but apparently it does work for the upstream developers:

You are right though, if I put one of upstream's test cases into CE's gcc (trunk), it does correctly trip the analyzer:

I am not sure why my minimal reproducer doesn't work 🤔

Anyway, I think your suggestion is best:

Maybe we should simply hide the old compiler (old links will still work, but we won't show the compiler in the drop down menu).

That way CE users won't accidentally use an old outdated version of GCC when trying to use -fanalyzer.

@davidmalcolm
Copy link
Contributor

As it's turned out, all of my development work on the gcc analyzer has been in trunk aka master.

I haven't touched that old branch in years, so at this point its presence in the menu is confusing to Compiler Explorer users. Sorry about that.

My preference would be for that old compiler option to be either deleted altogether, or for it to be hidden.

@dkm
Copy link
Member

dkm commented Nov 8, 2022

Thanks, I'll proceed with the hiding (we never delete any compiler as we want all existing links to continue working as long as compiler explorer exists :)

dkm added a commit that referenced this issue Nov 9, 2022
The GCC compiler for "static analysis" was used before the work was merged in
GCC's trunk. There's no need to track the `devel/analyzer` branch anymore.

The C++ compiler is already hidden (d5b0e20).
This changes does the same for the C compiler.

fixes #4256

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
@dkm dkm closed this as completed in #4267 Nov 10, 2022
dkm added a commit that referenced this issue Nov 10, 2022
The GCC compiler for "static analysis" was used before the work was merged in
GCC's trunk. There's no need to track the `devel/analyzer` branch anymore.

The C++ compiler is already hidden (d5b0e20).
This changes does the same for the C compiler.

fixes #4256

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
mattgodbolt pushed a commit that referenced this issue Dec 20, 2022
The GCC compiler for "static analysis" was used before the work was merged in
GCC's trunk. There's no need to track the `devel/analyzer` branch anymore.

The C++ compiler is already hidden (d5b0e20).
This changes does the same for the C compiler.

fixes #4256

Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants