* New g++ folly compile error with gcc 11.x. Bisected to PR99445 c++: Alias template in pack expansion
@ 2022-01-13 11:45 Alex Hornby
2022-01-13 12:36 ` Jonathan Wakely
0 siblings, 1 reply; 4+ messages in thread
From: Alex Hornby @ 2022-01-13 11:45 UTC (permalink / raw)
To: gcc-help
When compiling folly on Fedora 35 with gcc from the included 11.2.1-7 package, I found that the badge_test code fails to compile, whereas it builds fine with gcc 10.x and with the fedora 35 clang (13.0.0-3.fc35)).
Bisecting from https://gcc.gnu.org/git/gcc.git with pre-processed source indicates problem introduced in commit: [a2531859bf5bf6cf1f29c0dca85fd26e80904a5d] c++: Alias template in pack expansion [PR99445]
Bisected with commands, (bisection script below)
git bisect start basepoints/gcc-12 basepoints/gcc-11
git bisect run ~/local/bisect/gxx_bisect.sh
Example of the problem from a folly build along with the command line I got preprocessed source from is in https://github.com/facebook/folly/commit/af966d2ce25c14c96373bf39c8ae2b406219ffb4
Error looks like:
'/home/alex/local/bisect/test/0cc79337ad265aabccab63882a810f9dc509a9d0/build'
In file included from /home/alex/local/folly/folly/lang/test/BadgeTest.cpp:19:
/home/alex/local/folly/folly/lang/Badge.h: In instantiation of ‘class folly::any_badge<{anonymous}::FriendClass, {anonymous}::OtherFriendClass>’:
/home/alex/local/folly/folly/lang/test/BadgeTest.cpp:38:40: required from here
/home/alex/local/folly/folly/lang/Badge.h:99:18: error: expansion pattern ‘folly::StrictDisjunction<std::is_same<OtherHolders, Holders>...>’ contains no parameter packs
99 | /* implicit */ any_badge(any_badge<OtherHolders...>) noexcept {}
| ^~~~~~~~~
/home/alex/local/folly/folly/lang/Badge.h: In instantiation of ‘class folly::any_badge<{anonymous}::FriendClass, {anonymous}::OtherFriendClass, {anonymous}::DummyClass>’:
/home/alex/local/folly/folly/lang/test/BadgeTest.cpp:39:53: required from here
/home/alex/local/folly/folly/lang/Badge.h:99:18: error: expansion pattern ‘folly::StrictDisjunction<std::is_same<OtherHolders, Holders>...>’ contains no parameter packs
/home/alex/local/folly/folly/lang/test/BadgeTest.cpp: In static member function ‘static void {anonymous}::ProtectedClass::subset({anonymous}::SubsetBadges)’:
/home/alex/local/folly/folly/lang/test/BadgeTest.cpp:39:54: error: cannot convert ‘any_badge<{anonymous}::FriendClass, {anonymous}::OtherFriendClass>’ to ‘any_badge<{anonymous}::FriendClass, {anonymous}::OtherFriendClass, {anonymous}::DummyClass>’
39 | static void subset(SubsetBadges badges) { superset(badges); }
| ^~~~~~
| |
| any_badge<{anonymous}::FriendClass, {anonymous}::OtherFriendClass>
/home/alex/local/folly/folly/lang/test/BadgeTest.cpp:40:24: note: initializing argument 1 of ‘static void {anonymous}::ProtectedClass::superset({anonymous}::SupersetBadges)’
40 | static void superset(SupersetBadges) {}
| ^~~~~~~~~~~~~~
In file included from /home/alex/local/folly/folly/lang/test/BadgeTest.cpp:19:
/home/alex/local/folly/folly/lang/Badge.h: In instantiation of ‘class folly::any_badge<{anonymous}::FriendClass>’:
/home/alex/local/folly/folly/lang/test/BadgeTest.cpp:47:35: required from here
/home/alex/local/folly/folly/lang/Badge.h:99:18: error: expansion pattern ‘folly::StrictDisjunction<std::is_same<OtherHolders, Holders>...>’ contains no parameter packs
99 | /* implicit */ any_badge(any_badge<OtherHolders...>) noexcept {}
| ^~~~~~~~~
Exited with 0
Bisection script was:
#!/bin/sh
# adapted from http://moxielogic.org/blog/bisecting-gcc.html
# Test with:
# cd local/gcc #(or whereever gcc git repo is)
# ./bisect/gxx_bisect.sh
# Run with:
# git bisect run ~/local/bisect/gxx_bisect.sh
# git clone of the gcc tree
GCCSRC="$HOME/local/gcc"
# pre-processed test case
TESTSRC="$HOME/local/bisect/bisect_source.i"
COMMIT=`git rev-parse HEAD`
# Where to put gcc build and install dirs
testdir="$HOME/local/bisect/test/$COMMIT"
mkdir -p "$testdir/build"
mkdir -p "$testdir/install"
# configure for C & C++
(cd "$testdir/build" &&
$GCCSRC/configure --prefix="$testdir/install" --enable-languages=c,c++ --with-system-zlib --disable-multilib --disable-libsanitizer --disable-bootstrap &&
make -j 32 && make -j 32 install)
cxxbin="$testdir/install/bin/g++"
if test -x "$cxxbin"; then
# build test case
if "$cxxbin" -std=gnu++17 -c "$TESTSRC"; then
# everything's fine
exit 0
fi
# gcc can return exit codes outside of git's acceptable range, so...
echo "Exited with $?" 1>&2
exit 1
else
# No binary, skip broken builds with special 125 exit code
exit 125
fi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New g++ folly compile error with gcc 11.x. Bisected to PR99445 c++: Alias template in pack expansion
2022-01-13 11:45 New g++ folly compile error with gcc 11.x. Bisected to PR99445 c++: Alias template in pack expansion Alex Hornby
@ 2022-01-13 12:36 ` Jonathan Wakely
2022-01-13 14:25 ` Alex Hornby
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2022-01-13 12:36 UTC (permalink / raw)
To: Alex Hornby; +Cc: gcc-help
On Thu, 13 Jan 2022 at 11:46, Alex Hornby via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>
> When compiling folly on Fedora 35 with gcc from the included 11.2.1-7 package, I found that the badge_test code fails to compile, whereas it builds fine with gcc 10.x and with the fedora 35 clang (13.0.0-3.fc35)).
>
> Bisecting from https://gcc.gnu.org/git/gcc.git with pre-processed source indicates problem introduced in commit: [a2531859bf5bf6cf1f29c0dca85fd26e80904a5d] c++: Alias template in pack expansion [PR99445]
Please report this to Bugzilla, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New g++ folly compile error with gcc 11.x. Bisected to PR99445 c++: Alias template in pack expansion
2022-01-13 12:36 ` Jonathan Wakely
@ 2022-01-13 14:25 ` Alex Hornby
2022-01-13 17:29 ` Jonathan Wakely
0 siblings, 1 reply; 4+ messages in thread
From: Alex Hornby @ 2022-01-13 14:25 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-help
On 1/13/22, 12:36 PM, "Jonathan Wakely" <jwakely.gcc@gmail.com> wrote:
>On Thu, 13 Jan 2022 at 11:46, Alex Hornby via Gcc-help
<gcc-help@gcc.gnu.org> wrote:
>>
>> When compiling folly on Fedora 35 with gcc from the included 11.2.1-7 package, I found that the badge_test code fails to compile, whereas it builds fine with gcc 10.x and with the fedora 35 clang (13.0.0-3.fc35)).
>>
>> Bisecting from https://gcc.gnu.org/git/gcc.git with pre-processed source indicates problem introduced in commit: [a2531859bf5bf6cf1f29c0dca85fd26e80904a5d] c++: Alias template in pack expansion [PR99445]
> Please report this to Bugzilla, thanks.
Done: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104008
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: New g++ folly compile error with gcc 11.x. Bisected to PR99445 c++: Alias template in pack expansion
2022-01-13 14:25 ` Alex Hornby
@ 2022-01-13 17:29 ` Jonathan Wakely
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2022-01-13 17:29 UTC (permalink / raw)
To: Alex Hornby; +Cc: gcc-help
On Thu, 13 Jan 2022 at 14:25, Alex Hornby <ahornby@fb.com> wrote:
>
> On 1/13/22, 12:36 PM, "Jonathan Wakely" <jwakely.gcc@gmail.com> wrote:
>
> >On Thu, 13 Jan 2022 at 11:46, Alex Hornby via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> >>
> >> When compiling folly on Fedora 35 with gcc from the included 11.2.1-7 package, I found that the badge_test code fails to compile, whereas it builds fine with gcc 10.x and with the fedora 35 clang (13.0.0-3.fc35)).
> >>
> >> Bisecting from https://gcc.gnu.org/git/gcc.git with pre-processed source indicates problem introduced in commit: [a2531859bf5bf6cf1f29c0dca85fd26e80904a5d] c++: Alias template in pack expansion [PR99445]
>
> > Please report this to Bugzilla, thanks.
>
> Done: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104008
Great, thanks. I just noticed PR 102869 which might be the same issue.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-13 17:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 11:45 New g++ folly compile error with gcc 11.x. Bisected to PR99445 c++: Alias template in pack expansion Alex Hornby
2022-01-13 12:36 ` Jonathan Wakely
2022-01-13 14:25 ` Alex Hornby
2022-01-13 17:29 ` Jonathan Wakely
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).