diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2004-12-09 10:34:21 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2004-12-09 10:34:21 +0000 |
commit | 257d5f32cee1fa8d51d2adb3cd71f8bf9823a7a5 (patch) | |
tree | 72b60e6d0dd4fdbc6129a221f9baa31b027590cb /gcc | |
parent | 9476364759b1dc6e0f79b381b6adb7f995cc2706 (diff) | |
download | gcc-257d5f32cee1fa8d51d2adb3cd71f8bf9823a7a5.zip gcc-257d5f32cee1fa8d51d2adb3cd71f8bf9823a7a5.tar.gz gcc-257d5f32cee1fa8d51d2adb3cd71f8bf9823a7a5.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/typeck.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/mmintrin.C | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2d73639..202e416 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index a26bff4..74380d3 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8ad0ad..54b1dfe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/g++.dg/other/mmintrin.C b/gcc/testsuite/g++.dg/other/mmintrin.C new file mode 100644 index 0000000..417a1ac --- /dev/null +++ b/gcc/testsuite/g++.dg/other/mmintrin.C @@ -0,0 +1,4 @@ +// { dg-do compile { target i?86-*-* x86_64-*-* } } +// { dg-options "-msse" } + +#include <xmmintrin.h> |