------- Comment #5 from saliu at de dot ibm dot com  2007-08-10 10:13 -------
This patch can fix the problem:

Index: gcc/tree.c
===================================================================
--- gcc.orig/tree.c
+++ gcc/tree.c
@@ -7609,8 +7609,11 @@ reconstruct_complex_type (tree type, tre
   else
     return bottom;

-  TYPE_READONLY (outer) = TYPE_READONLY (type);
-  TYPE_VOLATILE (outer) = TYPE_VOLATILE (type);
+  if  (TYPE_READONLY (type))
+    build_qualified_type(outer, TYPE_QUAL_CONST);
+
+  if (TYPE_VOLATILE (type))
+    build_qualified_type(outer, TYPE_QUAL_VOLATILE);

   return outer;
 }


-- 


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

Reply via email to