oprofile (git repo checkout from today, HEAD is 3a5515f85ea2e007343c225e78cba66dde133327) fails to compile with GCC 6.1 (gcc (Debian 6.1.1-7) 6.1.1 20160620, to be specific).
The error is:
op_alloc_counter.c: In function ‘map_event_to_counter’:
op_alloc_counter.c:174:31: error: left shift of negative value [-Werror=shift-negative-value]
unavailable_counters = (~0) << nr_counters;
In file libop/op_alloc_counter.c
Replacing ~0 by ~0U should do the trick, I think. With that change, oprofile compiles successfully.
Thanks for the report. The fix has been pushed into the upstrem oprofile git repository.
Fixed in oprofile-1.2.0