Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 41950
Product:  
Component:  
Status: RESOLVED
Resolution: DUPLICATE of bug 37216
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Sebastian Mach <phresnel@gmail.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 41950 depends on: Show dependency tree
Show dependency graph
Bug 41950 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2009-11-05 14:53
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); }

------- Comment #1 From Richard Guenther 2009-11-05 15:30 -------
I guess win32 doesn't know about aligned commons?  Try updating to 4.4.2.

------- Comment #2 From Ozkan Sezer 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.

------- Comment #3 From Uros Bizjak 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.

------- Comment #4 From Andrew Pinski 2009-11-05 17:42 -------

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

------- Comment #5 From Sebastian Mach 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).

------- Comment #6 From Sebastian Mach 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).

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug