public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50716] New: Segmentation fault caused by misaligned vector access
@ 2011-10-13 15:00 tema at gcc dot gnu.org
  2011-10-13 19:45 ` [Bug middle-end/50716] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: tema at gcc dot gnu.org @ 2011-10-13 15:00 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50716
           Summary: Segmentation fault caused by misaligned vector access
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tema@gcc.gnu.org


The following code segfaults on i386 + sse targets:

typedef int vec __attribute__((vector_size(16)));
int main ()
{
 int * arr = __builtin_malloc (1024);
 vec *p = (vec *) &arr[1];
 *p = (vec){1, 2, 3, 4};
 return *(char *)p;
}

The problem is that *p = (vec){1,2,3,4} produces aligned move instead of
unaligned.  Most likely this could be reproduced on any target with SIMD
extensions, where aligned move differs from unaligned.


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

end of thread, other threads:[~2011-10-18 11:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13 15:00 [Bug middle-end/50716] New: Segmentation fault caused by misaligned vector access tema at gcc dot gnu.org
2011-10-13 19:45 ` [Bug middle-end/50716] " pinskia at gcc dot gnu.org
2011-10-13 19:51 ` artyom.shinkaroff at gmail dot com
2011-10-14  9:34 ` rguenth at gcc dot gnu.org
2011-10-14 12:10 ` rguenth at gcc dot gnu.org
2011-10-14 12:12 ` rguenth at gcc dot gnu.org
2011-10-17 12:22 ` rguenth at gcc dot gnu.org
2011-10-18  8:46 ` rguenth at gcc dot gnu.org
2011-10-18 11:47 ` rguenth at gcc dot gnu.org

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