{"action":"opened","issue":{"url":"https://api.github.com/repos/Arcoth/Constainer/issues/2","labels_url":"https://api.github.com/repos/Arcoth/Constainer/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Arcoth/Constainer/issues/2/comments","events_url":"https://api.github.com/repos/Arcoth/Constainer/issues/2/events","html_url":"https://github.com/Arcoth/Constainer/issues/2","id":103692712,"number":2,"title":"GCC fails Array comparison testcase","user":{"login":"Arcoth","id":3051413,"avatar_url":"https://avatars.githubusercontent.com/u/3051413?v=3","gravatar_id":"","url":"https://api.github.com/users/Arcoth","html_url":"https://github.com/Arcoth","followers_url":"https://api.github.com/users/Arcoth/followers","following_url":"https://api.github.com/users/Arcoth/following{/other_user}","gists_url":"https://api.github.com/users/Arcoth/gists{/gist_id}","starred_url":"https://api.github.com/users/Arcoth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arcoth/subscriptions","organizations_url":"https://api.github.com/users/Arcoth/orgs","repos_url":"https://api.github.com/users/Arcoth/repos","events_url":"https://api.github.com/users/Arcoth/events{/privacy}","received_events_url":"https://api.github.com/users/Arcoth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-28T10:25:52Z","updated_at":"2015-08-28T10:25:52Z","closed_at":null,"body":"``` c++\r\nconstexpr Array<int, 10> a {{1, 2, 3, 4, 5}};\r\nconstexpr Array<int, 10> a2{{1, 2, 3, 4, 5}};\r\nstatic_assert( a == a2 );\r\n```\r\nFails with GCC trunk 20150813:\r\n\r\n    Constainer/Testing.cxx:23:1: error: non-constant condition for static assertion\r\n     static_assert( a == a2 );\r\n     ^\r\n    In file included from Constainer/impl/../Array.hxx:7:0,\r\n                     from Constainer/impl/BasicVector.hxx:7,\r\n                     from Constainer/String.hxx:8,\r\n                     from Constainer/Parser.hxx:7,\r\n                     from Constainer/Testing.cxx:7:\r\n    Constainer/Testing.cxx:23:18:   in constexpr expansion of ‘Constainer::operator==<int, 10ul, int, 10ul>(a, a2)’\r\n    Constainer/impl/../Array.hxx:89:14:   in constexpr expansion of ‘Constainer::equal<const int*, const int*>((& lhs)->Constainer::Array<T, Size>::begin<int, 10ul>(), (& lhs)->Constainer::Array<T, Size>::end<int, 10ul>(), (& rhs)->Constainer::Array<T, Size>::begin<int, 10ul>(), (& rhs)->Constainer::Array<T, Size>::end<int, 10ul>())’\r\n    Constainer/impl/../Algorithms.hxx:269:26:   in constexpr expansion of ‘Constainer::equal<const int*, const int*, std::equal_to<void> >(first1, last1, first2, last2, (std::equal_to<void>(), std::equal_to<void>()))’\r\n    Constainer/impl/../Algorithms.hxx:264:31:   in constexpr expansion of ‘Constainer::mismatch<const int*, const int*, std::equal_to<void> >(first1, last1, first2, last2, (comp, std::equal_to<void>()))’\r\n    Constainer/impl/../Algorithms.hxx:220:2: error: ‘(((const int*)(& a.Constainer::Array<int, 10ul>::_storage)) == (((const int*)(& a.Constainer::Array<int, 10ul>::_storage)) + 40u))’ is not a constant expression\r\n      while (first1 != last1 && first2 != last2) {\r\n      ^\r\n\r\nReduces to \r\n\r\n``` c++\r\nstruct A {int arr[3] {1, 2, 3};} constexpr a{};\r\nstatic_assert( a.arr != a.arr+3 );\r\n```\r\nReported as [#67380](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67380)."}}