http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51991
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org Version|fortran-dev |4.7.0 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-25 10:46:23 UTC --- Works for me: With GCC 4.1, 4.3, 4.4, 4.5, 4.6 and 4.7 I get the expected diagnostic. For 4.7, I tried 4.7.0 20120118 [trunk revision 183273] and 4.7.0 20120125 Rev. 183512 (with some unrelated patches) and all gave exactly the same error: j = a%j 1 Error: 'j' at (1) is not a member of the 'mytyp' structure I wonder why it does not work for you with GCC 4.7 2011-11-19. I do not recall any issue, but it might have been some intermediate glitch. Does a newer 4.7 work? And which platform are you on? It could also be some target-dependent bug.