Bug 25350 - [4.2 Regression] Can't include mmintrin.h
Summary: [4.2 Regression] Can't include mmintrin.h
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2005-12-11 13:14 UTC by Glauber de Oliveira Costa
Modified: 2005-12-23 00:36 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-12-12 19:36:40


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glauber de Oliveira Costa 2005-12-11 13:14:55 UTC
  when trying to include file mmintrin.h in any file, compilation fails with the following message:

mmintrin.h: In function '_mm_add_si64':
mmintrin.h:280: error: can't convert between vector values of different size
mmintrin.h: In function '_mm_sub_si64':
mmintrin.h:382: error: can't convert between vector values of different size
	
	It works okay with older versions of gcc, and fails with 4.2.0 20051211 both with the
include file that ships with it and with it's older versions.

Environment:
System: Linux amazonia 2.6.10-5-386 #1 Mon Oct 10 11:15:41 UTC 2005 i686 GNU/Linux
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-languages=c --disable-nls --prefix=/home/glauber/usr

How-To-Repeat:
	create a file containing the single directive #include <mmintrin.h> and compile it 
	with gcc -msse  <filename>
Comment 1 Andrew Pinski 2005-12-12 19:36:40 UTC
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00659.html
Comment 2 Glauber de Oliveira Costa 2005-12-13 01:18:11 UTC
Ok, the patch worked perfectly here.

(In reply to comment #1)
> Patch posted:
> http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00659.html
> 

(In reply to comment #1)
> Patch posted:
> http://gcc.gnu.org/ml/gcc-patches/2005-12/msg00659.html
> 

Comment 3 Andrew Pinski 2005-12-14 22:15:25 UTC
This causes the following testsuite errors:
FAIL: gcc.target/i386/3dnow-1.c (test for excess errors)
FAIL: gcc.target/i386/3dnow-2.c (test for excess errors)
FAIL: gcc.target/i386/3dnowA-1.c (test for excess errors)
FAIL: gcc.target/i386/3dnowA-2.c (test for excess errors)
FAIL: gcc.target/i386/mmx-1.c (test for excess errors)
FAIL: gcc.target/i386/mmx-2.c (test for excess errors)
FAIL: gcc.target/i386/mmx-4.c (test for excess errors)
WARNING: gcc.target/i386/mmx-4.c compilation failed to produce executable
FAIL: gcc.target/i386/mmx-5.c (test for excess errors)
FAIL: gcc.target/i386/pr13366.c (test for excess errors)  
FAIL: gcc.target/i386/sse-1.c (test for excess errors)
ERROR: gcc.target/i386/sse-1.c: error executing dg-final: couldn't open "sse-1.s": no such file or directory
FAIL: gcc.target/i386/sse-13.c (test for excess errors)
FAIL: gcc.target/i386/sse-14.c (test for excess errors)
FAIL: gcc.target/i386/sse-2.c (test for excess errors)  
FAIL: gcc.target/i386/sse-3.c (test for excess errors)  
WARNING: gcc.target/i386/sse-3.c compilation failed to produce executable
FAIL: gcc.target/i386/sse-7.c (test for excess errors) 
WARNING: gcc.target/i386/sse-7.c compilation failed to produce executable
FAIL: gcc.target/i386/sse-9.c (test for excess errors)  
WARNING: gcc.target/i386/sse-9.c compilation failed to produce executable
Comment 4 Joseph S. Myers 2005-12-21 19:54:33 UTC
In addition to the listed C failures, this is probably also responsible for the C++ regressions

FAIL: g++.dg/opt/mmx2.C (test for excess errors)
FAIL: g++.dg/other/mmintrin.C (test for excess errors)

appearing at the same time.
Comment 5 Andrew Pinski 2005-12-23 00:36:36 UTC
Fixed by:
        * config/i386/mmintrin.h (_mm_add_si64): Only define for SSE2.
        (_mm_sub_si64): Likewise.
        * config/i386/xmmintrin.h (_mm_shuffle_pi16, _m_pshufw): Likewise.

        * gcc.target/i386/sse-7.c: Use -msse2.