- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Consider the following directory tree:
test.F90
b.inc
test/
├─ a.inc
└─ b.inc
With the following contents:
- `test.F90`:
#include "test/a.inc"
end
- `test/a.inc`:
#include "test/b.inc"
#include "b.inc"
#include "b.inc"
- `test/b.inc`:
print*,"Hello from test/b.inc"
- `b.inc`:
print*,"Hello from b.inc"
A similar example was already discussed here. Running the compiled code with the Intel compiler (ifort 2021.8.0 and ifx 2023.0.0 on Ubuntu 18.04.2 LTS) without any flags leads to the following output:
Hello from test/b.inc
Hello from test/b.inc
Hello from test/b.inc
After the first `#include "test/b.inc"` in `a.inc` the directory is "changed" to `test` for some reason and only `test/b.inc` is included in all consequent `#include` statements.
Is it the intended behavior of the preprocessor? Or is it a bug?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This fpp issue is fixed in the compiler versions released this week as part of 2024.0.
@V-T, please try the new compiler.
Link Copied
- « Previous
-
- 1
- 2
- Next »
21 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »