]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: workaround an ICE of GCC
authorKefu Chai <kchai@redhat.com>
Tue, 1 Jan 2019 07:49:05 +0000 (15:49 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 1 Jan 2019 08:26:08 +0000 (16:26 +0800)
commit17849cac84f4c9a529d935da81fcd8d38d0e132e
treeede611a172dcf6b8ccc2a179e3ea96bcfd7527ec
parentbf3b53d8876f865026fc09f8dae1fd090b7d75b7
librbd: workaround an ICE of GCC

GCC is somehow annoyed at seeing the combination of decltype and
initializer_list in this place. i tried to remove the `if` clause, and
only left the `else` block, GCC was happy with that change. i also tried
to pass an empty `{}` to `decltype(reply.lockers)`, and GCC was also
happy with that. so i guess there are multiple factors taking effect in
this problem. probably any of them could be the last straw that breaks
GCC.

but we cannot have a minimal reproducer for this issue here without more
efforts. and `reply.lockers` is empty after `reply` is constructed, so
it would be simpler if we just add the locker info to it instead of
assigning a newly constructed `map` to it.

Fixes: http://tracker.ceph.com/issues/37719
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/librbd/managed_lock/test_mock_GetLockerRequest.cc