# Tests for supported Fortran features

**URL:** <https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629>\
**Category:** Help\
**Created:** [April 26, 2025, 10:23am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629 "2025-04-26T10:23:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jcollins](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jcollins/32/540_2.png) [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Post date:** [April 26, 2025, 10:23am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/1 "2025-04-26T10:23:36Z")

</div>

There is a proposal to add user-filterable tables to [fortran-lang.org](http://fortran-lang.org) to show:

1. The open/close code status
2. Whether free / academic-free / paid
3. Supported features (both standard and extensions)

and for tools, what they do - linter / formatter / migrator …

For the supported features we need lists of:

1. The standard features which are not always fully supported
2. The non-standard features which may not be supported

The proposal is to publish a simple test for each feature, and tests which stress the feature.  
My question is which features should be tested?

For example, for non-standard features we could test:

%val  
%ref  
STRUCTURE/MAP/UNION  
Embedded expressions in format specifications

Suggestions would be most welcome. So also would be test code!

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [June 18, 2025, 7:25am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/2 "2025-06-18T07:25:08Z")

</div>

I have picked up an old fun project of mine again that does exactly this: small programs to check whether a compiler supports a particular feature. You can find the collection I already have at [flibs - a collection of Fortran modules / SVN / [r431] /trunk/chkfeatures](https://sourceforge.net/p/flibs/svncode/HEAD/tree/trunk/chkfeatures/). And there is a similar set of programs at [flibs - a collection of Fortran modules / SVN / [r431] /trunk/chkdiagnostics](https://sourceforge.net/p/flibs/svncode/HEAD/tree/trunk/chkdiagnostics) that aism at checking the diagnostics capabilities of a compiler/

I intend to bring this all to Github. but I would like to enhance it a bit before doing so.

---

<div class="post-metadata">

**Author:** ![Jcollins](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jcollins/32/540_2.png) [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Post date:** [June 19, 2025, 6:59am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/3 "2025-06-19T06:59:06Z")

</div>

@Arjen - many thanks for this. We also have a collection of tests which I need to standardise and create a git-hub repository.

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [June 19, 2025, 7:00am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/4 "2025-06-19T07:00:21Z")

</div>

Want to cooperate on this? 🙂

---

<div class="post-metadata">

**Author:** ![Jcollins](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jcollins/32/540_2.png) [@Jcollins](https://fortran-lang.discourse.group/u/Jcollins)\
**Post date:** [June 19, 2025, 7:01am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/5 "2025-06-19T07:01:57Z")

</div>

Yes please!

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [June 19, 2025, 7:10am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/6 "2025-06-19T07:10:23Z")

</div>

Have you seen my SF repository? I use a small configuration file to generate a big batch file/shell script. That way I can easily control what programs should be compiled and run. It is a rather pedestrian way of achieving this, but it gets the job done. Some more flexibility would be nice, like selecting by some keyword, say only the new stuff for F2023.

What type of infrastructure do you use?

---

<div class="post-metadata">

**Author:** ![gak](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gak/32/146_2.png) [@gak](https://fortran-lang.discourse.group/u/gak)\
**Post date:** [June 19, 2025, 1:28pm UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/7 "2025-06-19T13:28:18Z")

</div>

I’d like to be involved as well. I don’t have much to offer near-term, but longer term, I hope to be able to add to this.

I’m happy to piggy-back on infrastructure you create. I have a need for doing a lot of cross-implementation testing along these lines.

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [June 19, 2025, 1:30pm UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/8 "2025-06-19T13:30:32Z")

</div>

Okay, I will create a simple repository with the stuff I have already on Github. I will add you as contributors. Then we can think of a more sophisticated approach, if necessary, as we go along 🙂

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [June 19, 2025, 6:32pm UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/9 "2025-06-19T18:32:49Z")

</div>

I have created this repository on Github: [GitHub - arjenmarkus/chk-fortran-features: Collection of programs to check compiler capabilities](https://github.com/arjenmarkus/chk-fortran-features).

It contains the first set of checking programs, at this moment just over 160. More to come.

---

<div class="post-metadata">

**Author:** ![jorgeg](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jorgeg/32/6835_2.png) [@jorgeg](https://fortran-lang.discourse.group/u/jorgeg)\
**Post date:** [June 29, 2025, 11:26pm UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/10 "2025-06-29T23:26:06Z")

</div>

do you have a compiler that passes all checks?

---

<div class="post-metadata">

**Author:** ![Arjen](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Arjen](https://fortran-lang.discourse.group/u/Arjen)\
**Post date:** [June 30, 2025, 6:51am UTC](https://fortran-lang.discourse.group/t/tests-for-supported-fortran-features/9629/11 "2025-06-30T06:51:03Z")

</div>

No, but some of the checks involve relatively new features (Fortran 2023) - older features are usually supported, but sometimes the standard allows variations, like with the random number generator. And then there is no yes/no answer 🙂
