public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59898] New: alignment problems in std::map with avx/avx2
@ 2014-01-21 11:14 ignat at gmx dot net
  2014-01-21 11:19 ` [Bug c++/59898] " jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ignat at gmx dot net @ 2014-01-21 11:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59898

            Bug ID: 59898
           Summary: alignment problems in std::map with avx/avx2
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ignat at gmx dot net

Created attachment 31904
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31904&action=edit
avx_bug.cc

The following code segfaults when compiled with -mavx or -mavx2 on g++ (Debian
4.7.2-5) 4.7.2 on Linux x86_64 (Xeon(R) CPU E3-1240 v3). This also applies to
unordered_map and can also happen when assigning to iterators when it->second
is a 32-byte vector type. 

#include <map>

typedef int vec256_t __attribute__ ((__vector_size__ (32)));
std::map<int,vec256_t> m;

int main() {
  vec256_t v;
  m[0]=v;
  return 0;
}

reproduce with:

$ g++ avx_bug.cc -o avx_bug -mavx2 && ./avx_bug
Segmentation fault

thx

ignatius


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-24 19:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-21 11:14 [Bug c++/59898] New: alignment problems in std::map with avx/avx2 ignat at gmx dot net
2014-01-21 11:19 ` [Bug c++/59898] " jakub at gcc dot gnu.org
2014-01-23  8:44 ` ignat at gmx dot net
2014-01-23  9:07 ` jakub at gcc dot gnu.org
2014-01-23 10:43 ` glisse at gcc dot gnu.org
2014-01-24 19:14 ` ignat at gmx dot net

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).