public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/34324]  New: Module files on CRLF systems
@ 2007-12-03  8:55 fxcoudert at gcc dot gnu dot org
  2007-12-13 19:16 ` [Bug fortran/34324] " dfranke at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-12-03  8:55 UTC (permalink / raw)
  To: gcc-bugs

Someone reported a problem with the Windows binaries that is related to how we
deal with CRLF-formatted module files. This issue can be reproduced on non-CRLF
systems by the following:

$ cat a.f90                   
module foo
end module foo
$ gfortran -c a.f90
$ cat b.f90 
use foo
end
$ gfortran -c b.f90
$ unix2dos foo.mod 
$ gfortran -c b.f90
Fatal Error: Reading module foo at line 3 column 2: Bad name


-- 
           Summary: Module files on CRLF systems
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34324


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/34324] Module files on CRLF systems
  2007-12-03  8:55 [Bug fortran/34324] New: Module files on CRLF systems fxcoudert at gcc dot gnu dot org
@ 2007-12-13 19:16 ` dfranke at gcc dot gnu dot org
  2007-12-13 20:29 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-12-13 19:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2007-12-13 19:16 -------
Confirmed. Regtesting patch.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dfranke at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-12-13 19:16:18
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34324


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/34324] Module files on CRLF systems
  2007-12-03  8:55 [Bug fortran/34324] New: Module files on CRLF systems fxcoudert at gcc dot gnu dot org
  2007-12-13 19:16 ` [Bug fortran/34324] " dfranke at gcc dot gnu dot org
@ 2007-12-13 20:29 ` steven at gcc dot gnu dot org
  2007-12-13 20:46 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-12-13 20:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from steven at gcc dot gnu dot org  2007-12-13 20:29 -------
Why does this need fixing?  If people edit .mod files manually, failure is what
they deserve.

Does the proposed patch even work with more complex modules (due to the
checksum)? 

>From module.c:
  fputs ("00000000000000000000000000000000 -- "
        "If you edit this, you'll get what you deserve.\n\n", module_fp);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34324


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/34324] Module files on CRLF systems
  2007-12-03  8:55 [Bug fortran/34324] New: Module files on CRLF systems fxcoudert at gcc dot gnu dot org
  2007-12-13 19:16 ` [Bug fortran/34324] " dfranke at gcc dot gnu dot org
  2007-12-13 20:29 ` steven at gcc dot gnu dot org
@ 2007-12-13 20:46 ` dfranke at gcc dot gnu dot org
  2007-12-14 10:25 ` dfranke at gcc dot gnu dot org
  2007-12-14 10:27 ` dfranke at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-12-13 20:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dfranke at gcc dot gnu dot org  2007-12-13 20:45 -------
> Why does this need fixing?

Someone noticed. Hence, someone checked. As the patch is not exactly intrusive,
I think it's worth the change.

On windows it suffices to open and close a file in the "wrong" editor to
replace LF by CRLF. I wrecked the subversion-history of quite a files in my
local project due to this unwanted transition.


> Does the proposed patch even work with more complex modules (due to the
> checksum)? 

If not, any checksum test would fail. As the checksum is computed during write
and any (later introduced) '\r' character is dropped, the checksum test
succeeds.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34324


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/34324] Module files on CRLF systems
  2007-12-03  8:55 [Bug fortran/34324] New: Module files on CRLF systems fxcoudert at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-12-13 20:46 ` dfranke at gcc dot gnu dot org
@ 2007-12-14 10:25 ` dfranke at gcc dot gnu dot org
  2007-12-14 10:27 ` dfranke at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-12-14 10:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dfranke at gcc dot gnu dot org  2007-12-14 10:25 -------
Subject: Bug 34324

Author: dfranke
Date: Fri Dec 14 10:25:12 2007
New Revision: 130928

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130928
Log:
2007-12-14  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/34324
        * module.c (parse_atom): Fixed parsing of modules files whose
        lines are terminated by CRLF.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34324


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/34324] Module files on CRLF systems
  2007-12-03  8:55 [Bug fortran/34324] New: Module files on CRLF systems fxcoudert at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-12-14 10:25 ` dfranke at gcc dot gnu dot org
@ 2007-12-14 10:27 ` dfranke at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-12-14 10:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dfranke at gcc dot gnu dot org  2007-12-14 10:27 -------
Fixed in trunk (r130928). Closing.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/fortra
                   |                            |n/2007-12/msg00169.html
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34324


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-12-14 10:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-03  8:55 [Bug fortran/34324] New: Module files on CRLF systems fxcoudert at gcc dot gnu dot org
2007-12-13 19:16 ` [Bug fortran/34324] " dfranke at gcc dot gnu dot org
2007-12-13 20:29 ` steven at gcc dot gnu dot org
2007-12-13 20:46 ` dfranke at gcc dot gnu dot org
2007-12-14 10:25 ` dfranke at gcc dot gnu dot org
2007-12-14 10:27 ` dfranke at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).