public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41950]  New: Unaligned writes (?) to __m128
@ 2009-11-05 14:53 phresnel at gmail dot com
  2009-11-05 15:30 ` [Bug target/41950] " rguenth at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: phresnel at gmail dot com @ 2009-11-05 14:53 UTC (permalink / raw)
  To: gcc-bugs

C:\MinGW\bin>g++.exe -v
Es werden eingebaute Spezifikationen verwendet.
Ziel: mingw32
Konfiguriert mit: ../gcc-4.4.0/configure
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --disable-sjlj-exception
s --enable-shared --enable-libgcj --enable-libgomp --with-dwarf2
--disable-win32-registry --enable-libstdcxx-debug --ena
ble-version-specific-runtime-libs --prefix=/mingw
--with-gmp=/mingw/src/gmp/root --with-mpfr=/mingw/src/mpfr/root --buil
d=mingw32
Thread-Modell: win32
gcc-Version 4.4.0 (GCC)



The following snippets crash the running application, I guess due to unaligned
writes, but __alignof__ gives me 16 for all three versions, so I really don't
know.

// 0) anonymous namespace: not happy
#include <xmmintrin.h>
namespace { __m128 a; }
int main () {a = _mm_set1_ps(.0f); }

// 1) external: happy
#include <xmmintrin.h>
__m128 a;
int main () { a = _mm_set1_ps(.0f); }

// 2) internal: not happy
#include <xmmintrin.h>
static __m128 a;
int main () { a = _mm_set1_ps(.0f); }


-- 
           Summary: Unaligned writes (?) to __m128
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: phresnel at gmail dot com
 GCC build triplet:


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


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

* [Bug target/41950] Unaligned writes (?) to __m128
  2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
@ 2009-11-05 15:30 ` rguenth at gcc dot gnu dot org
  2009-11-05 15:55 ` sezeroz at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-05 15:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-11-05 15:30 -------
I guess win32 doesn't know about aligned commons?  Try updating to 4.4.2.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c++                         |target
  GCC build triplet|                            |
 GCC target triplet|                            |mingw32


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


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

* [Bug target/41950] Unaligned writes (?) to __m128
  2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
  2009-11-05 15:30 ` [Bug target/41950] " rguenth at gcc dot gnu dot org
@ 2009-11-05 15:55 ` sezeroz at gmail dot com
  2009-11-05 17:38 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sezeroz at gmail dot com @ 2009-11-05 15:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sezeroz at gmail dot com  2009-11-05 15:55 -------
PR target/37216 probably?  If that is so, gcc-4.4.2 won't help because the fix
hasn't been backported to 4.4, at least not yet.


-- 

sezeroz at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sezeroz at gmail dot com


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


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

* [Bug target/41950] Unaligned writes (?) to __m128
  2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
  2009-11-05 15:30 ` [Bug target/41950] " rguenth at gcc dot gnu dot org
  2009-11-05 15:55 ` sezeroz at gmail dot com
@ 2009-11-05 17:38 ` ubizjak at gmail dot com
  2009-11-05 17:43 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2009-11-05 17:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2009-11-05 17:38 -------
(In reply to comment #1)
> I guess win32 doesn't know about aligned commons?  Try updating to 4.4.2.

You can also use -fno-common as a workaround.


-- 


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


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

* [Bug target/41950] Unaligned writes (?) to __m128
  2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
                   ` (2 preceding siblings ...)
  2009-11-05 17:38 ` ubizjak at gmail dot com
@ 2009-11-05 17:43 ` pinskia at gcc dot gnu dot org
  2009-11-06  9:24 ` phresnel at gmail dot com
  2009-11-06  9:32 ` phresnel at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-05 17:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2009-11-05 17:42 -------


*** This bug has been marked as a duplicate of 37216 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug target/41950] Unaligned writes (?) to __m128
  2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
                   ` (3 preceding siblings ...)
  2009-11-05 17:43 ` pinskia at gcc dot gnu dot org
@ 2009-11-06  9:24 ` phresnel at gmail dot com
  2009-11-06  9:32 ` phresnel at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: phresnel at gmail dot com @ 2009-11-06  9:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from phresnel at gmail dot com  2009-11-06 09:24 -------
(In reply to comment #3)
> (In reply to comment #1)
> > I guess win32 doesn't know about aligned commons?  Try updating to 4.4.2.
> 
> You can also use -fno-common as a workaround.
> 

Unfortunately, this does not work for at least testcase 0),
__attribute__((nocommon)) does not to work either.

I will try out 4.5. asap (I am in relocation mode, i.e. only have access to my
work-pc at the moment, so updating is a bit clumsy here).


-- 


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


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

* [Bug target/41950] Unaligned writes (?) to __m128
  2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
                   ` (4 preceding siblings ...)
  2009-11-06  9:24 ` phresnel at gmail dot com
@ 2009-11-06  9:32 ` phresnel at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: phresnel at gmail dot com @ 2009-11-06  9:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from phresnel at gmail dot com  2009-11-06 09:32 -------
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > I guess win32 doesn't know about aligned commons?  Try updating to 4.4.2.
> > 
> > You can also use -fno-common as a workaround.
> > 
> 
> Unfortunately, this does not work for at least testcase 0),
> __attribute__((nocommon)) does not to work either.
> 
> I will try out 4.5. asap (I am in relocation mode, i.e. only have access to my
> work-pc at the moment, so updating is a bit clumsy here).
> 

Self-reply: If all else fails, use _mm_alloc(size,align).


-- 


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


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

end of thread, other threads:[~2009-11-06  9:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-05 14:53 [Bug c++/41950] New: Unaligned writes (?) to __m128 phresnel at gmail dot com
2009-11-05 15:30 ` [Bug target/41950] " rguenth at gcc dot gnu dot org
2009-11-05 15:55 ` sezeroz at gmail dot com
2009-11-05 17:38 ` ubizjak at gmail dot com
2009-11-05 17:43 ` pinskia at gcc dot gnu dot org
2009-11-06  9:24 ` phresnel at gmail dot com
2009-11-06  9:32 ` phresnel at gmail dot com

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