[llvm-commits] [llvm-gcc-4.2] r43532 - /llvm-gcc-4.2/trunk/gcc/c-common.c
Devang Patel
dpatel at apple.com
Tue Oct 30 16:37:43 PDT 2007
Author: dpatel
Date: Tue Oct 30 18:37:43 2007
New Revision: 43532
URL: http://llvm.org/viewvc/llvm-project?rev=43532&view=rev
Log:
Fix
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071029/055013.html
Modified:
llvm-gcc-4.2/trunk/gcc/c-common.c
Modified: llvm-gcc-4.2/trunk/gcc/c-common.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-common.c?rev=43532&r1=43531&r2=43532&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-common.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-common.c Tue Oct 30 18:37:43 2007
@@ -2550,8 +2550,8 @@
TREE_CONSTANT (folded) = TREE_CONSTANT (ptrop) & TREE_CONSTANT (intop);
/* If the original was void* + int, we converted it to char* + int. Convert
- back to the appropriate void* result. */
- if (!size_set)
+ back to the appropriate void* result and match type qualifiers. */
+ if (!size_set || TYPE_QUALS(result_type) != TYPE_QUALS(TREE_TYPE(folded)))
folded = convert(result_type, folded);
return folded;
}
More information about the llvm-commits
mailing list