------- Comment #7 from uweigand at gcc dot gnu dot org 2007-08-12 23:43 ------- Sa's patch isn't quite correct as it ignores the result of the build_qualified_type call. The following patch should fix that:
diff -urNp toolchain/gcc.orig/gcc/tree.c toolchain/gcc/gcc/tree.c --- toolchain/gcc.orig/gcc/tree.c 2007-08-12 15:57:05.442520932 +0200 +++ toolchain/gcc/gcc/tree.c 2007-08-12 16:07:42.516093968 +0200 @@ -6554,10 +6554,7 @@ reconstruct_complex_type (tree type, tre else return bottom; - TYPE_READONLY (outer) = TYPE_READONLY (type); - TYPE_VOLATILE (outer) = TYPE_VOLATILE (type); - - return outer; + return build_qualified_type (outer, TYPE_QUALS (type)); } /* Returns a vector tree node given a mode (integer, vector, or BLKmode) and -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32970