Bug 229855 - lang/gcc6: The preprocessor cpp6 loses line concatenation
Summary: lang/gcc6: The preprocessor cpp6 loses line concatenation
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Gerald Pfeifer
URL: https://gcc.gnu.org/bugzilla/show_bug...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-18 06:51 UTC by Yuri Victorovich
Modified: 2018-07-18 08:32 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gerald)


Attachments
a.f90 (63 bytes, text/plain)
2018-07-18 06:52 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2018-07-18 06:51:12 UTC
How to repeat:
create the file a.f90 with this one line (it is also attached):
>     call iotk_strcat(string,trim(adjustl(tmpval))//" ",ierr)

Run the command:
> cpp6 a.f90 -o atmp.f90

The result isn't a valid fortran:
>      call iotk_strcat(string,trim(adjustl(tmpval))

Braces aren't closed, everything after // is missing.

This doesn't happen on linux.

How did I find this problem: one fortran project fails to build for this reason. It uses cpp6 to preprocess fortran, and produces broken preprocessed fortran files.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2018-07-18 06:52:21 UTC
Created attachment 195232 [details]
a.f90

Forgot to mention: gcc8 has the same problem.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2018-07-18 07:03:13 UTC
Added the upstream bug report.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2018-07-18 08:32:21 UTC
Closing as per explanation in the upstream bug report.