public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ishikawa at yk dot rim.or.jp" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109480] New: g++-12 and g++-11 failed to compile the attached source file while g++-10 and clang can. Date: Wed, 12 Apr 2023 05:38:43 +0000 [thread overview] Message-ID: <bug-109480-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109480 Bug ID: 109480 Summary: g++-12 and g++-11 failed to compile the attached source file while g++-10 and clang can. Product: gcc Version: 11.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ishikawa at yk dot rim.or.jp Target Milestone: --- Created attachment 54837 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54837&action=edit target.cpp: this shows the compiler issue for g++-10 and g++-11 I am reporting a reduced case of a compilation issue noticed when we compile mozilla firefox browser, and thunderbird mail client software. For the original problem report and the workaround (basically rewriting the source code), see the bugzilla entry at mozilla's bugzilla, https://bugzilla.mozilla.org/show_bug.cgi?id=1825516 Now, I am a newbie to c-vise source coded reduction tool, but managed to create the attached reduced source file. That file shows the symptom. I am using the following compiler for testing. Version Info: g++-10 --version g++-10 (Debian 10.4.0-7) 10.4.0 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ g++-11 --version g++-11 (Debian 11.3.0-12) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ g++-12 --version g++-12 (Debian 12.2.0-14) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ clang --version clang version 15.0.5 (taskcluster-ETTsfeYjQ76jbYk0xzOrPA) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/ishikawa/.mozbuild/clang/bin The clang compiler I use is a version compiled by mozilla to facilitate that the developer community uses the same clang everywhere. g++-10 can compile it. g++-11 can not. g++-12 can not. clang can. See the console log below. ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ g++-10 -c target.cpp ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ g++-11 -c target.cpp target.cpp: In member function ‘void mozilla::a11y::RemoteAccessibleBase<Derived>::BoundsWithOffset() const’: target.cpp:14:57: error: ‘bool mozilla::a11y::RemoteAccessibleBase<Derived>::ApplyScrollOffset(nsRect&) const [with Derived = mozilla::a11y::RemoteAccessible]’ is protected within this context 14 | const bool hasScrollArea = remoteAcc.ApplyScrollOffset(bounds); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ target.cpp:6:14: note: declared protected here 6 | bool ApplyScrollOffset(nsRect & a) const { return a.x > 0 ? true: false; } ; | ^~~~~~~~~~~~~~~~~ ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ g++-12 -c target.cpp target.cpp: In member function ‘void mozilla::a11y::RemoteAccessibleBase<Derived>::BoundsWithOffset() const’: target.cpp:14:57: error: ‘bool mozilla::a11y::RemoteAccessibleBase<Derived>::ApplyScrollOffset(nsRect&) const [with Derived = mozilla::a11y::RemoteAccessible]’ is protected within this context 14 | const bool hasScrollArea = remoteAcc.ApplyScrollOffset(bounds); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ target.cpp:6:14: note: declared protected here 6 | bool ApplyScrollOffset(nsRect & a) const { return a.x > 0 ? true: false; } ; | ^~~~~~~~~~~~~~~~~ ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ clang -c target.cpp ishikawa@ip030:~/Dropbox/TB-DIR/WALL-PATCH-DIR$ Thank you for sharing the great compiler suite with the developer community.
next reply other threads:[~2023-04-12 5:38 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-12 5:38 ishikawa at yk dot rim.or.jp [this message] 2023-04-12 5:51 ` [Bug c++/109480] " pinskia at gcc dot gnu.org 2023-04-12 6:02 ` [Bug c++/109480] [11/12/13 Regression] non-depedent access goes wrong in a template method sometimes pinskia at gcc dot gnu.org 2023-04-12 6:06 ` pinskia at gcc dot gnu.org 2023-04-12 6:55 ` [Bug c++/109480] [11/12/13 Regression] non-depedent access goes wrong in a template method sometimes since r11-1350-g92bed036098928 marxin at gcc dot gnu.org 2023-04-12 10:31 ` rguenth at gcc dot gnu.org 2023-04-12 12:40 ` ppalka at gcc dot gnu.org 2023-05-07 14:29 ` [Bug c++/109480] [11/12/13/14 " cvs-commit at gcc dot gnu.org 2023-05-07 14:30 ` cvs-commit at gcc dot gnu.org 2023-05-07 14:31 ` [Bug c++/109480] [11/12/13 " ppalka at gcc dot gnu.org 2023-05-29 10:08 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-109480-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).