------- Comment #4 from RenzulME at utrc dot utc dot com 2007-04-30 19:29 ------- Subject: RE: gfortran gcc_gobble_whitespace broke previously working source
Thank you very much for the reference. Yes, of course, I will fix the code. It took me a couple of days to find this "bug" when I switched over from g77 to gfortran. I wanted to try an report it, just in case. Thanks for the very prompt response and resolution. Then am I correct in assuming that, the gcc_gobble_whitespace() treatment of tabs (in fixed-form Fortran sources) is just "being nice", and doesn't adhere to any Fortran standard? It seems that, if the "gobble" function is just trying to recover "usable" Fortran code when it encounters the "non standard tab character", then my recommendation still might make sense, in that, you just want to make sure that the relevant non-whitespace characters in the source line are beyond column 6... That is, "gobble" up the tab AND ANY SUBSEQUENT WHITESPACE, and replace with 6-spaces such that the first non-whitespace character is in column 7... No response necessary, as finding the bug was my real problem. I just enjoy having good technical/compiler discussions whenever I can! Cheers, and thanks again, Mark -----Original Message----- From: kargl at gcc dot gnu dot org [mailto:[EMAIL PROTECTED] Sent: Monday, April 30, 2007 2:17 PM To: Renzulli, Mark E UTRC Subject: [Bug fortran/31765] gfortran gcc_gobble_whitespace broke previously working source ------- Comment #3 from kargl at gcc dot gnu dot org 2007-04-30 19:17 ------- Mark, Section 3.1 of the Fortran 95 standard defines the "Fortran Character Set". tab is not a member of this set whereas space (or blank) is. One then needs to read Section 3.3.2 that covers fixed-form source code. 3.3.2.4 Fixed form statements A label, if present, shall occur in character positions 1 through 5 of the first line of a statement; otherwise, positions 1 through 5 shall be blank. Blanks may appear anywhere within a label. A statement following a ";" on the same line shall not be labeled. Character positions 1 through 5 of any continuation lines shall be blank. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31765