This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Test g77.f-torture/execute/cpp4.F


At 05:52 AM 7/22/2004, Billinghurst, David (CALCRTS) wrote:

Anyone have an opinion on the g77 test g77.f-torture/execute/cpp4.F.
Is the following gfortran behavior reasonable, or is it a bug?

(For anything but a Hollerith constant I would get out the standards,
but .... how gross!!)

The test is:

C The preprocessor must not mangle Hollerith constants
C which contain apostrophes.
      integer i, j
      data i /4hbla'/
      data j /"bla'"/
      if (i .ne. j) call abort
      end

gfortran produces:

$ ../gfortran -B.. -L../../i686-pc-cygwin/libgfortran/.libs/ cpp4.F
 In file cpp4.F:4

      data i /4hbla'/
              1
Error: Syntax error in DATA statement at (1)
 In file cpp4.F:5

      data j /"bla'"/
             1
Error: Incompatible types in assignment at (1), CHARACTER(1) to INTEGER(4)

I'm surprised g77 didn't require one of the ugly options to accept this. I would call this rejection reasonable, unless gfortran is to provide full support of f66 syntax, maybe under a -f66 switch.



Tim Prince



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]