Summary: | gfortran run-time error with multiple tabs in format continuation | ||
---|---|---|---|
Product: | gcc | Reporter: | mast |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, kargls |
Priority: | P3 | Keywords: | accepts-invalid |
Version: | 4.1.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2005-12-14 09:26:02 | |
Bug Depends on: | |||
Bug Blocks: | 19292 | ||
Attachments: | Program with indentation that gives run-time error |
Description
mast
2005-12-14 00:45:26 UTC
Created attachment 10479 [details]
Program with indentation that gives run-time error
Confirmed (and it's a regression wrt g77). The tree dump has: dt_parm.0.format = "(i4,i4, \ti4,i4)"; so I think it's up to the front-end to remove that. Technically, gfortran can do whatever it wants, because the code is nonconforming. The tab character is not a member of the Fortran character set. The code is using a tab where a member of the Fortran character set is expected. This is just one more example of PR 18537, for which I submitted a patch on 05 Mar 05. Unfortunately, the dialogue about that patch never resolved how a tab should be handled. I will revisit that patch with the following plan: 1) gfortran will issue an error during compiliation if a tab is found in the input. The only exceptions that I am currently contemplating are tabs in comments and character constants. 2) I'll probably introduce a -fexpand-stupid-tabs or similar pejorative named option for those user who fail to read Chapter 3 of the Fortran 95 standard. The option will simply replace the tab with a space (which happens to be a member of the Fortran character set). 3) Document that tabs are evil in gfortran.texi. <rant> Finally, I don't care if this isn't backwards compatible with g77. g77 is a cesspool of nonstandard features. The introduction of this cesspool into gfortran is severely reducing the quality of gfortran's code and affect its maintainability. </rant> Current gfortran is handling this correctly I am looking into this a little. setWunused is called which calls SetWextras. Just a little tweaking we need to do here I think. oops disregard that last comment. Typed in the wrong box. |