typedef unsigned int U032; typedef volatile struct { U032 Monochrome[1]; struct { U032 WidthHeight; } UnclippedRectangle[1]; } RivaBitmap; void writel(void *); void rivafb_fillrect(RivaBitmap *bm) { writel(&bm->UnclippedRectangle[0].WidthHeight); } fbdev.3.i: In function 'rivafb_fillrect': fbdev.3.i:11: warning: passing argument 1 of 'writel' discards qualifiers from pointer target type fbdev.3.i:10: error: type mismatch in address expression volatile U032 * U032 * D.1551 = &bm->UnclippedRectangle[0].WidthHeight fbdev.3.i:10: internal compiler error: verify_gimple failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
The C FE strips qualifier in building the ARRAY_REF. I have a patch.
Subject: Bug 33726 Author: rguenth Date: Thu Oct 11 08:11:18 2007 New Revision: 129227 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129227 Log: 2007-10-11 Richard Guenther <rguenther@suse.de> PR c/33726 * c-typeck.c (build_array_ref): Do not strip qualifiers from the array element type. * gcc.dg/pr33726.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr33726.c Modified: trunk/gcc/ChangeLog trunk/gcc/c-typeck.c trunk/gcc/testsuite/ChangeLog
Fixed.