Commit 984dfd8c by Richard Guenther Committed by Richard Biener

c-typeck.c (build_indirect_ref): Build INDIRECT_REF with correct type.

2005-06-02  Richard Guenther  <rguenth@gcc.gnu.org>

	* c-typeck.c (build_indirect_ref): Build INDIRECT_REF
	with correct type.

	* gcc.dg/wtypequal.c: New testcase.

From-SVN: r100512
parent c449e207
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
......
......@@ -1638,12 +1638,9 @@ build_indirect_ref (tree ptr, const char *errorstring)
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
......
/* { dg-do compile } */
int *__restrict *p;
void f(void)
{
__typeof(*p) *q = p; /* { dg-bogus "discards qualifiers" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment