[Bug middle-end/103984] [12 regression] Possible maybe-uninitialized false positive on shaderc-2021.0 since r12-6329
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 1 15:04:55 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103984
--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Note I have a different test-case from benchmark package that show the same:
$ cat benchmark.ii
namespace std {
inline namespace __cxx11 {}
struct __new_allocator {
void deallocate(char *, long) { operator delete(0); }
};
template <typename> using __allocator_base = __new_allocator;
template <typename> struct allocator_traits;
template <typename> struct allocator : __allocator_base<int> {};
template <typename _Tp> struct allocator_traits<allocator<_Tp>> {
using allocator_type = allocator<_Tp>;
using pointer = _Tp *;
using size_type = long;
static void deallocate(allocator_type __a, pointer __p, size_type __n) {
__a.deallocate(__p, __n);
}
};
} // namespace std
struct __alloc_traits : std::allocator_traits<std::allocator<char>> {};
namespace std {
template <class> struct initializer_list {
int *_M_array;
unsigned long _M_len;
};
namespace __cxx11 {
struct basic_string {
struct _Alloc_hider : allocator_traits<allocator<char>> {
pointer _M_p;
} _M_dataplus;
basic_string(const char *, const allocator<char> & = allocator<char>());
~basic_string() {
if (_M_dataplus._M_p) {
allocator<char> __trans_tmp_1;
__alloc_traits::deallocate(__trans_tmp_1, 0, 1);
}
}
};
} // namespace __cxx11
} // namespace std
struct TestCase {
std::basic_string name;
bool error_occurred;
std::basic_string error_message;
};
int AddCases(std::initializer_list<TestCase>);
int dummy68 = AddCases({{"", true, ""}});
More information about the Gcc-bugs
mailing list