* c-typeck.c (build_indirect_ref): Build INDIRECT_REF
with correct type.
* gcc.dg/wtypequal.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100512
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-06-02 Richard Guenther <rguenth@gcc.gnu.org>
+
+ * c-typeck.c (build_indirect_ref): Build INDIRECT_REF
+ with correct type.
+
2005-06-02 Ulrich Weigand <uweigand@de.ibm.com>
* config/s390/s390.c (s390_add_execute): Do not handle out-of-pool
else
{
tree t = TREE_TYPE (type);
- tree mvt = t;
tree ref;
- if (TREE_CODE (mvt) != ARRAY_TYPE)
- mvt = TYPE_MAIN_VARIANT (mvt);
- ref = build1 (INDIRECT_REF, mvt, pointer);
+ ref = build1 (INDIRECT_REF, t, pointer);
if (!COMPLETE_OR_VOID_TYPE_P (t) && TREE_CODE (t) != ARRAY_TYPE)
{
+2005-06-02 Richard Guenther <rguenth@gcc.gnu.org>
+
+ * gcc.dg/wtypequal.c: New testcase.
+
2005-06-02 Diego Novillo <dnovillo@redhat.com>
PR 21582
--- /dev/null
+/* { dg-do compile } */
+
+int *__restrict *p;
+void f(void)
+{
+ __typeof(*p) *q = p; /* { dg-bogus "discards qualifiers" } */
+}