http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45586
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code CC| |matz at gcc dot gnu.org, | |rguenth at gcc dot gnu.org Component|lto |fortran --- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-25 16:47:00 UTC --- The issue is that realspace_grid_type%r is marked as restrict, but y is a POINTER and y => x%r associates y with that allocatable even though it doesn't have TARGET attribute. This points at either a FE bug, an invalid testcase. The FE bug would be that allocatables are not really restrict as they can be aliased. The invalid testcase would be that doing y => x%r isn't valid (but gfortran doesn't diagnose that, so also a FE bug). Can someone clarify why or if it is legal to associate y with x%r? If declaring x with POINTER attribute makes it legal then we need to form a type variant for realspace_grid_type, re-using the original type isn't conformant with middle-end expectations. FE again for now, atm I think this is a possible generic wrong-code problem.