This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/36431] The C++ front-end produces some NOP_EXPR for vector types



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-06-04 00:19 -------
Fix for this bug which I am testing right now:

Index: cp/cvt.c
======================================================
=============
--- cp/cvt.c    (revision 2504)
+++ cp/cvt.c    (working copy)
@@ -642,6 +642,9 @@ ocp_convert (tree type, tree expr, int c
         conversion.  */
       else if (TREE_CODE (type) == COMPLEX_TYPE)
        return fold_if_not_in_template (convert_to_complex (type, e));
+      /* For vector data types, we need to produce a VIEW_CONVERT_EXPR.  */
+      else if (TREE_CODE (type) == VECTOR_TYPE)
+       return fold_if_not_in_template (convert_to_vector (type, e));
       else if (TREE_CODE (e) == TARGET_EXPR)
        {
          /* Don't build a NOP_EXPR of class type.  Instead, change the


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-04 00:19:22
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36431


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]