re PR c++/18073 (mmintrin.h rejected by C++ frontend)

PR c++/18073
	* typeck.c (build_reinterpret_cast_1): Allow cast from vector type.

	* g++.dg/other/mmintrin.C: New test.

From-SVN: r91929
This commit is contained in:
Volker Reichelt 2004-12-09 10:34:21 +00:00 committed by Volker Reichelt
parent 9476364759
commit 257d5f32ce
4 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/18073
* typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16681

View File

@ -4956,6 +4956,8 @@ build_reinterpret_cast_1 (tree type, tree expr, bool c_cast_p,
}
else if (TREE_CODE (type) == VECTOR_TYPE)
return fold_if_not_in_template (convert_to_vector (type, expr));
else if (TREE_CODE (intype) == VECTOR_TYPE)
return fold_if_not_in_template (convert_to_integer (type, expr));
else
{
if (valid_p)

View File

@ -1,3 +1,8 @@
2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/18073
* g++.dg/other/mmintrin.C: New test.
2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
PR c++/16681

View File

@ -0,0 +1,4 @@
// { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-options "-msse" }
#include <xmmintrin.h>