This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/10611] operations on vector mode not recognized in C++
- From: "dylan at q-games dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jul 2004 14:22:49 -0000
- Subject: [Bug c++/10611] operations on vector mode not recognized in C++
- References: <20030503164601.10611.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dylan at q-games dot com 2004-07-23 14:22 -------
I seem to have gotten this working to some extent by doing the following:
This is just a quick hack but is it the right direction? If so, I can tidy it
up and fix the side-effects. (or someone else with more knowledge of the
internals of gcc/cp can)
cp/cp-tree.h, change the ARITHMETIC_TYPE_P define to:
#define ARITHMETIC_TYPE_P(TYPE) \
(CP_INTEGRAL_TYPE_P (TYPE) || TREE_CODE (TYPE) == REAL_TYPE || TREE_CODE
(TYPE) == VECTOR_TYPE )
and
cp/typeck.c, function build_binary_op
** CHANGE **
if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE)
&&
(code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE))
{
int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE);
** TO **
if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE ||
code0 == VECTOR_TYPE)
&&
(code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE ||
code1 == VECTOR_TYPE))
{
int none_complex = (code0 != COMPLEX_TYPE && code1 != COMPLEX_TYPE &&
code0 != VECTOR_TYPE && code1 != VECTOR_TYPE );
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10611